net/mlx5: add GENEVE in tunnel offloads capabilities
authorSuanming Mou <suanmingm@mellanox.com>
Tue, 26 Nov 2019 14:06:05 +0000 (16:06 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 26 Nov 2019 17:22:27 +0000 (18:22 +0100)
GENEVE is available in tunnel offloads. Add it as the default support
option.

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_txq.c

index 787ad00..d84a6f9 100644 (file)
@@ -2256,7 +2256,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
                tunnel_en = ((dv_attr.tunnel_offloads_caps &
                              MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_VXLAN) &&
                             (dv_attr.tunnel_offloads_caps &
-                             MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE));
+                             MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GRE) &&
+                            (dv_attr.tunnel_offloads_caps &
+                             MLX5DV_RAW_PACKET_CAP_TUNNELED_OFFLOAD_GENEVE));
        }
        DRV_LOG(DEBUG, "tunnel offloading is %ssupported",
                tunnel_en ? "" : "not ");
index 5e45748..bac4f71 100644 (file)
@@ -127,7 +127,8 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
                        offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
                if (config->tso)
                        offloads |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
-                                    DEV_TX_OFFLOAD_GRE_TNL_TSO);
+                                    DEV_TX_OFFLOAD_GRE_TNL_TSO |
+                                    DEV_TX_OFFLOAD_GENEVE_TNL_TSO);
        }
        return offloads;
 }