Skip to contentSkip to conversation

cxgb3 - manage private iSCSI IP address

PATCH In review Karen Xie 1 participant 1 message Dec 9, 2008

Subsystems (2)
lore
Share & tools
lore

Karen Xie

author
#0 lore raw

PATCH v2 1/2 cxgb3 - manage private iSCSI IP address

[PATCH v2 1/2 2.6.29] cxgb3 - manage private iSCSI IP address

From: Karen Xie <[email protected]>

The accelerated iSCSI traffic could use a private IP address unknown to the OS:
- The IP address is required in both drivers to manage ARP requests and connection set up.
- Added an control call to retrieve the ip address.
- Reply to ARP requests dedicated to the private IP address.

---

 drivers/net/cxgb3/adapter.h        |    1 +
 drivers/net/cxgb3/cxgb3_ctl_defs.h |    7 ++++
 drivers/net/cxgb3/cxgb3_main.c     |    1 +
 drivers/net/cxgb3/cxgb3_offload.c  |   65 ++++++++++++++++++++++++---------
 drivers/net/cxgb3/sge.c            |   72 ++++++++++++++++++++++++++++++++++--
 5 files changed, 124 insertions(+), 22 deletions(-)
drivers/net/cxgb3/adapter.h +1 -0
index bc8e241..0c60f40 100644
@@ -63,6 +63,7 @@ struct port_info {
 	struct link_config link_config;
 	struct net_device_stats netstats;
 	int activity;
+	__be32 iscsi_ipv4addr;
 };
 
 enum {				/* adapter flags */
drivers/net/cxgb3/cxgb3_ctl_defs.h +7 -0
index 1d8d46e..58b5bf9 100644
@@ -57,6 +57,7 @@ enum {
 	RDMA_GET_MIB		= 19,
 
 	GET_RX_PAGE_INFO	= 50,
+	GET_ISCSI_IPV4ADDR	= 51,
 };
 
 /*
@@ -86,6 +87,12 @@ struct iff_mac {
 	u16 vlan_tag;
 };
 
+/* Structure used to request a port's iSCSI IPv4 address */
+struct iscsi_ipv4addr {
+	struct net_device *dev; /* the net_device */
+	__be32 ipv4addr;	/* the return iSCSI IPv4 address */
+};
+
 struct pci_dev;
 
 /*
drivers/net/cxgb3/cxgb3_main.c +1 -0
index 2c341f8..809aa9f 100644
@@ -34,6 +34,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
+#include <linux/inet.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/if_vlan.h>
drivers/net/cxgb3/cxgb3_offload.c +48 -17

92 lines not on this page · raw message

drivers/net/cxgb3/sge.c +67 -5

108 lines not on this page · raw message