From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FF9EC4360F for ; Wed, 27 Mar 2019 14:20:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDF922082F for ; Wed, 27 Mar 2019 14:20:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730546AbfC0OUY convert rfc822-to-8bit (ORCPT ); Wed, 27 Mar 2019 10:20:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730490AbfC0OUV (ORCPT ); Wed, 27 Mar 2019 10:20:21 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 883D0C074EF1; Wed, 27 Mar 2019 14:20:21 +0000 (UTC) Received: from carbon (ovpn-200-46.brq.redhat.com [10.40.200.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81EE217B73; Wed, 27 Mar 2019 14:20:07 +0000 (UTC) Date: Wed, 27 Mar 2019 15:20:06 +0100 From: Jesper Dangaard Brouer To: Edward Cree Cc: Ioana Ciornei , "davem@davemloft.net" , "netdev@vger.kernel.org" , Ioana Ciocoi Radulescu , Florian Westphal , brouer@redhat.com, Felix Fietkau Subject: Re: [PATCH net-next] dpaa2-eth: use netif_receive_skb_list Message-ID: <20190327152006.34dd31db@carbon> In-Reply-To: References: <1553521344-31094-1-git-send-email-ioana.ciornei@nxp.com> <20190326154315.7476de9d@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 27 Mar 2019 14:20:21 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 27 Mar 2019 12:02:13 +0000 Edward Cree wrote: > On 26/03/2019 14:43, Jesper Dangaard Brouer wrote: > > On Mon, 25 Mar 2019 13:42:39 +0000 > > Ioana Ciornei wrote: > > > >> Take advantage of the software Rx batching by using > >> netif_receive_skb_list instead of napi_gro_receive. > >> > >> Signed-off-by: Ioana Ciornei > >> --- > > Nice to see more people/drivers using: netif_receive_skb_list() > > > > We should likely add a similar napi_gro_receive_list() function. > > I had a patch series that did that; last posting was v3 back in > November: https://marc.info/?l=linux-netdev&m=154221888012410&w=2 > However, Eric raised some issues, also some Mellanox folks privately > reported that using it in their driver regressed performance, and > I've been too busy since to make progress with it.  Since you seem > to be much better than me at perf investigations, Jesper, maybe you > could take over the series? I'm hoping Florian Westphal might also have some cycles for this? (We talked about doing this during NetDevConf-0x13, because if we can make more driver use these SKB-lists, then it makes sense to let iptables/nftables build a SKB-list of packets to drop, instead of doing it individually, and then we leverage Felix'es work on bulk free in kfree_skb_list). I'm currently coding up use of netif_receive_skb_list() in CPUMAP redirect. As this makes is easier for e.g. Florian (and others) to play with this API, as we no-longer depend on a device driver having this (although we do depend on XDP_REDIRECT in a driver). And the trick to get this as faster than GRO (that basically recycle the same SKB) is to use the slub/kmem_cache bulk API for SKBs. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer