summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorMoti Haimovsky <motih@mellanox.com>2018-07-10 13:45:54 +0300
committerShahaf Shuler <shahafs@mellanox.com>2018-07-10 14:02:57 +0200
commitba576975a89bdfd186fbcc20a93d7ee16019dbf5 (patch)
tree22b9a4137b006579d054428be2b55bd3bb7ac1d1 /drivers/net/mlx4/mlx4.c
parent07581a7e4d090165dac67f02e0b16a5ed4086a4b (diff)
downloaddpdk-ba576975a89bdfd186fbcc20a93d7ee16019dbf5.zip
dpdk-ba576975a89bdfd186fbcc20a93d7ee16019dbf5.tar.gz
dpdk-ba576975a89bdfd186fbcc20a93d7ee16019dbf5.tar.xz
net/mlx4: support hardware TSO
Implement support for hardware TSO. Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 06921c9..c67d2c0 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -677,6 +677,15 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
IBV_RAW_PACKET_CAP_SCATTER_FCS);
DEBUG("FCS stripping toggling is %ssupported",
priv->hw_fcs_strip ? "" : "not ");
+ priv->tso =
+ ((device_attr_ex.tso_caps.max_tso > 0) &&
+ (device_attr_ex.tso_caps.supported_qpts &
+ (1 << IBV_QPT_RAW_PACKET)));
+ if (priv->tso)
+ priv->tso_max_payload_sz =
+ device_attr_ex.tso_caps.max_tso;
+ DEBUG("TSO is %ssupported",
+ priv->tso ? "" : "not ");
/* Configure the first MAC address by default. */
err = mlx4_get_mac(priv, &mac.addr_bytes);
if (err) {