OSDN Git Service

net/mlx5e: XDP, Precede XDP-related operations in RQ poll by a loaded program check
authorTariq Toukan <tariqt@mellanox.com>
Wed, 21 Nov 2018 11:56:17 +0000 (13:56 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 21 Dec 2018 06:54:17 +0000 (22:54 -0800)
commit4fb2f516186ea25dea326f97880431e14a5b9e9d
tree021948e42b01b5703b67e1e4f8b3843acb89a941
parente05b8d4fc30a68540e5c0eef3e2bacd1f27b8172
net/mlx5e: XDP, Precede XDP-related operations in RQ poll by a loaded program check

At the end of the RQ polling loop, some XDP-related operations
might be required. Before checking them one by one, check if
an XDP program is even loaded.
Combine all the checks and operations in a single function in xdp files.

This saves unnecessary checks for non-XDP flows.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c