[ofa-general] [PATCH -2] ib core - checksum offload

Eli Cohen eli at mellanox.co.il
Wed Aug 15 11:05:16 PDT 2007


Add checksum offload support to the core

Signed-off-by: Eli Cohen <eli at mellnaox.co.il>

---

A device that publishes IB_DEVICE_IP_CSUM actually supports
calculating checksum on transmit and provides indication whether
the checksum is OK on receive.

Index: linux-2.6.23-rc1/include/rdma/ib_verbs.h
===================================================================
--- linux-2.6.23-rc1.orig/include/rdma/ib_verbs.h	2007-08-15
20:50:16.000000000 +0300
+++ linux-2.6.23-rc1/include/rdma/ib_verbs.h	2007-08-15
20:50:28.000000000 +0300
@@ -93,7 +93,8 @@ 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),
+	IB_DEVICE_IP_CSUM		= (1<<18)
 };
 
 enum ib_atomic_cap {
@@ -429,6 +430,8 @@ struct ib_wc {
 	u8			sl;
 	u8			dlid_path_bits;
 	u8			port_num;	/* valid only for DR SMPs on switches */
+	u16			csum;
+	int			csum_ok;
 };
 
 enum ib_cq_notify_flags {
@@ -613,7 +616,9 @@ 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),
+	IB_SEND_UDP_TCP_CSUM    = (1<<5)
 };
 
 struct ib_sge {




More information about the general mailing list