[dpdk-dev] [PATCH v3] net/mlx4: support CRC strip toggling
Adrien Mazarguil
adrien.mazarguil at 6wind.com
Mon Mar 26 11:34:33 CEST 2018
On Sun, Mar 25, 2018 at 08:19:29PM +0000, Ophir Munk wrote:
> 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 at mellanox.com>
> ---
> v1: initial version
> v2: following internal reviews
> v3: following dpdk.org mailing list reviews
Except for the remaining extra space mentioned below :)
Acked-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
<snip>
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index ee93daf..eea6e93 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);
I know the extra space before IBV_RAW_PACKET_CAP_SCATTER_FCS is present in
the original mlx5 code, but it's misaligned there also. This line should be
aligned with "device_attr_ex.raw_packet_caps" for consistency.
--
Adrien Mazarguil
6WIND
More information about the dev
mailing list