From patchwork Wed Apr 6 02:53:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12803469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0425C433EF for ; Wed, 6 Apr 2022 13:54:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233652AbiDFN4u (ORCPT ); Wed, 6 Apr 2022 09:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234003AbiDFN41 (ORCPT ); Wed, 6 Apr 2022 09:56:27 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9CB618021F for ; Tue, 5 Apr 2022 19:54:16 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id m16so808305plx.3 for ; Tue, 05 Apr 2022 19:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=aDasOs/NIvoT05ZYFrlBrgO6MTfRx3hqIbKi8FUYbuM=; b=ZTNjD7S56WL4JriOnZZNwKHfRbElyj74vqJOLC6e1gpCyYFvyVE4GTEZ31exyJACAW 3AVemiYwEUS1kOdT8jw8SN+MXmazEmhg/G6dfbyOQmFgpy0xuIZegWoWPLxQyUGIl16T fEOciEbionowD7niHds1LKEzxBpuLf/yIk8Hw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aDasOs/NIvoT05ZYFrlBrgO6MTfRx3hqIbKi8FUYbuM=; b=P1kBjk7pHFrueHduksNQ6ry74F9CowzdAk/R1uRs29Rrn5ScbTPNSEmxsAKXpnZCjd H1vC/S4UJ46xeXlUUUjSmVkvW+FhQHs6tChrowvI6JVRfUdPCJ3yG7YaRfCOmRXVcvBH C2UZaFt5kO+g2/TcJf3BqTeJEdKpcWIHAuhS91prTFSWv6VQIAKdkmyV9OxtjV+WYRYT k8P7RrzUIGKrwbXVaNlbS8siK1PuQrSnH4XUY3au21vZkf5ytSvCLLgoRc9kFnQzyROB 3lp80ga7ljIgRXKffWQhNb3WCGIctsIre/V0+CctAPax3bbSKGGNtuAip856AY/OyVbu lFDw== X-Gm-Message-State: AOAM531+4I6mDqzsJC0irglnJgCtQefRcHGDjOqFxTQ4JpwCq+eCxWlu O2a6Xz+FscFe4XA2PgBoFVW7Lg== X-Google-Smtp-Source: ABdhPJxkPxSN/n1EFWjBd0UmP4DhbRfn4CVfG+m2u250DkzkH00D/PdXQv/J76bdlREI0+jAnWJF6g== X-Received: by 2002:a17:902:f605:b0:14d:9e11:c864 with SMTP id n5-20020a170902f60500b0014d9e11c864mr6488218plg.54.1649213655992; Tue, 05 Apr 2022 19:54:15 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x9-20020a17090a970900b001ca6c59b350sm3395111pjo.2.2022.04.05.19.54.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2022 19:54:15 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com, bpf@vger.kernel.org, john.fastabend@gmail.com, toke@redhat.com, lorenzo@kernel.org, ast@kernel.org, daniel@iogearbox.net, echaudro@redhat.com, pabeni@redhat.com Subject: [PATCH net-next v3 00/11] bnxt: Support XDP multi buffer Date: Tue, 5 Apr 2022 22:53:42 -0400 Message-Id: <1649213633-7662-1-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This series adds XDP multi buffer support, allowing MTU to go beyond the page size limit. v3: Simplify page mode buffer size calculation Check to make sure XDP program supports multipage packets v2: Fix uninitialized variable warnings in patch 1 and 10. Andy Gospodarek (11): bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff bnxt: add flag to denote that an xdp program is currently attached bnxt: refactor bnxt_rx_pages operate on skb_shared_info bnxt: rename bnxt_rx_pages to bnxt_rx_agg_pages_skb bnxt: adding bnxt_rx_agg_pages_xdp for aggregated xdp bnxt: set xdp_buff pfmemalloc flag if needed bnxt: change receive ring space parameters bnxt: add page_pool support for aggregation ring when using xdp bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff bnxt: support transmit and free of aggregation buffers bnxt: XDP multibuffer enablement drivers/net/ethernet/broadcom/bnxt/bnxt.c | 304 +++++++++++++----- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 16 +- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 191 +++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 16 +- 5 files changed, 416 insertions(+), 113 deletions(-)