[dpdk-dev] eth dev doesn't free mbufs for 82575EB

Helmut Sim simhelmut at gmail.com
Fri May 30 14:44:07 CEST 2014


Hi all,

I am trying to verify that the 82575EB NIC functions well.
The file rte_pci_dev_ids.h includes the following lines:

#ifdef RTE_PCI_DEV_USE_82575EB_COPPER
RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER)
#endif

so I defined the RTE_PCI_DEV_USE_82575EB_COPPER and hoped it will work well.

I have one simple thread that reads from the device using rte_eth_rx_burst
, then copy the content to another buffer, then free the rx buffer and
transmit the new buffer.
The systems function well (pinging with an external PC) untill the ring
buffer of the tx is getting full and then there are no buffer descriptors
to send the packets anymore.

the buffers are all allocated from one single mempool that includes:
rte_mempool_create("testing_mempool",
1000,
5000,
64,
sizeof(struct rte_pktmbuf_pool_private),
rte_pktmbuf_pool_init,
NULL,
rte_pktmbuf_init,
NULL,
rte_socket_id(),
0);

I assume the tx (using rte_eth_tx_burst) is supposed to free the buffers,
but it doesn't.
Attached is the dev configuration, though I tried a lot of options but all
brought me to the same result so i am pretty sure it is not the root cause.

I've invest few days in order to understand this but with no success.
Any idea what could be the cause?


Thanks in advance
-------------- next part --------------

struct rte_fdir_conf fdir_conf = {
	.mode = RTE_FDIR_MODE_NONE,
	.pballoc = RTE_FDIR_PBALLOC_64K,
	.status = RTE_FDIR_REPORT_STATUS,
	.flexbytes_offset = 0x6,
	.drop_queue = 127,
};


struct rte_eth_rxmode rx_mode = {
	.max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
	.split_hdr_size = 0,
	.header_split   = 0, /**< Header Split disabled. */
	.hw_ip_checksum = 0, /**< IP checksum offload disabled. */
	.hw_vlan_filter = 1, /**< VLAN filtering enabled. */
	.hw_vlan_strip  = 1, /**< VLAN strip enabled. */
	.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
	.jumbo_frame    = 0, /**< Jumbo Frame Support disabled. */
	.hw_strip_crc   = 0, /**< CRC stripping by hardware disabled. */
};

static const struct rte_eth_conf port_conf = {
	.link_speed = ETH_LINK_SPEED_AUTONEG,
	.link_duplex = ETH_LINK_FULL_DUPLEX,

//	.lpbk_mode = 0,
	.rxmode = {
			.max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
			.split_hdr_size = 0,
			.header_split   = 0, /**< Header Split disabled. */
			.hw_ip_checksum = 0, /**< IP checksum offload disabled. */
			.hw_vlan_filter = 1, /**< VLAN filtering enabled. */
			.hw_vlan_strip  = 1, /**< VLAN strip enabled. */
			.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
			.jumbo_frame    = 0, /**< Jumbo Frame Support disabled. */
			.hw_strip_crc   = 0, /**< CRC stripping by hardware disabled. */
			.mq_mode = ETH_MQ_RX_NONE,
	},
	.txmode = {
		.mq_mode = ETH_MQ_TX_NONE,
	},

	.fdir_conf = {
			.mode = RTE_FDIR_MODE_NONE,
			.pballoc = RTE_FDIR_PBALLOC_64K,
			.status = RTE_FDIR_REPORT_STATUS,
			.flexbytes_offset = 0x6,
			.drop_queue = 127,
	},

//	.intr_conf = {
//		.lsc = 1,			/**< link status interrupt feature enabled */
//	},
};


static const struct rte_eth_rxconf rx_conf = {
	.rx_thresh = {
		.pthresh = RX_PTHRESH,
		.hthresh = RX_HTHRESH,
		.wthresh = RX_WTHRESH,
	},
	.rx_free_thresh = 16, /**< Drives the freeing of RX descriptors. */
	.rx_drop_en = 1, /**< Drop packets if no descriptors are available. */
};


static const struct rte_eth_txconf tx_conf = {
	.tx_thresh = {
		.pthresh = TX_PTHRESH,
		.hthresh = TX_HTHRESH,
		.wthresh = TX_WTHRESH,
	},
	.tx_free_thresh = 16, 	/**< Drives the setting of RS bit on TXDs. */
	.tx_rs_thresh = 1, 		/**< Drives the setting of RS bit on TXDs. */
	.txq_flags = ETH_TXQ_FLAGS_NOMULTMEMP,
};
  


More information about the dev mailing list