From patchwork Fri Apr 8 07:58:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12806225 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 AD66AC433EF for ; Fri, 8 Apr 2022 08:00:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbiDHICH (ORCPT ); Fri, 8 Apr 2022 04:02:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230385AbiDHIBo (ORCPT ); Fri, 8 Apr 2022 04:01:44 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EECEC114DE2 for ; Fri, 8 Apr 2022 00:59:37 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id 125so7104398pgc.11 for ; Fri, 08 Apr 2022 00:59:37 -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=2pvE157PvvABXqFLvxS1FajAX8nRZ/BIKphOBrFeQtM=; b=XmSqvLmy9Bm2eq/8KQoWLSSLl9aRisgCTVNZNKd9CyoTSFhMaricG7SQ+z6a+r2fWc E/QFI+OnvizqsbLzhepPEAUfh9WgoRr6r5hIkGnFQjCal1boi7fGg6/mckbwlWaKYTTE 2aTLvEDRD2AJZ4zlZ981/8dwX7dR0Xb6a96jg= 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=2pvE157PvvABXqFLvxS1FajAX8nRZ/BIKphOBrFeQtM=; b=IxUMgis+OOd9cuUnavCHiaGoXEkMJg3mtkQnOmHQ8xr/9ZaYgdo1mU2pUebxKaG7SG K+GOQCtrJUurjfJNNfMDoO1+ofUkCquRlAbl+IJp18YxEvLpcXi4b+syCyp6H5ffxEg+ oS5s5Yo0uJNJ5ay7lhVMUmHEYjodwsJ7dznO30K6ck3dpWlkVC9E7pAPn2zfpPlQigIi zZt0XJzWhlUcYHyLd1tKPvI9UZ3LgUIB15IZR0bB2qND7ywva1hbOg24j/2lUvtiZKIs 94NFJ/IGfiLbR5Y5i+QNPQLpI8LnC2K6vWIi+g9XWigeEwPN4HZRF6XIhxjpDxMpZuLy k0ww== X-Gm-Message-State: AOAM5334wrDcbogOUkyMIZ3J8B8vGSEt1ygmNnGQZ5or2MC+NvNIl66z 0F6tvmXfa+bfkalJVpfWEVNUgg== X-Google-Smtp-Source: ABdhPJzFZnYABNHvxc4LyEfXkk7x6A6jqmDZeHD17gdgQhH+GKaJlFU2EYZERnAKMRjeYM6OwBVewA== X-Received: by 2002:a62:f20d:0:b0:505:6ec8:4ee6 with SMTP id m13-20020a62f20d000000b005056ec84ee6mr5476677pfh.5.1649404776165; Fri, 08 Apr 2022 00:59:36 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id l2-20020a637c42000000b003644cfa0dd1sm20507448pgn.79.2022.04.08.00.59.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2022 00:59:35 -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 v4 00/11] bnxt: Support XDP multi buffer Date: Fri, 8 Apr 2022 03:58:55 -0400 Message-Id: <1649404746-31033-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. v4: Rebase with latest net-next 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(-)