diff mbox series

[bpf-next] ice: update xdp_features with xdp multi-buff

Message ID b564473cdefc82bda9a3cecd3c15538a418e8ad2.1675941199.git.lorenzo@kernel.org
State Handled Elsewhere
Headers show
Series [bpf-next] ice: update xdp_features with xdp multi-buff | expand

Commit Message

Lorenzo Bianconi Feb. 9, 2023, 11:17 a.m. UTC
Now ice driver supports xdp multi-buffer so add it to xdp_features.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/intel/ice/ice_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Jakub Kicinski Feb. 14, 2023, 1:23 a.m. UTC | #1
On Thu,  9 Feb 2023 12:17:25 +0100 Lorenzo Bianconi wrote:
> Now ice driver supports xdp multi-buffer so add it to xdp_features.
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

Let me take this one in directly the same as the other xdp_feature
follow ups.
Jakub Kicinski Feb. 14, 2023, 1:39 a.m. UTC | #2
On Mon, 13 Feb 2023 17:23:58 -0800 Jakub Kicinski wrote:
> On Thu,  9 Feb 2023 12:17:25 +0100 Lorenzo Bianconi wrote:
> > Now ice driver supports xdp multi-buffer so add it to xdp_features.
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>  
> 
> Let me take this one in directly the same as the other xdp_feature
> follow ups.

Ah, this one is where we had a conflict in the bpf-next PR.
You'll need to rebase.
diff mbox series

Patch

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);