From: Dragos Tatulea This patch adds the data direct private flag infrastructure. The MLX5E_PFLAG_DATA_DIRECT flag is needed in the follow-up patches to detect the configuration of data direct from the user side. For now the flag can't be actually set. This will be implemented in a follow-up patch once all pieces are put together. This patch doesn't introduce any functional changes. Signed-off-by: Dragos Tatulea Reviewed-by: Cosmin Ratiu Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 000493f42912..c5bbe5adea45 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -264,6 +264,7 @@ enum mlx5e_priv_flag { MLX5E_PFLAG_XDP_TX_MPWQE, MLX5E_PFLAG_SKB_TX_MPWQE, MLX5E_PFLAG_TX_PORT_TS, + MLX5E_PFLAG_DATA_DIRECT, MLX5E_NUM_PFLAGS, /* Keep last */ }; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c index 1f534051cdfe..26f76449af35 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c @@ -2405,6 +2405,11 @@ static int set_pflag_tx_port_ts(struct net_device *netdev, bool enable) return err; } +static int set_pflag_data_direct(struct net_device *netdev, bool enable) +{ + return -EOPNOTSUPP; +} + static const struct pflag_desc mlx5e_priv_flags[MLX5E_NUM_PFLAGS] = { { "rx_cqe_moder", set_pflag_rx_cqe_based_moder }, { "tx_cqe_moder", set_pflag_tx_cqe_based_moder }, @@ -2414,6 +2419,7 @@ static const struct pflag_desc mlx5e_priv_flags[MLX5E_NUM_PFLAGS] = { { "xdp_tx_mpwqe", set_pflag_xdp_tx_mpwqe }, { "skb_tx_mpwqe", set_pflag_skb_tx_mpwqe }, { "tx_port_ts", set_pflag_tx_port_ts }, + { "data_direct", set_pflag_data_direct }, }; static int mlx5e_handle_pflag(struct net_device *netdev, -- 2.44.0