summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorOphir Munk <ophirmu@mellanox.com>2018-03-25 20:19:29 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-04-14 00:43:30 +0200
commitde1df14e6e6ecfe84e125ccfd5f9109e69147e0f (patch)
treea464cc99110fc6bf0c0de08a7b244522c989b014 /drivers/net/mlx4/mlx4.c
parentc8e254083245bccd8eefcba11f5a71f36d9a27a3 (diff)
downloaddpdk-de1df14e6e6ecfe84e125ccfd5f9109e69147e0f.zip
dpdk-de1df14e6e6ecfe84e125ccfd5f9109e69147e0f.tar.gz
dpdk-de1df14e6e6ecfe84e125ccfd5f9109e69147e0f.tar.xz
net/mlx4: support CRC strip toggling
Previous to this commit mlx4 CRC stripping was executed by default and there was no verbs API to disable it. Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index f389e66..06f1770 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -562,7 +562,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
(device_attr.vendor_part_id ==
PCI_DEVICE_ID_MELLANOX_CONNECTX3PRO);
DEBUG("L2 tunnel checksum offloads are %ssupported",
- (priv->hw_csum_l2tun ? "" : "not "));
+ priv->hw_csum_l2tun ? "" : "not ");
priv->hw_rss_sup = device_attr_ex.rss_caps.rx_hash_fields_mask;
if (!priv->hw_rss_sup) {
WARN("no RSS capabilities reported; disabling support"
@@ -578,6 +578,10 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
}
DEBUG("supported RSS hash fields mask: %016" PRIx64,
priv->hw_rss_sup);
+ priv->hw_fcs_strip = !!(device_attr_ex.raw_packet_caps &
+ IBV_RAW_PACKET_CAP_SCATTER_FCS);
+ DEBUG("FCS stripping toggling is %ssupported",
+ priv->hw_fcs_strip ? "" : "not ");
/* Configure the first MAC address by default. */
if (mlx4_get_mac(priv, &mac.addr_bytes)) {
ERROR("cannot get MAC address, is mlx4_en loaded?"