Michael Chan wrote:
> 
> On Mon, 2009-06-22 at 16:51 -0700, Benjamin Li wrote:
>> On Mon, 2009-06-22 at 05:59 -0700, Rakesh Ranjan wrote:
>>> 4. Get rid of ISCSI_NL_GRP_UIP netlink message and use
>>> ISCSI_NL_GRP_ISCSID instead. Move the netlink processing in nic_nl.c
>>> into netlink.
>> Correct, it is safe to remove ISCSI_NL_GRP_UIP because we could then
>> rely on ISCSI_NL_GRP_ISCSID instead.  netlink.c::ctldev_handle() would
>> need to be modified to handle 'ISCSI_KEVENT_PATH_REQ' and
>> 'ISCSI_KEVENT_IF_DOWN'
> 
> This will be an ABI change.  The 2.6.31 kernel today is using the 2
> multicast groups.  If we decide a single multicast group is better, I
> think we need to change the kernel code now.
> 
> Mike, how do we do this?
> 

The patch would just be something like the attached, right? If that is 
what you agree on, then we can send it now.

If you guys think we need to wait and make sure it is the right path, I 
think we can wait and break ABI here though. bnx2i/open-iscsi is a odd 
driver where a good chunk is in userspace and userspace is just not done 
in my opinion (there is no code in the upstream open-iscsi package and 
distros that add code that is not upstream take on this type of risk). I 
think the scsi maintainer might allow the change. I am not sure about 
Dave Miller though. He seems more strict.

Let me know what you want to do and I will ping James to make sure it is ok.

--~--~---------~--~----~------------~-------~--~----~
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 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index f3e6646..45b08f1 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -1011,7 +1011,7 @@ int iscsi_offload_mesg(struct Scsi_Host *shost,
 
 	memcpy((char *)ev + sizeof(*ev), data, data_size);
 
-	return iscsi_multicast_skb(skb, ISCSI_NL_GRP_UIP, GFP_NOIO);
+	return iscsi_multicast_skb(skb, ISCSI_NL_GRP_ISCSID, GFP_NOIO);
 }
 EXPORT_SYMBOL_GPL(iscsi_offload_mesg);
 
@@ -1438,7 +1438,7 @@ iscsi_set_path(struct iscsi_transport *transport, struct iscsi_uevent *ev)
 }
 
 static int
-iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, uint32_t *group)
+iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 {
 	int err = 0;
 	struct iscsi_uevent *ev = NLMSG_DATA(nlh);
@@ -1448,11 +1448,6 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, uint32_t *group)
 	struct iscsi_cls_conn *conn;
 	struct iscsi_endpoint *ep = NULL;
 
-	if (nlh->nlmsg_type == ISCSI_UEVENT_PATH_UPDATE)
-		*group = ISCSI_NL_GRP_UIP;
-	else
-		*group = ISCSI_NL_GRP_ISCSID;
-
 	priv = iscsi_if_transport_lookup(iscsi_ptr(ev->transport_handle));
 	if (!priv)
 		return -EINVAL;
@@ -1579,7 +1574,6 @@ iscsi_if_rx(struct sk_buff *skb)
 		uint32_t rlen;
 		struct nlmsghdr	*nlh;
 		struct iscsi_uevent *ev;
-		uint32_t group;
 
 		nlh = nlmsg_hdr(skb);
 		if (nlh->nlmsg_len < sizeof(*nlh) ||
@@ -1592,7 +1586,7 @@ iscsi_if_rx(struct sk_buff *skb)
 		if (rlen > skb->len)
 			rlen = skb->len;
 
-		err = iscsi_if_recv_msg(skb, nlh, &group);
+		err = iscsi_if_recv_msg(skb, nlh);
 		if (err) {
 			ev->type = ISCSI_KEVENT_IF_ERROR;
 			ev->iferror = err;
@@ -1606,8 +1600,9 @@ iscsi_if_rx(struct sk_buff *skb)
 			 */
 			if (ev->type == ISCSI_UEVENT_GET_STATS && !err)
 				break;
-			err = iscsi_if_send_reply(group, nlh->nlmsg_seq,
-				nlh->nlmsg_type, 0, 0, ev, sizeof(*ev));
+			err = iscsi_if_send_reply(ISCSI_NL_GRP_ISCSID,
+						nlh->nlmsg_seq, nlh->nlmsg_type,
+						0, 0, ev, sizeof(*ev));
 		} while (err < 0 && err != -ECONNREFUSED);
 		skb_pull(skb, rlen);
 	}
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 4426f00..da4fdff 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -26,7 +26,6 @@
 #include <linux/in6.h>
 
 #define ISCSI_NL_GRP_ISCSID	1
-#define ISCSI_NL_GRP_UIP	2
 
 #define UEVENT_BASE			10
 #define KEVENT_BASE			100

Reply via email to