Skip to content

Commit

Permalink
e1000: support EM devices (also known as e1000/e1000e)
Browse files Browse the repository at this point in the history
Signed-off-by: Intel
  • Loading branch information
Intel authored and Thomas Monjalon committed Jul 25, 2013
1 parent 0197e3e commit 8058034
Show file tree
Hide file tree
Showing 9 changed files with 3,230 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/defconfig_i686-default-linuxapp-gcc
Expand Up @@ -130,8 +130,9 @@ CONFIG_RTE_LIBRTE_IEEE1588=n
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16

#
# Compile burst-oriented IGB PMD driver
# Compile burst-oriented IGB & EM PMD drivers
#
CONFIG_RTE_LIBRTE_EM_PMD=y
CONFIG_RTE_LIBRTE_IGB_PMD=y
CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
Expand Down
3 changes: 2 additions & 1 deletion config/defconfig_i686-default-linuxapp-icc
Expand Up @@ -130,8 +130,9 @@ CONFIG_RTE_LIBRTE_IEEE1588=n
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16

#
# Compile burst-oriented IGB PMD driver
# Compile burst-oriented IGB & EM PMD drivers
#
CONFIG_RTE_LIBRTE_EM_PMD=y
CONFIG_RTE_LIBRTE_IGB_PMD=y
CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
Expand Down
3 changes: 2 additions & 1 deletion config/defconfig_x86_64-default-linuxapp-gcc
Expand Up @@ -130,8 +130,9 @@ CONFIG_RTE_LIBRTE_IEEE1588=n
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16

#
# Compile burst-oriented IGB PMD driver
# Compile burst-oriented IGB & EM PMD drivers
#
CONFIG_RTE_LIBRTE_EM_PMD=y
CONFIG_RTE_LIBRTE_IGB_PMD=y
CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
Expand Down
3 changes: 2 additions & 1 deletion config/defconfig_x86_64-default-linuxapp-icc
Expand Up @@ -130,8 +130,9 @@ CONFIG_RTE_LIBRTE_IEEE1588=n
CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16

#
# Compile burst-oriented IGB PMD driver
# Compile burst-oriented IGB & EM PMD drivers
#
CONFIG_RTE_LIBRTE_EM_PMD=y
CONFIG_RTE_LIBRTE_IGB_PMD=y
CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
Expand Down
2 changes: 2 additions & 0 deletions lib/librte_pmd_e1000/Makefile
Expand Up @@ -64,6 +64,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += e1000_phy.c
SRCS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += e1000_vf.c
SRCS-$(CONFIG_RTE_LIBRTE_IGB_PMD) += igb_ethdev.c
SRCS-$(CONFIG_RTE_LIBRTE_IGB_PMD) += igb_rxtx.c
SRCS-$(CONFIG_RTE_LIBRTE_EM_PMD) += em_ethdev.c
SRCS-$(CONFIG_RTE_LIBRTE_EM_PMD) += em_rxtx.c

# this lib depends upon:
DEPDIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += lib/librte_eal lib/librte_ether
Expand Down
31 changes: 31 additions & 0 deletions lib/librte_pmd_e1000/e1000_ethdev.h
Expand Up @@ -117,4 +117,35 @@ int eth_igbvf_rx_init(struct rte_eth_dev *dev);

void eth_igbvf_tx_init(struct rte_eth_dev *dev);

/*
* RX/TX EM function prototypes
*/
void eth_em_tx_queue_release(void *txq);
void eth_em_rx_queue_release(void *rxq);

void em_dev_clear_queues(struct rte_eth_dev *dev);

int eth_em_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
uint16_t nb_rx_desc, unsigned int socket_id,
const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mb_pool);

int eth_em_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
uint16_t nb_tx_desc, unsigned int socket_id,
const struct rte_eth_txconf *tx_conf);

int eth_em_rx_init(struct rte_eth_dev *dev);

void eth_em_tx_init(struct rte_eth_dev *dev);

uint16_t eth_em_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);

uint16_t eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);

uint16_t eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);


#endif /* _E1000_ETHDEV_H_ */

0 comments on commit 8058034

Please sign in to comment.