[ofa-general] [PATCH 3/16] ib/core: Add checksum support to ib core

Eli Cohen eli at mellanox.co.il
Wed Jan 16 08:37:39 PST 2008


Add checksum support to ib core

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 include/rdma/ib_verbs.h |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 11f3960..afd4d71 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -95,7 +95,14 @@ enum ib_device_cap_flags {
 	IB_DEVICE_N_NOTIFY_CQ		= (1<<14),
 	IB_DEVICE_ZERO_STAG		= (1<<15),
 	IB_DEVICE_SEND_W_INV		= (1<<16),
-	IB_DEVICE_MEM_WINDOW		= (1<<17)
+	IB_DEVICE_MEM_WINDOW		= (1<<17),
+	/*
+	 * devices which publish this capability must support insertion of UDP
+	 * and TCP checksum on outgoing packets and can verify the validity of
+	 * checksum for incoming packets. Setting this flag implies the driver
+	 * may set NETIF_F_IP_CSUM or NETIF_F_IPV6_CSUM.
+	 */
+	IB_DEVICE_IP_CSUM		= (1<<18),
 };
 
 enum ib_atomic_cap {
@@ -431,6 +438,7 @@ struct ib_wc {
 	u8			sl;
 	u8			dlid_path_bits;
 	u8			port_num;	/* valid only for DR SMPs on switches */
+	int			csum_ok;
 };
 
 enum ib_cq_notify_flags {
@@ -615,7 +623,8 @@ enum ib_send_flags {
 	IB_SEND_FENCE		= 1,
 	IB_SEND_SIGNALED	= (1<<1),
 	IB_SEND_SOLICITED	= (1<<2),
-	IB_SEND_INLINE		= (1<<3)
+	IB_SEND_INLINE		= (1<<3),
+	IB_SEND_IP_CSUM         = (1<<4)
 };
 
 struct ib_sge {
-- 
1.5.3.8





More information about the general mailing list