DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com
Cc: dev@dpdk.org, shacharbe@mellanox.com
Subject: [dpdk-dev] [PATCH] net/mlx5: fix checksum offload cap
Date: Wed,  4 Oct 2017 11:28:43 +0300	[thread overview]
Message-ID: <20171004082843.66576-1-shahafs@mellanox.com> (raw)

The PMD was using the wrong flag to query device checksum capabilities

Fixes: bba710e6b99b ("net/mlx5: support upstream rdma-core")
Cc: shacharbe@mellanox.com

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 229b824bc..a4b718417 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -649,8 +649,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		}
 
 		priv->hw_csum =
-			((device_attr_ex.device_cap_flags_ex &
-			  IBV_DEVICE_UD_IP_CSUM));
+			!!(device_attr_ex.device_cap_flags_ex &
+			   IBV_DEVICE_RAW_IP_CSUM);
 		DEBUG("checksum offloading is %ssupported",
 		      (priv->hw_csum ? "" : "not "));
 
-- 
2.12.0

             reply	other threads:[~2017-10-04  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04  8:28 Shahaf Shuler [this message]
2017-10-04 12:02 ` Nélio Laranjeiro
2017-10-05  0:56   ` Ferruh Yigit
2017-10-05 18:05     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171004082843.66576-1-shahafs@mellanox.com \
    --to=shahafs@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=shacharbe@mellanox.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).