From patchwork Sun Mar 20 19:58:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12786685 X-Patchwork-Delegate: kuba@kernel.org 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 F39F8C433F5 for ; Sun, 20 Mar 2022 19:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241597AbiCTUAH (ORCPT ); Sun, 20 Mar 2022 16:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343629AbiCTT76 (ORCPT ); Sun, 20 Mar 2022 15:59:58 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AE9C377F9 for ; Sun, 20 Mar 2022 12:58:35 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id p17so11061671plo.9 for ; Sun, 20 Mar 2022 12:58:35 -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:in-reply-to:references; bh=IY9O5Ln5D4Djtxg2fDyvR8ydsuyQNN+S2TvMoxDTeFU=; b=VHvtMk8K0m+Fbd/ozp/fGauJcGgzYPHAsRctWezzkqpxuK1Xx2iHJFJrEN+TcqRwBV roIXn/hZEGbJt5fXuoi7PySf60MDmrtPGu9fUwdx2j72GNu/VXrd58yfmXYXVs0IH4ul n30KwE8JbDccWW5p3zX47mHLPMplV4OQruRhI= 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:in-reply-to :references; bh=IY9O5Ln5D4Djtxg2fDyvR8ydsuyQNN+S2TvMoxDTeFU=; b=O+aMYXT++9OwCjvx6WfuhZkHfVl0iUkfaIhy2cX4UeChAusAYJCWZqLmjOxUN3pjM6 2eTY6GA98BnXjXfN6AN4RhH82Pe7PrM+y7GZaYky2FXPLRO8Vn0Eb2oFJi2M0zTxhS7N fT/vO5/qzHv6vNWp9NoW+SHMXsdHYjqCRLuIEZ6pE3nICqZhNZ3NjCiqOSPSY/1fxu5v SK5rI0QE2QF00vKxzXxYWNKr3iI51cxV6uS3veR58FrRCOK7o9hkTAvaa8SRwm+yGk6R gaXNzEwmd/0rJVDfO60NUtKuzhV4UQYrQaBmYxlwUasG6koA0oijW75alHKLNcQcghYP i21g== X-Gm-Message-State: AOAM532VXtGr4jq44QFRjDWSocHAjfTSPL+mFfR9R3IJqImcJm0QGZT3 /aVH7Fn3e/R9FxialJn/9AjFC0DJAgQ8Jw== X-Google-Smtp-Source: ABdhPJxNakUyUvb7Vpct5tGzFX2k4f1GAlzW0qMoFIYMKP0kFy8I0CgkbtT2oLcR2M80eOkNV3PIeg== X-Received: by 2002:a17:903:22c8:b0:153:b2f2:e7c0 with SMTP id y8-20020a17090322c800b00153b2f2e7c0mr9529512plg.135.1647806314818; Sun, 20 Mar 2022 12:58:34 -0700 (PDT) Received: from localhost.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id h10-20020a056a001a4a00b004f7c76f29c3sm16418335pfv.24.2022.03.20.12.58.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Mar 2022 12:58:34 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com Subject: [PATCH net-next v2 11/11] bnxt: XDP multibuffer enablement Date: Sun, 20 Mar 2022 15:58:04 -0400 Message-Id: <1647806284-8529-12-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1647806284-8529-1-git-send-email-michael.chan@broadcom.com> References: <1647806284-8529-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Andy Gospodarek Allow aggregation buffers to be in place in the receive path and allow XDP programs to be attached when using a larger than 4k MTU. Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 84c89ee7dc2f..4f7213af1955 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1937,8 +1937,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, xdp_active = true; } - /* skip running XDP prog if there are aggregation bufs */ - if (!agg_bufs && xdp_active) { + if (xdp_active) { if (bnxt_rx_xdp(bp, rxr, cons, xdp, data, &len, event)) { rc = 1; goto next_rx; diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c index adbd92971209..3780b491a1d4 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c @@ -374,11 +374,6 @@ static int bnxt_xdp_set(struct bnxt *bp, struct bpf_prog *prog) int tx_xdp = 0, rc, tc; struct bpf_prog *old; - if (prog && bp->dev->mtu > BNXT_MAX_PAGE_MODE_MTU) { - netdev_warn(dev, "MTU %d larger than largest XDP supported MTU %d.\n", - bp->dev->mtu, BNXT_MAX_PAGE_MODE_MTU); - return -EOPNOTSUPP; - } if (!(bp->flags & BNXT_FLAG_SHARED_RINGS)) { netdev_warn(dev, "ethtool rx/tx channels must be combined to support XDP.\n"); return -EOPNOTSUPP;