IB/opa_vnic: Mark unused Ethernet MTU fields as reserved
authorNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Tue, 26 Sep 2017 13:43:48 +0000 (06:43 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 27 Sep 2017 15:21:57 +0000 (11:21 -0400)
Per pcp mtu fields are not used, mark them as reserved.

Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
drivers/infiniband/ulp/opa_vnic/opa_vnic_internal.h
drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c
drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c

index 4c434b9dd84c904e875c45520b8c280e523e594f..be45697b8e60887ebbbc9fdd4eb400f5b210ea15 100644 (file)
  * @pkey: partition key
  * @u_mcast_dlid: unknown multicast dlid
  * @u_ucast_dlid: array of unknown unicast dlids
- * @eth_mtu: MTUs for each vlan PCP
- * @eth_mtu_non_vlan: MTU for non vlan packets
+ * @eth_mtu: Ethernet MTU
  */
 struct opa_vesw_info {
        __be16  fabric_id;
@@ -128,9 +127,8 @@ struct opa_vesw_info {
        __be32  u_mcast_dlid;
        __be32  u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT];
 
-       u8      rsvd3[44];
-       __be16  eth_mtu[OPA_VNIC_MAX_NUM_PCP];
-       __be16  eth_mtu_non_vlan;
+       u8      rsvd3[60];
+       __be16  eth_mtu;
        u8      rsvd4[2];
 } __packed;
 
index ca29e6d5aedc439f6adfbf7531680d4e4b1252ac..a90c63125671cc5ce3fb894d5eb96b723d96d946 100644 (file)
@@ -89,9 +89,8 @@ struct __opa_vesw_info {
        u32  u_mcast_dlid;
        u32  u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT];
 
-       u8   rsvd3[44];
-       u16  eth_mtu[OPA_VNIC_MAX_NUM_PCP];
-       u16  eth_mtu_non_vlan;
+       u8   rsvd3[60];
+       u16  eth_mtu;
        u8   rsvd4[2];
 } __packed;
 
index 1a3c25364b645e971d307763454ce17ffa1da2d4..41fd05baed828c75b81fc6bd31e2283dbfa89eb3 100644 (file)
@@ -140,7 +140,7 @@ void opa_vnic_process_vema_config(struct opa_vnic_adapter *adapter)
 
        /* Handle MTU limit change */
        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);
        if (netdev->mtu > netdev->max_mtu)
                dev_set_mtu(netdev, netdev->max_mtu);
index c2733964379ca69397569fca2125e54bd35a7b93..5856ae3a0d7b04a9085f6c0710139cb3cdd66f3a 100644 (file)
@@ -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]);
 
        memcpy(info->rsvd3, src->rsvd3, ARRAY_SIZE(src->rsvd3));
-       for (i = 0; i < OPA_VNIC_MAX_NUM_PCP; i++)
-               info->eth_mtu[i] = cpu_to_be16(src->eth_mtu[i]);
-
-       info->eth_mtu_non_vlan = cpu_to_be16(src->eth_mtu_non_vlan);
+       info->eth_mtu = cpu_to_be16(src->eth_mtu);
        memcpy(info->rsvd4, src->rsvd4, ARRAY_SIZE(src->rsvd4));
 }
 
@@ -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]);
 
        memcpy(dst->rsvd3, info->rsvd3, ARRAY_SIZE(info->rsvd3));
-       for (i = 0; i < OPA_VNIC_MAX_NUM_PCP; i++)
-               dst->eth_mtu[i] = be16_to_cpu(info->eth_mtu[i]);
-
-       dst->eth_mtu_non_vlan = be16_to_cpu(info->eth_mtu_non_vlan);
+       dst->eth_mtu = be16_to_cpu(info->eth_mtu);
        memcpy(dst->rsvd4, info->rsvd4, ARRAY_SIZE(info->rsvd4));
 }