X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc.h;h=7f11bf22d082a1e85913c9c895f640c3f0319752;hb=4ad5b94e0d13771a48cdf395d0c8b26e5f8cbe91;hp=cee1eb8492f3d82e4e4e37ee39ae5c087ff30fae;hpb=c577a525d2f34c5588065ae44a8e1c689e909f58;p=dpdk.git diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h index cee1eb8492..7f11bf22d0 100644 --- a/drivers/net/sfc/sfc.h +++ b/drivers/net/sfc/sfc.h @@ -34,6 +34,8 @@ #include +#include +#include #include #include #include @@ -46,12 +48,7 @@ extern "C" { #endif -#define SFC_DEV_TO_PCI(eth_dev) \ - RTE_DEV_TO_PCI((eth_dev)->device) - #if EFSYS_OPT_RX_SCALE -/** RSS key length (bytes) */ -#define SFC_RSS_KEY_SIZE 40 /** RSS hash offloads mask */ #define SFC_RSS_OFFLOADS (ETH_RSS_IP | ETH_RSS_TCP) #endif @@ -64,20 +61,20 @@ extern "C" { * V | * +---------------+------------+ * | INITIALIZED | - * +---------------+<-----------+ - * |.dev_configure | - * V | - * +---------------+ | - * | CONFIGURING |------------^ - * +---------------+ failed | - * |success | - * | +---------------+ - * | | CLOSING | - * | +---------------+ - * | ^ - * V |.dev_close - * +---------------+------------+ - * | CONFIGURED | + * +---------------+<-----------<---------------+ + * |.dev_configure | | + * V |failed | + * +---------------+------------+ | + * | CONFIGURING | | + * +---------------+----+ | + * |success | | + * | | +---------------+ + * | | | CLOSING | + * | | +---------------+ + * | | ^ + * V |.dev_configure | + * +---------------+----+ |.dev_close + * | CONFIGURED |----------------------------+ * +---------------+<-----------+ * |.dev_start | * V | @@ -153,6 +150,11 @@ struct sfc_port { boolean_t flow_ctrl_autoneg; size_t pdu; + /* + * Flow API isolated mode overrides promisc and allmulti settings; + * they won't be applied if isolated mode is active + */ + boolean_t isolated; boolean_t promisc; boolean_t allmulti; @@ -162,6 +164,7 @@ struct sfc_port { rte_spinlock_t mac_stats_lock; uint64_t *mac_stats_buf; + unsigned int mac_stats_nb_supported; efsys_mem_t mac_stats_dma_mem; boolean_t mac_stats_reset_pending; uint16_t mac_stats_update_period_ms; @@ -182,6 +185,8 @@ struct sfc_adapter { */ rte_spinlock_t lock; enum sfc_adapter_state state; + struct rte_pci_addr pci_addr; + uint16_t port_id; struct rte_eth_dev *eth_dev; struct rte_kvargs *kvargs; bool debug_init; @@ -219,14 +224,25 @@ struct sfc_adapter { unsigned int rss_channels; #if EFSYS_OPT_RX_SCALE - efx_rx_scale_support_t rss_support; + efx_rx_scale_context_type_t rss_support; efx_rx_hash_support_t hash_support; efx_rx_hash_type_t rss_hash_types; unsigned int rss_tbl[EFX_RSS_TBL_SIZE]; - uint8_t rss_key[SFC_RSS_KEY_SIZE]; + uint8_t rss_key[EFX_RSS_KEY_SIZE]; #endif + /* + * Shared memory copy of the Rx datapath name to be used by + * the secondary process to find Rx datapath to be used. + */ + char *dp_rx_name; const struct sfc_dp_rx *dp_rx; + + /* + * Shared memory copy of the Tx datapath name to be used by + * the secondary process to find Rx datapath to be used. + */ + char *dp_tx_name; const struct sfc_dp_tx *dp_tx; };