diff options
author | Konstantin Taranov <kotaranov@microsoft.com> | 2023-10-27 11:06:51 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-27 15:39:29 -0700 |
commit | f5247a6ed5b5bbaa609f97049de868974eb7a7c2 (patch) | |
tree | 79508b3bbd811cf9a6a1f8fdd14350b1b5a2dba6 | |
parent | 6d90b64256f39511d0083111e167321dc6a6add2 (diff) | |
download | lwn-f5247a6ed5b5bbaa609f97049de868974eb7a7c2.tar.gz lwn-f5247a6ed5b5bbaa609f97049de868974eb7a7c2.zip |
net: mana: Use xdp_set_features_flag instead of direct assignment
This patch uses a helper function for assignment of xdp_features.
This change simplifies backports.
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://lore.kernel.org/r/1698430011-21562-1-git-send-email-haiyangz@microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/microsoft/mana/mana_en.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index 48ea4aeeea5d..fc3d2903a80f 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -2687,8 +2687,9 @@ static int mana_probe_port(struct mana_context *ac, int port_idx, ndev->features = ndev->hw_features | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX; ndev->vlan_features = ndev->features; - ndev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT | - NETDEV_XDP_ACT_NDO_XMIT; + xdp_set_features_flag(ndev, NETDEV_XDP_ACT_BASIC | + NETDEV_XDP_ACT_REDIRECT | + NETDEV_XDP_ACT_NDO_XMIT); err = register_netdev(ndev); if (err) { |