X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Faxgbe%2Faxgbe_ethdev.h;h=35a8476466e6a1814b4e07fafebc6e5fae742501;hb=0607dadf98c71bdc96ea7b54eda26f1b667be1f6;hp=3969317fd9df95f97480fd84ccc72245500d5688;hpb=e01d9b2e980b3bc2c967b323a428432fad706e9a;p=dpdk.git diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h index 3969317fd9..35a8476466 100644 --- a/drivers/net/axgbe/axgbe_ethdev.h +++ b/drivers/net/axgbe/axgbe_ethdev.h @@ -9,6 +9,7 @@ #include #include #include "axgbe_common.h" +#include "rte_time.h" #define IRQ 0xff #define VLAN_HLEN 4 @@ -63,6 +64,13 @@ #define AXGBE_V2_DMA_CLOCK_FREQ 500000000 #define AXGBE_V2_PTP_CLOCK_FREQ 125000000 +/* Timestamp support - values based on 50MHz PTP clock + * 50MHz => 20 nsec + */ +#define AXGBE_TSTAMP_SSINC 20 +#define AXGBE_TSTAMP_SNSINC 0 +#define AXGBE_CYCLECOUNTER_MASK 0xffffffffffffffffULL + #define AXGMAC_FIFO_MIN_ALLOC 2048 #define AXGMAC_FIFO_UNIT 256 #define AXGMAC_FIFO_ALIGN(_x) \ @@ -486,6 +494,16 @@ struct axgbe_mmc_stats { uint64_t rxwatchdogerror; }; +/* Flow control parameters */ +struct xgbe_fc_info { + uint32_t high_water[AXGBE_PRIORITY_QUEUES]; + uint32_t low_water[AXGBE_PRIORITY_QUEUES]; + uint16_t pause_time[AXGBE_PRIORITY_QUEUES]; + uint16_t send_xon; + enum rte_eth_fc_mode mode; + uint8_t autoneg; +}; + /* * Structure to store private data for each port. */ @@ -512,7 +530,7 @@ struct axgbe_port { unsigned int xpcs_window_mask; /* Flags representing axgbe_state */ - unsigned long dev_state; + uint32_t dev_state; struct axgbe_hw_if hw_if; struct axgbe_phy_if phy_if; @@ -577,12 +595,14 @@ struct axgbe_port { unsigned int rx_rfa[AXGBE_MAX_QUEUES]; unsigned int rx_rfd[AXGBE_MAX_QUEUES]; unsigned int fifo; + unsigned int pfc_map[AXGBE_MAX_QUEUES]; /* Receive Side Scaling settings */ u8 rss_key[AXGBE_RSS_HASH_KEY_SIZE]; uint32_t rss_table[AXGBE_RSS_MAX_TABLE_SIZE]; uint32_t rss_options; int rss_enable; + uint64_t rss_hf; /* Hardware features of the device */ struct axgbe_hw_features hw_feat; @@ -626,12 +646,19 @@ struct axgbe_port { uint32_t rx_csum_enable; struct axgbe_mmc_stats mmc_stats; + struct xgbe_fc_info fc; /* Hash filtering */ unsigned int hash_table_shift; unsigned int hash_table_count; unsigned int uc_hash_mac_addr; unsigned int uc_hash_table[AXGBE_MAC_HASH_TABLE_SIZE]; + + /* For IEEE1588 PTP */ + struct rte_timecounter systime_tc; + struct rte_timecounter tx_tstamp; + unsigned int tstamp_addend; + }; void axgbe_init_function_ptrs_dev(struct axgbe_hw_if *hw_if); @@ -641,5 +668,7 @@ void axgbe_init_function_ptrs_i2c(struct axgbe_i2c_if *i2c_if); void axgbe_set_mac_addn_addr(struct axgbe_port *pdata, u8 *addr, uint32_t index); void axgbe_set_mac_hash_table(struct axgbe_port *pdata, u8 *addr, bool add); +int axgbe_write_rss_lookup_table(struct axgbe_port *pdata); +int axgbe_write_rss_hash_key(struct axgbe_port *pdata); #endif /* RTE_ETH_AXGBE_H_ */