X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnx2x%2Fbnx2x_vfpf.h;h=955ea9825c49f71f604631623a3fa2c3ae1b87a1;hb=ac7af39692acd2e3c8c17d8f3dc755ae1be84bbd;hp=94ce9f014b9a572f8dd8b477028d4c34c1967cc0;hpb=540a211084a7695a1c7bc43068934c140d6989be;p=dpdk.git diff --git a/drivers/net/bnx2x/bnx2x_vfpf.h b/drivers/net/bnx2x/bnx2x_vfpf.h index 94ce9f014b..955ea9825c 100644 --- a/drivers/net/bnx2x/bnx2x_vfpf.h +++ b/drivers/net/bnx2x/bnx2x_vfpf.h @@ -1,7 +1,11 @@ /* * Copyright (c) 2013-2015 Brocade Communications Systems, Inc. * + * Copyright (c) 2015 QLogic Corporation. * All rights reserved. + * www.qlogic.com + * + * See LICENSE.bnx2x_pmd for copyright and licensing details. */ #ifndef BNX2X_VFPF_H @@ -34,24 +38,40 @@ struct vf_resource_query { #define BNX2X_VF_Q_FLAG_DHC 0x0200 #define BNX2X_VF_Q_FLAG_LEADING_RSS 0x0400 -struct vf_first_tlv { +#define TLV_BUFFER_SIZE 1024 + +#define VFPF_RX_MASK_ACCEPT_NONE 0x00000000 +#define VFPF_RX_MASK_ACCEPT_MATCHED_UNICAST 0x00000001 +#define VFPF_RX_MASK_ACCEPT_MATCHED_MULTICAST 0x00000002 +#define VFPF_RX_MASK_ACCEPT_ALL_UNICAST 0x00000004 +#define VFPF_RX_MASK_ACCEPT_ALL_MULTICAST 0x00000008 +#define VFPF_RX_MASK_ACCEPT_BROADCAST 0x00000010 + +/* general tlv header (used for both vf->pf request and pf->vf response) */ +struct channel_tlv { uint16_t type; uint16_t length; +}; + +struct vf_first_tlv { + struct channel_tlv tl; uint32_t reply_offset; }; +struct tlv_buffer_size { + uint8_t tlv_buffer[TLV_BUFFER_SIZE]; +}; + /* tlv struct for all PF replies except acquire */ struct vf_common_reply_tlv { - uint16_t type; - uint16_t length; + struct channel_tlv tl; uint8_t status; uint8_t pad[3]; }; /* used to terminate and pad a tlv list */ struct channel_list_end_tlv { - uint16_t type; - uint16_t length; + struct channel_tlv tl; uint32_t pad; }; @@ -98,7 +118,7 @@ struct vf_resc { uint8_t num_vlan_filters; uint8_t num_mc_filters; uint8_t permanent_mac_addr[ETH_ALEN]; - uint8_t current_mac_addr[ETH_ALEN]; + struct ether_addr current_mac_addr; uint16_t pf_link_speed; uint32_t pf_link_supported; }; @@ -244,12 +264,14 @@ union query_tlvs { struct vf_release_tlv release; struct vf_rss_tlv update_rss; struct channel_list_end_tlv list_end; + struct tlv_buffer_size tlv_buf_size; }; union resp_tlvs { struct vf_common_reply_tlv common_reply; struct vf_acquire_resp_tlv acquire_resp; struct channel_list_end_tlv list_end; + struct tlv_buffer_size tlv_buf_size; }; /* struct allocated by VF driver, PF sends updates to VF via bulletin */ @@ -300,6 +322,7 @@ enum channel_tlvs { BNX2X_VF_TLV_PF_SET_MAC, BNX2X_VF_TLV_PF_SET_VLAN, BNX2X_VF_TLV_UPDATE_RSS, + BNX2X_VF_TLV_PHYS_PORT_ID, BNX2X_VF_TLV_MAX }; @@ -308,7 +331,6 @@ struct bnx2x_vf_mbx_msg { union resp_tlvs resp; }; -void bnx2x_add_tlv(void *tlvs_list, uint16_t offset, uint16_t type, uint16_t length); int bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set); int bnx2x_vf_config_rss(struct bnx2x_softc *sc, struct ecore_config_rss_params *params);