提交 8c7d40fb 编写于 作者: V Vikas Chaudhary 提交者: James Bottomley

[SCSI] scsi_transport_iscsi: Added support to update mtu

Signed-off-by: NVikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 2a991c21
...@@ -323,6 +323,7 @@ iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE); ...@@ -323,6 +323,7 @@ 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, ISCSI_NET_PARAM_VLAN_ID);
iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY); 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, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED);
iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU);
static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int i) struct attribute *attr, int i)
...@@ -340,6 +341,8 @@ static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj, ...@@ -340,6 +341,8 @@ static mode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
param = ISCSI_NET_PARAM_VLAN_PRIORITY; param = ISCSI_NET_PARAM_VLAN_PRIORITY;
else if (attr == &dev_attr_iface_vlan_enabled.attr) else if (attr == &dev_attr_iface_vlan_enabled.attr)
param = ISCSI_NET_PARAM_VLAN_ENABLED; param = ISCSI_NET_PARAM_VLAN_ENABLED;
else if (attr == &dev_attr_iface_mtu.attr)
param = ISCSI_NET_PARAM_MTU;
else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4) { else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4) {
if (attr == &dev_attr_ipv4_iface_ipaddress.attr) if (attr == &dev_attr_ipv4_iface_ipaddress.attr)
param = ISCSI_NET_PARAM_IPV4_ADDR; param = ISCSI_NET_PARAM_IPV4_ADDR;
...@@ -386,6 +389,7 @@ static struct attribute *iscsi_iface_attrs[] = { ...@@ -386,6 +389,7 @@ static struct attribute *iscsi_iface_attrs[] = {
&dev_attr_ipv6_iface_router_addr.attr, &dev_attr_ipv6_iface_router_addr.attr,
&dev_attr_ipv6_iface_ipaddr_autocfg.attr, &dev_attr_ipv6_iface_ipaddr_autocfg.attr,
&dev_attr_ipv6_iface_linklocal_autocfg.attr, &dev_attr_ipv6_iface_linklocal_autocfg.attr,
&dev_attr_iface_mtu.attr,
NULL, NULL,
}; };
......
...@@ -313,6 +313,7 @@ enum iscsi_net_param { ...@@ -313,6 +313,7 @@ enum iscsi_net_param {
ISCSI_NET_PARAM_VLAN_ENABLED = 15, ISCSI_NET_PARAM_VLAN_ENABLED = 15,
ISCSI_NET_PARAM_IFACE_TYPE = 16, ISCSI_NET_PARAM_IFACE_TYPE = 16,
ISCSI_NET_PARAM_IFACE_NAME = 17, ISCSI_NET_PARAM_IFACE_NAME = 17,
ISCSI_NET_PARAM_MTU = 18,
}; };
enum iscsi_conn_state { enum iscsi_conn_state {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册