[ofa-general] [PATCH 3 of 17] ib_core: add checksum offload support

Eli Cohen eli at mellanox.co.il
Tue Sep 11 08:54:04 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: ofa_1_3_dev_kernel/include/rdma/ib_verbs.h
===================================================================
--- ofa_1_3_dev_kernel.orig/include/rdma/ib_verbs.h	2007-09-11 21:14:35.000000000 +0300
+++ ofa_1_3_dev_kernel/include/rdma/ib_verbs.h	2007-09-11 21:15:25.000000000 +0300
@@ -95,7 +95,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 {
@@ -431,6 +432,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 {
@@ -615,7 +618,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