diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2012-01-11 12:03:51 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-03-08 15:34:27 -0500 |
commit | d927d505c59a0c7353343174e6225c43c61fba6d (patch) | |
tree | 8fe928291acb9c6975f7c03514566933edeef7d5 /drivers/infiniband/ulp/ipoib | |
parent | 3eae7c9f97415ac1f5ab5db4eeb03cde689eb427 (diff) |
IB: Change CQE "csum_ok" field to a bit flag
Use a bit in wc_flags rather then a whole integer to hold the
"checksum OK" flag. By itself, this change doesn't reduce the size of
struct ib_wc on 64bit machines -- it stays on 56 bytes because of
padding. However, it will allow to add more fields in the future
without enlarging the struct. Also, it will let us have a unified
approach with future libibverbs checksum offload reporting, because a
bit flag doesn't break the library ABI.
This patch was suggested during conversation with Liran Liss
<liranl@mellanox.com>.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 4115be54ba3b..5c1bc995e560 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -296,7 +296,8 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc) | |||
296 | dev->stats.rx_bytes += skb->len; | 296 | dev->stats.rx_bytes += skb->len; |
297 | 297 | ||
298 | skb->dev = dev; | 298 | skb->dev = dev; |
299 | if ((dev->features & NETIF_F_RXCSUM) && likely(wc->csum_ok)) | 299 | if ((dev->features & NETIF_F_RXCSUM) && |
300 | likely(wc->wc_flags & IB_WC_IP_CSUM_OK)) | ||
300 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 301 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
301 | 302 | ||
302 | napi_gro_receive(&priv->napi, skb); | 303 | napi_gro_receive(&priv->napi, skb); |