From patchwork Thu Feb 9 11:17:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13134422 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 273E7C636D7 for ; Thu, 9 Feb 2023 11:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbjBILVm (ORCPT ); Thu, 9 Feb 2023 06:21:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231159AbjBILUu (ORCPT ); Thu, 9 Feb 2023 06:20:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2311A5AB3A; Thu, 9 Feb 2023 03:17:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 03F3961A2A; Thu, 9 Feb 2023 11:17:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6C36C433D2; Thu, 9 Feb 2023 11:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675941474; bh=u5OTeyvEI9BF11Q3e6rlK/Gtws2OGY6/oidQIVWTcdY=; h=From:To:Cc:Subject:Date:From; b=CedugU1tkhgKeCDcJ3Y9HqqwmezGNYoB45Xn4Uak0TUvZrz4U57vne4ZgkrjxHdfx zakNTNyyc7ZUbqhDpMkfDoO4hDVraYH7keUF1E6q2A2QwuU4BfhLZCxK8PQ4FnuAw7 FbAuICWxMGdSbwiiYEXGKGhnAehGIq29vLGjYvIQ115K9nKPo6Wznln5xsF/yobt7p h94tG2uvBLdjM9ck5QXXX3IiJ6Pe52GX/DWpV85+dmSmFV+BXklGf8RD/JeNls0kUJ 1D6fLIUx13mGujlzLZAo5IJKZlt5t28kIe3/j1/aP2MvZFeGTDvPi0bzfEp4W0PhAg Lcew9WiLRv89w== From: Lorenzo Bianconi To: bpf@vger.kernel.org Cc: netdev@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org, lorenzo.bianconi@redhat.com Subject: [PATCH bpf-next] ice: update xdp_features with xdp multi-buff Date: Thu, 9 Feb 2023 12:17:25 +0100 Message-Id: X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Now ice driver supports xdp multi-buffer so add it to xdp_features. Signed-off-by: Lorenzo Bianconi --- drivers/net/ethernet/intel/ice/ice_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 074b0e6d0e2d..7194888d2a3d 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -2913,7 +2913,7 @@ ice_xdp_setup_prog(struct ice_vsi *vsi, struct bpf_prog *prog, if (xdp_ring_err) NL_SET_ERR_MSG_MOD(extack, "Setting up XDP Tx resources failed"); } - xdp_features_set_redirect_target(vsi->netdev, false); + xdp_features_set_redirect_target(vsi->netdev, true); /* reallocate Rx queues that are used for zero-copy */ xdp_ring_err = ice_realloc_zc_buf(vsi, true); if (xdp_ring_err) @@ -3463,7 +3463,8 @@ static int ice_cfg_netdev(struct ice_vsi *vsi) ice_set_netdev_features(netdev); netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT | - NETDEV_XDP_ACT_XSK_ZEROCOPY; + NETDEV_XDP_ACT_XSK_ZEROCOPY | + NETDEV_XDP_ACT_RX_SG; ice_set_ops(netdev);