Re: [PATCH v3] ethdev: fix DCB config issue on ixgbe
From: Lu, Wenzhuo <hidden>
Date: 2016-06-30 08:47:33
Hi Thomas,
-----Original Message----- From: Lu, Wenzhuo Sent: Thursday, June 30, 2016 4:23 PM To: 'Thomas Monjalon' Cc: dev@dpdk.org Subject: RE: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe Hi Thomas,quoted
-----Original Message----- From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] Sent: Thursday, June 30, 2016 3:42 PM To: Lu, Wenzhuo Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] ethdev: fix DCB config issue on ixgbe 2016-06-30 01:40, Lu, Wenzhuo:quoted
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuoquoted
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]quoted
2016-06-23 01:04, Lu, Wenzhuo:quoted
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]quoted
2016-05-06 05:33, Wenzhuo Lu:quoted
+int +rte_eth_dev_mq_mode_set(uint8_t port_id, + enum rte_eth_rx_mq_mode rx_mq_mode, + enum rte_eth_tx_mq_mode tx_mq_mode);I've really tried to think about it and I think it is more or less a hack. First, it is not explained in the doc when we should use rte_eth_dev_mq_mode_set() instead of a simple call torte_eth_dev_configure().quoted
quoted
Second, I don't understand why having a function which configures the "multiqueue modes" without configuring properlyRSS/VMDq/DCB.quoted
quoted
quoted
quoted
quoted
Last, it is said that rte_eth_dev_configure() "must be invoked first before any other function in the Ethernet API".After checking the code, Honestly I'm confused. I don't find this description.It's in the description of rte_eth_dev_configure(): http://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.h#n1904The bad news is this rule is not followed. I think the reason is something has to be done before configure.quoted
quoted
And on the contrary, I find rte_eth_dev_info_get is always called before rte_eth_dev_configure. I believe it's the problem. As rte_eth_dev_configure is not run, rte_eth_dev_info_get cannot get theright info.quoted
That why I have to add a API to set the mq_mode beforerte_eth_dev_info_get.quoted
Does that mean all the related examples are wrong? Any opinion? Thanks.My opinion is that this area needs a good cleanup and easy API :)OK. My solution is 1, Remove the description " rte_eth_dev_configure() must be invoked first before any other function in the Ethernet API ". I think it's reasonable to execute the rte_eth_dev_info_get before rte_eth_dev_configure, because we need to get some NIC specific limitation to check if the configuration is right. 2, Add one more argument, " const struct rte_eth_conf *eth_conf ", for rte_eth_dev_info_get, like this, void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info, const struct rte_eth_conf *eth_conf); because getting the right info depends on the configuration.
And I'm a little lost, my patch has nothing to do with rte_eth_dev_configure. I just try to fix the issue that rte_eth_dev_info_get has dependency with configuration. If the configure is not right, we cannot get the right info.