path: root/drivers/net/mlx5/mlx5_rxq.c
diff options
authorShahaf Shuler <>2018-02-25 09:28:37 +0200
committerFerruh Yigit <>2018-03-30 14:08:42 +0200
commit038e72511f2147c238ff1cb021c82d74efcf630f (patch)
treecbeac918ce5df5c35476ec6e517fdd4a234bdfd6 /drivers/net/mlx5/mlx5_rxq.c
parentc55a1667950f43be515c976269749a2a00c7268d (diff)
net/mlx5: fix tunnel offloads cap query
The query for the tunnel stateless offloads is wrongly implemented because of: 1. It was using the device id to query for the offloads. 2. It was using a compilation flag for Verbs which no longer exits. The main reason was lack of proper API from Verbs. Fixing the query to use rdma-core API. The capability returned from rdma-core refer to both Tx and Rx sides. Eventhough there is a separate cap for GRE and VXLAN, implementation merge them into a single flag in order to simplify the checks on the data path. Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core") Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets") Cc: Signed-off-by: Shahaf Shuler <> Acked-by: Yongseok Koh <> Acked-by: Xueming Li <> Acked-by: Nelio Laranjeiro <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxq.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index ff58c49..238fa7e 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1006,7 +1006,7 @@ mlx5_priv_rxq_new(struct priv *priv, uint16_t idx, uint16_t desc,
/* Toggle RX checksum offload if hardware supports it. */
tmpl->rxq.csum = !!(conf->offloads & DEV_RX_OFFLOAD_CHECKSUM);
tmpl->rxq.csum_l2tun = (!!(conf->offloads & DEV_RX_OFFLOAD_CHECKSUM) &&
- priv->config.hw_csum_l2tun);
+ priv->config.tunnel_en);
tmpl->rxq.hw_timestamp = !!(conf->offloads & DEV_RX_OFFLOAD_TIMESTAMP);
/* Configure VLAN stripping. */
tmpl->rxq.vlan_strip = !!(conf->offloads & DEV_RX_OFFLOAD_VLAN_STRIP);