[PATCH 2/3 2.6.28] cxgb3 - add ioctl to set iscsi ipv4 address.

From: Karen Xie <[EMAIL PROTECTED]>

add ioctl to set private ipv4 address for iscsi traffic.

This patch is based on the cxgb3 branch of the git tree.

Signed-off-by: Karen Xie <[EMAIL PROTECTED]>
---

 drivers/net/cxgb3/cxgb3_ctl_defs.h |    2 ++
 drivers/net/cxgb3/cxgb3_offload.c  |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/drivers/net/cxgb3/cxgb3_ctl_defs.h 
b/drivers/net/cxgb3/cxgb3_ctl_defs.h
index 2bf5027..4df0d91 100644
--- a/drivers/net/cxgb3/cxgb3_ctl_defs.h
+++ b/drivers/net/cxgb3/cxgb3_ctl_defs.h
@@ -57,7 +57,9 @@ enum {
        RDMA_GET_MIB            = 19,
 
        GET_RX_PAGE_INFO        = 50,
+
        GET_ISCSI_IPV4ADDR      = 51,
+       SET_ISCSI_IPV4ADDR      = 52,
 };
 
 /*
diff --git a/drivers/net/cxgb3/cxgb3_offload.c 
b/drivers/net/cxgb3/cxgb3_offload.c
index f8f4faa..723fa6d 100644
--- a/drivers/net/cxgb3/cxgb3_offload.c
+++ b/drivers/net/cxgb3/cxgb3_offload.c
@@ -413,6 +413,12 @@ static int cxgb_offload_ctl(struct t3cdev *tdev, unsigned 
int req, void *data)
                p->ipv4addr = pi->iscsi_ipv4addr;
                break;
        }
+       case SET_ISCSI_IPV4ADDR: {
+               struct iscsi_ipv4addr *p = data;
+               struct port_info *pi = netdev_priv(p->dev);
+               pi->iscsi_ipv4addr = p->ipv4addr;
+               break;
+       }
        default:
                return -EOPNOTSUPP;
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to