On 10/06/2011 03:57 AM, michaelc@xxxxxxxxxxx wrote: > From: Mike Christie <michaelc@xxxxxxxxxxx> > > Userspace was sending the priority/id part of the vlan tag > and sysfs was displaying the id in the vlan file. This > renames the vlan sysfs file to vlan_id to reflect that it > was showing the id and to match the vlan_priority file. > This also adds a ISCSI_NET_PARAM_VLAN_TAG iscsi nl command > to relfect that we are sending down the vlan/priority > part of the tag. I really messed up this patch. I think I sent the wrong one. This version of the patch is bad. It does not convert the qla4xxx ipv4 path and I forgot my signed off. Please use the v2 version of the patch attached.
>From 3cd1fad791eb63734d3eeb9df8cd17fb6274f352 Mon Sep 17 00:00:00 2001 From: Mike Christie <michaelc@xxxxxxxxxxx> Date: Tue, 11 Oct 2011 17:51:44 -0500 Subject: [PATCH 1/1] iscsi class: fix vlan configuration v2 Userspace was sending the priority/id part of the vlan tag and sysfs was displaying the id in the vlan file. This renames the vlan sysfs file to vlan_id to reflect that it was showing the id and to match the vlan_priority file. This also adds a ISCSI_NET_PARAM_VLAN_TAG iscsi nl command to relfect that we are sending down the vlan/priority part of the tag. v2: - convert both qla4xx ipv4 and ipv6 paths. - add signed off Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx> --- drivers/scsi/qla4xxx/ql4_os.c | 4 ++-- drivers/scsi/scsi_transport_iscsi.c | 6 +++--- include/scsi/iscsi_if.h | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index f1bdc56..7f55109 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -718,7 +718,7 @@ static void qla4xxx_set_ipv6(struct scsi_qla_host *ha, qla4xxx_destroy_ipv6_iface(ha); } break; - case ISCSI_NET_PARAM_VLAN_ID: + case ISCSI_NET_PARAM_VLAN_TAG: if (iface_param->len != sizeof(init_fw_cb->ipv6_vlan_tag)) break; init_fw_cb->ipv6_vlan_tag = @@ -790,7 +790,7 @@ static void qla4xxx_set_ipv4(struct scsi_qla_host *ha, qla4xxx_destroy_ipv4_iface(ha); } break; - case ISCSI_NET_PARAM_VLAN_ID: + case ISCSI_NET_PARAM_VLAN_TAG: if (iface_param->len != sizeof(init_fw_cb->ipv4_vlan_tag)) break; init_fw_cb->ipv4_vlan_tag = diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 142a09a..1bcd65a 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -322,7 +322,7 @@ iscsi_iface_net_attr(ipv6_iface, link_local_autocfg, /* common read only iface attribute */ iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE); -iscsi_iface_net_attr(iface, vlan, ISCSI_NET_PARAM_VLAN_ID); +iscsi_iface_net_attr(iface, vlan_id, ISCSI_NET_PARAM_VLAN_ID); iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY); iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED); iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU); @@ -338,7 +338,7 @@ static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, if (attr == &dev_attr_iface_enabled.attr) param = ISCSI_NET_PARAM_IFACE_ENABLE; - else if (attr == &dev_attr_iface_vlan.attr) + else if (attr == &dev_attr_iface_vlan_id.attr) param = ISCSI_NET_PARAM_VLAN_ID; else if (attr == &dev_attr_iface_vlan_priority.attr) param = ISCSI_NET_PARAM_VLAN_PRIORITY; @@ -382,7 +382,7 @@ static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, static struct attribute *iscsi_iface_attrs[] = { &dev_attr_iface_enabled.attr, - &dev_attr_iface_vlan.attr, + &dev_attr_iface_vlan_id.attr, &dev_attr_iface_vlan_priority.attr, &dev_attr_iface_vlan_enabled.attr, &dev_attr_ipv4_iface_ipaddress.attr, diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 706a1bb..2703e3b 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h @@ -311,10 +311,11 @@ enum iscsi_net_param { ISCSI_NET_PARAM_VLAN_ID = 13, ISCSI_NET_PARAM_VLAN_PRIORITY = 14, ISCSI_NET_PARAM_VLAN_ENABLED = 15, - ISCSI_NET_PARAM_IFACE_TYPE = 16, - ISCSI_NET_PARAM_IFACE_NAME = 17, - ISCSI_NET_PARAM_MTU = 18, - ISCSI_NET_PARAM_PORT = 19, + ISCSI_NET_PARAM_VLAN_TAG = 16, + ISCSI_NET_PARAM_IFACE_TYPE = 17, + ISCSI_NET_PARAM_IFACE_NAME = 18, + ISCSI_NET_PARAM_MTU = 19, + ISCSI_NET_PARAM_PORT = 20, }; enum iscsi_conn_state { -- 1.7.6