Commit 62f1e84e authored by Niranjana Vishwanathapura's avatar Niranjana Vishwanathapura Committed by Doug Ledford

IB/opa_vnic: Mark unused Ethernet MTU fields as reserved

Per pcp mtu fields are not used, mark them as reserved.
Reviewed-by: default avatarSudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: default avatarNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent e19b205b
...@@ -111,8 +111,7 @@ ...@@ -111,8 +111,7 @@
* @pkey: partition key * @pkey: partition key
* @u_mcast_dlid: unknown multicast dlid * @u_mcast_dlid: unknown multicast dlid
* @u_ucast_dlid: array of unknown unicast dlids * @u_ucast_dlid: array of unknown unicast dlids
* @eth_mtu: MTUs for each vlan PCP * @eth_mtu: Ethernet MTU
* @eth_mtu_non_vlan: MTU for non vlan packets
*/ */
struct opa_vesw_info { struct opa_vesw_info {
__be16 fabric_id; __be16 fabric_id;
...@@ -128,9 +127,8 @@ struct opa_vesw_info { ...@@ -128,9 +127,8 @@ struct opa_vesw_info {
__be32 u_mcast_dlid; __be32 u_mcast_dlid;
__be32 u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT]; __be32 u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT];
u8 rsvd3[44]; u8 rsvd3[60];
__be16 eth_mtu[OPA_VNIC_MAX_NUM_PCP]; __be16 eth_mtu;
__be16 eth_mtu_non_vlan;
u8 rsvd4[2]; u8 rsvd4[2];
} __packed; } __packed;
......
...@@ -89,9 +89,8 @@ struct __opa_vesw_info { ...@@ -89,9 +89,8 @@ struct __opa_vesw_info {
u32 u_mcast_dlid; u32 u_mcast_dlid;
u32 u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT]; u32 u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT];
u8 rsvd3[44]; u8 rsvd3[60];
u16 eth_mtu[OPA_VNIC_MAX_NUM_PCP]; u16 eth_mtu;
u16 eth_mtu_non_vlan;
u8 rsvd4[2]; u8 rsvd4[2];
} __packed; } __packed;
......
...@@ -140,7 +140,7 @@ void opa_vnic_process_vema_config(struct opa_vnic_adapter *adapter) ...@@ -140,7 +140,7 @@ void opa_vnic_process_vema_config(struct opa_vnic_adapter *adapter)
/* Handle MTU limit change */ /* Handle MTU limit change */
rtnl_lock(); rtnl_lock();
netdev->max_mtu = max_t(unsigned int, info->vesw.eth_mtu_non_vlan, netdev->max_mtu = max_t(unsigned int, info->vesw.eth_mtu,
netdev->min_mtu); netdev->min_mtu);
if (netdev->mtu > netdev->max_mtu) if (netdev->mtu > netdev->max_mtu)
dev_set_mtu(netdev, netdev->max_mtu); dev_set_mtu(netdev, netdev->max_mtu);
......
...@@ -177,10 +177,7 @@ void opa_vnic_get_vesw_info(struct opa_vnic_adapter *adapter, ...@@ -177,10 +177,7 @@ void opa_vnic_get_vesw_info(struct opa_vnic_adapter *adapter,
info->u_ucast_dlid[i] = cpu_to_be32(src->u_ucast_dlid[i]); info->u_ucast_dlid[i] = cpu_to_be32(src->u_ucast_dlid[i]);
memcpy(info->rsvd3, src->rsvd3, ARRAY_SIZE(src->rsvd3)); memcpy(info->rsvd3, src->rsvd3, ARRAY_SIZE(src->rsvd3));
for (i = 0; i < OPA_VNIC_MAX_NUM_PCP; i++) info->eth_mtu = cpu_to_be16(src->eth_mtu);
info->eth_mtu[i] = cpu_to_be16(src->eth_mtu[i]);
info->eth_mtu_non_vlan = cpu_to_be16(src->eth_mtu_non_vlan);
memcpy(info->rsvd4, src->rsvd4, ARRAY_SIZE(src->rsvd4)); memcpy(info->rsvd4, src->rsvd4, ARRAY_SIZE(src->rsvd4));
} }
...@@ -212,10 +209,7 @@ void opa_vnic_set_vesw_info(struct opa_vnic_adapter *adapter, ...@@ -212,10 +209,7 @@ void opa_vnic_set_vesw_info(struct opa_vnic_adapter *adapter,
dst->u_ucast_dlid[i] = be32_to_cpu(info->u_ucast_dlid[i]); dst->u_ucast_dlid[i] = be32_to_cpu(info->u_ucast_dlid[i]);
memcpy(dst->rsvd3, info->rsvd3, ARRAY_SIZE(info->rsvd3)); memcpy(dst->rsvd3, info->rsvd3, ARRAY_SIZE(info->rsvd3));
for (i = 0; i < OPA_VNIC_MAX_NUM_PCP; i++) dst->eth_mtu = be16_to_cpu(info->eth_mtu);
dst->eth_mtu[i] = be16_to_cpu(info->eth_mtu[i]);
dst->eth_mtu_non_vlan = be16_to_cpu(info->eth_mtu_non_vlan);
memcpy(dst->rsvd4, info->rsvd4, ARRAY_SIZE(info->rsvd4)); memcpy(dst->rsvd4, info->rsvd4, ARRAY_SIZE(info->rsvd4));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment