summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorXueming Li <xuemingl@mellanox.com>2018-04-08 20:41:20 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-04-27 17:34:43 +0100
commit5f8ba81c42283107f064aa6c5566ac8726b35f45 (patch)
tree702f772dfd042751aa5b017938984fb52f754eb3 /drivers/net/mlx5/mlx5_ethdev.c
parent593f472c40f64c9fbe7af7338598b4d2c58f95c0 (diff)
downloaddpdk-5f8ba81c42283107f064aa6c5566ac8726b35f45.zip
dpdk-5f8ba81c42283107f064aa6c5566ac8726b35f45.tar.gz
dpdk-5f8ba81c42283107f064aa6c5566ac8726b35f45.tar.xz
net/mlx5: support generic tunnel offloading
This commit adds support for generic tunnel TSO and checksum offload. PMD will compute the inner/outer headers offset according to the mbuf fields. Hardware will do calculation based on offsets and types. Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 8741df1..746b94f 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1090,11 +1090,14 @@ mlx5_select_tx_function(struct rte_eth_dev *dev)
int tso = !!(tx_offloads & (DEV_TX_OFFLOAD_TCP_TSO |
DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
DEV_TX_OFFLOAD_GRE_TNL_TSO));
+ int swp = !!(tx_offloads & (DEV_TX_OFFLOAD_IP_TNL_TSO |
+ DEV_TX_OFFLOAD_UDP_TNL_TSO |
+ DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM));
int vlan_insert = !!(tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT);
assert(priv != NULL);
/* Select appropriate TX function. */
- if (vlan_insert || tso)
+ if (vlan_insert || tso || swp)
return tx_pkt_burst;
if (config->mps == MLX5_MPW_ENHANCED) {
if (mlx5_check_vec_tx_support(dev) > 0) {