Commit 72dc7614 authored by Vishwanathapura, Niranjana's avatar Vishwanathapura, Niranjana Committed by Doug Ledford

IB/opa-vnic: VNIC Ethernet Management (EM) structure definitions

Define VNIC EM MAD structures and the associated macros. These structures
are used for information exchange between VNIC EM agent (EMA) on the host
and the Ethernet manager. These include the virtual ethernet switch (vesw)
port information, vesw port mac table, summay and error counters,
vesw port interface mac lists and the EMA trap.
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: default avatarSadanand Warrier <sadanand.warrier@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 7d6f728c
......@@ -72,6 +72,8 @@ struct opa_vnic_adapter;
/**
* struct __opa_vesw_info - OPA vnic virtual switch info
*
* Same as opa_vesw_info without bitwise attribute.
*/
struct __opa_vesw_info {
u16 fabric_id;
......@@ -95,6 +97,8 @@ struct __opa_vesw_info {
/**
* struct __opa_per_veswport_info - OPA vnic per port info
*
* Same as opa_per_veswport_info without bitwise attribute.
*/
struct __opa_per_veswport_info {
u32 port_num;
......@@ -133,12 +137,29 @@ struct __opa_per_veswport_info {
/**
* struct __opa_veswport_info - OPA vnic port info
*
* Same as opa_veswport_info without bitwise attribute.
*/
struct __opa_veswport_info {
struct __opa_vesw_info vesw;
struct __opa_per_veswport_info vport;
};
/**
* struct __opa_veswport_trap - OPA vnic trap info
*
* Same as opa_veswport_trap without bitwise attribute.
*/
struct __opa_veswport_trap {
u16 fabric_id;
u16 veswid;
u32 veswportnum;
u16 opaportnum;
u8 veswportindex;
u8 opcode;
u32 reserved;
} __packed;
/**
* struct opa_vnic_adapter - OPA VNIC netdev private data structure
* @netdev: pointer to associated netdev
......@@ -175,6 +196,18 @@ struct opa_vnic_adapter {
#define v_warn(format, arg...) \
netdev_warn(adapter->netdev, format, ## arg)
/* The maximum allowed entries in the mac table */
#define OPA_VNIC_MAC_TBL_MAX_ENTRIES 2048
/* Limit of smac entries in mac table */
#define OPA_VNIC_MAX_SMAC_LIMIT 256
/* The last octet of the MAC address is used as the key to the hash table */
#define OPA_VNIC_MAC_HASH_IDX 5
/* The VNIC MAC hash table is of size 2^8 */
#define OPA_VNIC_MAC_TBL_HASH_BITS 8
#define OPA_VNIC_MAC_TBL_SIZE BIT(OPA_VNIC_MAC_TBL_HASH_BITS)
struct opa_vnic_adapter *opa_vnic_add_netdev(struct ib_device *ibdev,
u8 port_num, u8 vport_num);
void opa_vnic_rem_netdev(struct opa_vnic_adapter *adapter);
......
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