OSDN Git Service

net/mlx5e: take into account device reconfiguration for xdp_features flag
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 9 Mar 2023 12:25:31 +0000 (13:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Mar 2023 05:33:48 +0000 (21:33 -0800)
commit4d5ab0ad964df178beba031b89429a601893ff61
tree014438748a5c3d73fb2862793f4f45d73fe2907c
parentfccca038f3003daa8f28a5e5d97efe50f04b8d9d
net/mlx5e: take into account device reconfiguration for xdp_features flag

Take into account LRO and GRO configuration setting device xdp_features
flag. Consider channel rq_wq_type enabling rx scatter-gatter support in
xdp_features flag and disable NETDEV_XDP_ACT_NDO_XMIT_SG since it is not
supported yet by the driver.
Moreover always enable NETDEV_XDP_ACT_NDO_XMIT as the ndo_xdp_xmit
callback does not require to load a dummy xdp program on the NIC.

Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features")
Co-developed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c