From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753932AbdBVC6U (ORCPT ); Tue, 21 Feb 2017 21:58:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56282 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850AbdBVC6N (ORCPT ); Tue, 21 Feb 2017 21:58:13 -0500 Subject: Re: [PATCH net-next] virtio-net: switch to use build_skb() for small buffer To: "Michael S. Tsirkin" References: <1487666788-9658-1-git-send-email-jasowang@redhat.com> <20170221162849-mutt-send-email-mst@kernel.org> Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Jason Wang Message-ID: <35244d06-2d0d-3f2e-0cd1-43137988c869@redhat.com> Date: Wed, 22 Feb 2017 10:58:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170221162849-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 22 Feb 2017 02:58:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017年02月21日 22:37, Michael S. Tsirkin wrote: > On Tue, Feb 21, 2017 at 04:46:28PM +0800, Jason Wang wrote: >> This patch switch to use build_skb() for small buffer which can have >> better performance for both TCP and XDP (since we can work at page >> before skb creation). It also remove lots of XDP codes since both >> mergeable and small buffer use page frag during refill now. >> >> Before | After >> XDP_DROP(xdp1) 64B : 11.1Mpps | 14.4Mpps >> >> Tested with xdp1/xdp2/xdp_ip_tx_tunnel and netperf. >> >> Signed-off-by: Jason Wang > Thanks! > I had a similar patch for mergeable too, though it's trickier there > as host has a lot of flexibility in sizing buffers. > Looks like a good intermediate step to me. Yes, I think it's more tricky for the case of mergeable buffer: 1) we need reserve NET_SKB_PAD + NET_IP_ALIGN for each buffer, this will break rx frag coalescing 2) need tailroom for skb_shinfo, so it won't work for all size of packet Thanks > > > Acked-by: Michael S. Tsirkin >