From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v3] net/mlx4: support CRC strip toggling Date: Mon, 26 Mar 2018 11:34:33 +0200 Message-ID: <20180326093433.GD4011@6wind.com> References: <1521477410-8936-1-git-send-email-ophirmu@mellanox.com> <1522009169-13860-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Thomas Monjalon , Olga Shern , Shahaf shuler To: Ophir Munk Return-path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 17F16354D for ; Mon, 26 Mar 2018 11:34:47 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id p9so1580848wmc.3 for ; Mon, 26 Mar 2018 02:34:46 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1522009169-13860-1-git-send-email-ophirmu@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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 > 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