Received: by 10.192.165.156 with SMTP id m28csp1525019imm; Wed, 18 Apr 2018 11:01:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+tHQ+74KRB6swfMNaLbDAWKnhRq908tUF+YcmNYDCkqY+yiYdCiRZnkEgcIr65nLi2bcl3 X-Received: by 2002:a17:902:2826:: with SMTP id e35-v6mr2976062plb.348.1524074516169; Wed, 18 Apr 2018 11:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524074516; cv=none; d=google.com; s=arc-20160816; b=ECSjQ7L92JR888G7NGv1kUuX01tI6OK1A1cANxu6RTjgE2gmVyqpmKewWsPZPmQXWj /MqyAwavSb4PR8QyvGcYYmN6D1kwKw3iaNlqbHm6v+1nC61d22E8EU6zws1ZOR3ss8Yx X1zhQzY4aQns870KFxljnUYNSwzESGbHzCSK1X2ti1/WCjsWkTtgSFa/4d9kYpH1IOeU v3lzDI4o5EIvLJ8vV/oZubki/eaB07UFLrpVzcjeWLcyeB7L3un+hWPnFC3MyMCYWdMC emPeVjLWomF/f7FWTlVkOJSDEN05BmaxOyp5/mozLDa4jQ9WXfqGwjjLeRU38FZlClRC d7zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=ZAs1br8x9SVriv6UeNDZ1cDLJn2uYNa4Toe1XjJ2s9U=; b=VUBgi2GufJt0waHM/obdmoH/xsFt4nsusLs/QveQCDo225tOf9MllrM8ynWV1GmyPB QZdvbXiOci3XtZLUuDUc87NcGezr/nfqAvZVYpCRsxaIQlnUG+qZUbbvFpXN2T/RUVcv PIUN/2jrQsi4jvFZnY0XZ8EMGCsBwBzXBcwBmdpelI05D83iqT9tV4928o+vCygHXcPl xkAlve9HLVVZhJEDecgXV2eVjsYurtz5KTkyPMtGTlqGiS7XqensucLkhWXU1k22Ca4S 7VV+/fzOmomHKMt7pwaK0hW6f5/lNcri++HNEGIFMc3hb2NWVXgy1M0Rvpag3JXaVQuP AsPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4-v6si1635040pll.438.2018.04.18.11.01.41; Wed, 18 Apr 2018 11:01:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbeDRSA0 (ORCPT + 99 others); Wed, 18 Apr 2018 14:00:26 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60934 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752530AbeDRSAZ (ORCPT ); Wed, 18 Apr 2018 14:00:25 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3F75EBFF0; Wed, 18 Apr 2018 18:00:24 +0000 (UTC) Received: from redhat.com (ovpn-124-112.rdu2.redhat.com [10.10.124.112]) by smtp.corp.redhat.com (Postfix) with SMTP id 5EB271C720; Wed, 18 Apr 2018 18:00:24 +0000 (UTC) Date: Wed, 18 Apr 2018 21:00:23 +0300 From: "Michael S. Tsirkin" To: David Miller Cc: eric.dumazet@gmail.com, mpatocka@redhat.com, edumazet@google.com, joby.poriyath@citrix.com, bhutchings@solarflare.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jasowang@redhat.com, virtualization@lists.linux-foundation.org Subject: Re: [PATCH] net: don't use kvzalloc for DMA memory Message-ID: <20180418205539-mutt-send-email-mst@kernel.org> References: <3e65977e-53cd-bf09-bc4b-0ce40e9091fe@gmail.com> <5f4e1286-b79f-0b9f-9a30-47d7654f3889@gmail.com> <20180418.134721.283381724211219025.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418.134721.283381724211219025.davem@davemloft.net> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 18 Apr 2018 18:00:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 18 Apr 2018 18:00:24 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 01:47:21PM -0400, David Miller wrote: > From: Eric Dumazet > Date: Wed, 18 Apr 2018 09:51:25 -0700 > > > I suggest that virtio_net clearly identifies which part needs a specific allocation > > and does its itself, instead of abusing the netdev_priv storage. > > > > Ie use a pointer to a block of memory, allocated by virtio_net, for virtio_net. > > +1 I can do this, but just FYI it's all of 16 bytes which is only mapped for DMA temporarily - and not all of it - a byte here, a byte there. The amount of hoops one has to jump through just to get 1 byte from device nowdays is annoying. -- MST