aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/sfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sfc/sfc.h')
-rw-r--r--drivers/net/sfc/sfc.h41
1 files changed, 26 insertions, 15 deletions
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 75575349..51be4403 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -27,11 +27,6 @@
extern "C" {
#endif
-#if EFSYS_OPT_RX_SCALE
-/** RSS hash offloads mask */
-#define SFC_RSS_OFFLOADS (ETH_RSS_IP | ETH_RSS_TCP)
-#endif
-
/*
* +---------------+
* | UNINITIALIZED |<-----------+
@@ -104,7 +99,7 @@ struct sfc_mcdi {
efsys_mem_t mem;
enum sfc_mcdi_state state;
efx_mcdi_transport_t transport;
- bool logging;
+ uint32_t logtype;
uint32_t proxy_handle;
efx_rc_t proxy_result;
};
@@ -156,6 +151,24 @@ struct sfc_port {
uint32_t mac_stats_mask[EFX_MAC_STATS_MASK_NPAGES];
};
+struct sfc_rss_hf_rte_to_efx {
+ uint64_t rte;
+ efx_rx_hash_type_t efx;
+};
+
+struct sfc_rss {
+ unsigned int channels;
+ efx_rx_scale_context_type_t context_type;
+ efx_rx_hash_support_t hash_support;
+ efx_rx_hash_alg_t hash_alg;
+ unsigned int hf_map_nb_entries;
+ struct sfc_rss_hf_rte_to_efx *hf_map;
+
+ efx_rx_hash_type_t hash_types;
+ unsigned int tbl[EFX_RSS_TBL_SIZE];
+ uint8_t key[EFX_RSS_KEY_SIZE];
+};
+
/* Adapter private data */
struct sfc_adapter {
/*
@@ -170,7 +183,7 @@ struct sfc_adapter {
uint16_t port_id;
struct rte_eth_dev *eth_dev;
struct rte_kvargs *kvargs;
- bool debug_init;
+ uint32_t logtype_main;
int socket_id;
efsys_bar_t mem_bar;
efx_family_t family;
@@ -225,15 +238,9 @@ struct sfc_adapter {
boolean_t tso;
- unsigned int rss_channels;
+ uint32_t rxd_wait_timeout_ns;
-#if EFSYS_OPT_RX_SCALE
- 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[EFX_RSS_KEY_SIZE];
-#endif
+ struct sfc_rss rss;
/*
* Shared memory copy of the Rx datapath name to be used by
@@ -302,6 +309,10 @@ int sfc_dma_alloc(const struct sfc_adapter *sa, const char *name, uint16_t id,
size_t len, int socket_id, efsys_mem_t *esmp);
void sfc_dma_free(const struct sfc_adapter *sa, efsys_mem_t *esmp);
+uint32_t sfc_register_logtype(struct sfc_adapter *sa,
+ const char *lt_prefix_str,
+ uint32_t ll_default);
+
int sfc_probe(struct sfc_adapter *sa);
void sfc_unprobe(struct sfc_adapter *sa);
int sfc_attach(struct sfc_adapter *sa);