get Rx/Tx packet burst mode information
cover get Rx/Tx packet burst mode information
RFCv3 -> v1:
https://patchwork.dpdk.org/patch/59103/ https://patchwork.dpdk.org/patch/59104/ https://patchwork.dpdk.org/patch/59105/ https://patchwork.dpdk.org/patch/59106/ 1). Use the function 'rte_bsf64' to iterate the options for getting the name.
Haiyue Wang (4):
ethdev: add the API for getting burst mode information net/i40e: support to get the Rx/Tx burst mode net/ice: support to get the Rx/Tx burst mode app/testpmd: show the Rx/Tx burst mode description
app/test-pmd/config.c | 29 +++++++++ doc/guides/rel_notes/release_19_11.rst | 9 +++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 +++++++++++++++++++++ drivers/net/ice/ice_ethdev.c | 2 + drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 ++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 12 files changed, 343 insertions(+)
Signature · 1 line
2.17.1
PATCH 1/4 ethdev: add the API for getting burst mode information
Some PMDs have more than one RX/TX burst paths, add the ethdev API that allows an application to retrieve the mode information about Rx/Tx packet burst such as Scalar or Vector, and Vector technology like AVX2.
--- doc/guides/rel_notes/release_19_11.rst | 9 +++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 5 files changed, 176 insertions(+)
doc/guides/rel_notes/release_19_11.rst +9 -0
@@ -56,6 +56,15 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **Added RX/TX packet burst mode get API.** + + Added two new functions ``rte_eth_rx_burst_mode_get`` and + ``rte_eth_tx_burst_mode_get`` that allow an application + to retrieve the mode information about RX/TX packet burst + such as Scalar or Vector, and Vector technology like AVX2. + Another new function ``rte_eth_burst_mode_option_name`` is + provided for burst mode options stringification. + * **Updated the Intel ice driver.** Updated the Intel ice driver with new features and improvements, including:
lib/librte_ethdev/rte_ethdev.c +75 -0
81 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev.h +82 -0
94 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev_core.h +5 -0
@@ -294,6 +294,9 @@ typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,typedef void (*eth_txq_info_get_t )(struct rte_eth_dev *dev,uint16_t tx_queue_id,struct rte_eth_txq_info *qinfo); +typedef void (*eth_burst_mode_get_t )(struct rte_eth_dev *dev, +uint16_t queue_id,struct rte_eth_burst_mode *mode); +typedef int (*mtu_set_t )(struct rte_eth_dev *dev,uint16_t mtu);/**< @internal Set MTU. */
@@ -542,6 +545,8 @@ struct eth_dev_ops {eth_dev_infos_get_t dev_infos_get;/**< Get device info. */ eth_rxq_info_get_t rxq_info_get;/**< retrieve RX queue information. */ eth_txq_info_get_t txq_info_get;/**< retrieve TX queue information. */ +eth_burst_mode_get_t rx_burst_mode_get;/**< Get RX burst mode */ +eth_burst_mode_get_t tx_burst_mode_get;/**< Get TX burst mode */ eth_fw_version_get_t fw_version_get;/**< Get firmware version. */ eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;/**< Get packet types supported and identified by device. */
lib/librte_ethdev/rte_ethdev_version.map +5 -0
@@ -283,4 +283,9 @@ EXPERIMENTAL { # added in 19.08 rte_eth_read_clock; + + # added in 19.11 + rte_eth_rx_burst_mode_get; + rte_eth_tx_burst_mode_get; + rte_eth_burst_mode_option_name; };
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v1 1/4] ethdev: add the API for getting burst mode information
Quoted 15 lines · Haiyue Wang
Some PMDs have more than one RX/TX burst paths, add the ethdev API that allows an application to retrieve the mode information about Rx/Tx packet burst such as Scalar or Vector, and Vector technology like AVX2.
Signed-off-by Haiyue Wang <[email protected]>---
doc/guides/rel_notes/release_19_11.rst | 9 +++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 5 files changed, 176 insertions(+)
[snip]
lib/librte_ethdev/rte_ethdev_core.h typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev, · line 299
Quoted 3 lines
lib/librte_ethdev/rte_ethdev_core.h +3
-0+typedef void (*eth_burst_mode_get_t )(struct rte_eth_dev *dev, +uint16_t queue_id,struct rte_eth_burst_mode *mode); +
There is ongoing effort to change the return type of dev_ops callback from void to int, like [1]
Better to keep align with it.
[1] http://patchwork.dpdk.org/project/dpdk/list/?series=6391
Thanks,
Xiaolong
Quoted 29 lines
typedef int (*mtu_set_t)(struct
rte_eth_dev*dev,uint16_tmtu); /**< @internal Set MTU. */lib/librte_ethdev/rte_ethdev_core.h +2
-0@@ -542,6 +545,8 @@ struct eth_dev_ops {eth_dev_infos_get_t dev_infos_get;/**< Get device info. */ eth_rxq_info_get_t rxq_info_get;/**< retrieve RX queue information. */ eth_txq_info_get_t txq_info_get;/**< retrieve TX queue information. */ +eth_burst_mode_get_t rx_burst_mode_get;/**< Get RX burst mode */ +eth_burst_mode_get_t tx_burst_mode_get;/**< Get TX burst mode */ eth_fw_version_get_t fw_version_get;/**< Get firmware version. */ eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;/**< Get packet types supported and identified by device. */ lib/librte_ethdev/rte_ethdev_version.map +5
-0@@ -283,4 +283,9 @@ EXPERIMENTAL { # added in 19.08 rte_eth_read_clock; + + # added in 19.11 + rte_eth_rx_burst_mode_get; + rte_eth_tx_burst_mode_get; + rte_eth_burst_mode_option_name; };Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v1 1/4] ethdev: add the API for getting burst mode information
Quoted 34 lines
-----Original Message-----
From: Ye, Xiaolong
Sent: Thursday, September 26, 2019 21:41
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun, Chenmin <[email protected]>
Subject: Re: [PATCH v1 1/4] ethdev: add the API for getting burst mode informationQuoted 15 lines · Haiyue Wang
Some PMDs have more than one RX/TX burst paths, add the ethdev API that allows an application to retrieve the mode information about Rx/Tx packet burst such as Scalar or Vector, and Vector technology like AVX2.
Signed-off-by Haiyue Wang <[email protected]>---
doc/guides/rel_notes/release_19_11.rst | 9 +++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 5 files changed, 176 insertions(+)[snip]
lib/librte_ethdev/rte_ethdev_core.h typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev, · line 299
Quoted 3 lines
lib/librte_ethdev/rte_ethdev_core.h +3
-0+typedef void (*eth_burst_mode_get_t )(struct rte_eth_dev *dev, +uint16_t queue_id,struct rte_eth_burst_mode *mode); +There is ongoing effort to change the return type of
dev_opscallback from void to int, like [1]
Quoted 4 lines
Better to keep align with it.
[1] http://patchwork.dpdk.org/project/dpdk/list/?series=6391
OK, will update on v2.
Quoted 32 lines
Thanks,
XiaolongQuoted 29 lines
typedef int (*mtu_set_t)(struct
rte_eth_dev*dev,uint16_tmtu); /**< @internal Set MTU. */lib/librte_ethdev/rte_ethdev_core.h +2
-0@@ -542,6 +545,8 @@ struct eth_dev_ops {eth_dev_infos_get_t dev_infos_get;/**< Get device info. */ eth_rxq_info_get_t rxq_info_get;/**< retrieve RX queue information. */ eth_txq_info_get_t txq_info_get;/**< retrieve TX queue information. */ +eth_burst_mode_get_t rx_burst_mode_get;/**< Get RX burst mode */ +eth_burst_mode_get_t tx_burst_mode_get;/**< Get TX burst mode */ eth_fw_version_get_t fw_version_get;/**< Get firmware version. */ eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;/**< Get packet types supported and identified by device. */ lib/librte_ethdev/rte_ethdev_version.map +5
-1@@ -283,4 +283,9 @@ EXPERIMENTAL { # added in 19.08 rte_eth_read_clock; + + # added in 19.11 + rte_eth_rx_burst_mode_get; + rte_eth_tx_burst_mode_get; + rte_eth_burst_mode_option_name; }; --2.17.1
PATCH 2/4 net/i40e: support to get the Rx/Tx burst mode
In reply to Haiyue WangAccording to the selected Rx/Tx burst function name, retrieve the related burst mode options.
--- drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 ++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+)
drivers/net/i40e/i40e_ethdev.c +2 -0
@@ -493,6 +493,8 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .filter_ctrl = i40e_dev_filter_ctrl, .rxq_info_get = i40e_rxq_info_get, .txq_info_get = i40e_txq_info_get, + .rx_burst_mode_get = i40e_rx_burst_mode_get, + .tx_burst_mode_get = i40e_tx_burst_mode_get, .mirror_rule_set = i40e_mirror_rule_set, .mirror_rule_reset = i40e_mirror_rule_reset, .timesync_enable = i40e_timesync_enable,
drivers/net/i40e/i40e_ethdev.h +4 -0
@@ -1209,6 +1209,10 @@ void i40e_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo);void i40e_txq_info_get (struct rte_eth_dev *dev,uint16_t queue_id,struct rte_eth_txq_info *qinfo); +void i40e_rx_burst_mode_get (struct rte_eth_dev *dev,uint16_t queue_id, +struct rte_eth_burst_mode *mode); +void i40e_tx_burst_mode_get (struct rte_eth_dev *dev,uint16_t queue_id, +struct rte_eth_burst_mode *mode);struct i40e_ethertype_filter *i40e_sw_ethertype_filter_lookup (struct i40e_ethertype_rule *ethertype_rule,const struct i40e_ethertype_filter_input *input);
drivers/net/i40e/i40e_rxtx.c +72 -0
84 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v1 2/4] net/i40e: support to get the Rx/Tx burst mode
What about add Rx/Tx burst mode get callbacks form the commit subject?
Quoted 3 lines · Haiyue Wang
According to the selected Rx/Tx burst function name, retrieve the related burst mode options.
How about:
Retrieve burst mode options according to the selected Rx/Tx burst function name.
Thanks,
Xiaolong
Re: [dpdk-dev] [PATCH v1 2/4] net/i40e: support to get the Rx/Tx burst mode
Quoted 10 lines
-----Original Message-----
From: Ye, Xiaolong
Sent: Thursday, September 26, 2019 21:50
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun, Chenmin <[email protected]>
Subject: Re: [PATCH v1 2/4] net/i40e: support to get the Rx/Tx burst modeWhat about
add Rx/Tx burst mode get callbacksform the commit subject?
+1, this makes patch clear, thanks.
Quoted 10 lines · Haiyue Wang
Quoted 3 lines
According to the selected Rx/Tx burst function name, retrieve the related burst mode options.
How about:
Retrieve burst mode options according to the selected Rx/Tx burst function name.
+1, clear log, really. ;-)
Quoted 2 lines
Thanks,
Xiaolong
PATCH 3/4 net/ice: support to get the Rx/Tx burst mode
In reply to Haiyue WangAccording to the selected Rx/Tx burst function name, retrieve the related burst mode options.
--- drivers/net/ice/ice_ethdev.c | 2 ++ drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++++++++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 +++ 3 files changed, 60 insertions(+)
drivers/net/ice/ice_ethdev.c +2 -0
@@ -158,6 +158,8 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .vlan_pvid_set = ice_vlan_pvid_set, .rxq_info_get = ice_rxq_info_get, .txq_info_get = ice_txq_info_get, + .rx_burst_mode_get = ice_rx_burst_mode_get, + .tx_burst_mode_get = ice_tx_burst_mode_get, .get_eeprom_length = ice_get_eeprom_length, .get_eeprom = ice_get_eeprom, .rx_queue_count = ice_rx_queue_count,
drivers/net/ice/ice_rxtx.c +54 -0
66 lines not on this page · raw message
drivers/net/ice/ice_rxtx.h +4 -0
@@ -168,6 +168,10 @@ void ice_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo);void ice_txq_info_get (struct rte_eth_dev *dev,uint16_t queue_id,struct rte_eth_txq_info *qinfo); +void ice_rx_burst_mode_get (struct rte_eth_dev *dev,uint16_t queue_id, +struct rte_eth_burst_mode *mode); +void ice_tx_burst_mode_get (struct rte_eth_dev *dev,uint16_t queue_id, +struct rte_eth_burst_mode *mode);int ice_rx_descriptor_status (void *rx_queue,uint16_t offset);int ice_tx_descriptor_status (void *tx_queue,uint16_t offset);void ice_set_default_ptype_table (struct rte_eth_dev *dev);
Signature · 1 line
2.17.1
PATCH 4/4 app/testpmd: show the Rx/Tx burst mode description
In reply to Haiyue WangAdd the 'Burst mode' section into command 'show rxq|txq info <port_id> <queue_id>' to show the Rx/Tx burst mode description like:
"Burst mode: Vector AVX2 Scattered"
--- app/test-pmd/config.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
app/test-pmd/config.c +29 -0
@@ -330,9 +330,25 @@ nic_stats_mapping_display(portid_t port_id) nic_stats_mapping_border, nic_stats_mapping_border); } +static void +burst_mode_options_display (uint64_t options) +{ +int offset; + +while (options !=0 ) { + offset =rte_bsf64 (options); + +printf (" %s" , +rte_eth_burst_mode_option_name (1ULL << offset)); + + options &= ~(1ULL << offset); + } +} +void rx_queue_infos_display (portid_t port_id,uint16_t queue_id) { +struct rte_eth_burst_mode mode;struct rte_eth_rxq_info qinfo;int32_t rc;static const char *info_border ="*********************" ;
@@ -360,12 +376,19 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)printf ("\nRX scattered packets: %s" , (qinfo.scattered_rx !=0 ) ?"on" :"off" );printf ("\nNumber of RXDs: %hu" , qinfo.nb_desc); + +if (rte_eth_rx_burst_mode_get (port_id, queue_id, &mode) ==0 ) { +printf ("\nBurst mode:" ); +burst_mode_options_display (mode.options); + } +printf ("\n" ); }void tx_queue_infos_display (portid_t port_id,uint16_t queue_id) { +struct rte_eth_burst_mode mode;struct rte_eth_txq_info qinfo;int32_t rc;static const char *info_border ="*********************" ;
@@ -389,6 +412,12 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)printf ("\nTX deferred start: %s" , (qinfo.conf.tx_deferred_start !=0 ) ?"on" :"off" );printf ("\nNumber of TXDs: %hu" , qinfo.nb_desc); + +if (rte_eth_tx_burst_mode_get (port_id, queue_id, &mode) ==0 ) { +printf ("\nBurst mode:" ); +burst_mode_options_display (mode.options); + } +printf ("\n" ); }
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v1 4/4] app/testpmd: show the Rx/Tx burst mode description
Quoted 76 lines · Haiyue Wang
Add the 'Burst mode' section into command 'show rxq|txq info <
port_id> <queue_id>' to show the Rx/Tx burst mode description like:
"Burst mode: Vector AVX2 Scattered"Signed-off-by Haiyue Wang <[email protected]>---
app/test-pmd/config.c| 29 +++++++++++++++++++++++++++++1 file changed, 29 insertions(+)app/test-pmd/config.c +15
-0@@ -330,9 +330,25 @@ nic_stats_mapping_display(portid_t port_id) nic_stats_mapping_border, nic_stats_mapping_border); } +static void +burst_mode_options_display (uint64_t options) +{ +int offset; + +while (options !=0 ) { + offset =rte_bsf64 (options); + +printf (" %s" , +rte_eth_burst_mode_option_name (1ULL << offset)); + + options &= ~(1ULL << offset); + } +} +void
rx_queue_infos_display(portid_t port_id, uint16_t queue_id){app/test-pmd/config.c +1
-0+struct rte_eth_burst_mode mode;struct rte_eth_rxq_info qinfo; int32_t rc; static const char *info_border = "*********************";app/test-pmd/config.c +6
-0@@ -360,12 +376,19 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)printf ("\nRX scattered packets: %s" , (qinfo.scattered_rx !=0 ) ?"on" :"off" );printf ("\nNumber of RXDs: %hu" , qinfo.nb_desc); + +if (rte_eth_rx_burst_mode_get (port_id, queue_id, &mode) ==0 ) { +printf ("\nBurst mode:" ); +burst_mode_options_display (mode.options); + } +printf ("\n" ); }void
tx_queue_infos_display(portid_t port_id, uint16_t queue_id){app/test-pmd/config.c +1
-0+struct rte_eth_burst_mode mode;struct rte_eth_txq_info qinfo; int32_t rc; static const char *info_border = "*********************";app/test-pmd/config.c +6
-0@@ -389,6 +412,12 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)printf ("\nTX deferred start: %s" , (qinfo.conf.tx_deferred_start !=0 ) ?"on" :"off" );printf ("\nNumber of TXDs: %hu" , qinfo.nb_desc); + +if (rte_eth_tx_burst_mode_get (port_id, queue_id, &mode) ==0 ) { +printf ("\nBurst mode:" ); +burst_mode_options_display (mode.options); + } +printf ("\n" ); }Signature · 1 line
2.17.1
Quoted 14 lines · On Thu, 26 Sep 2019 19:48:14 +0800 Haiyue Wang <[email protected]> wrote:
RFCv3 -> v1:
https://patchwork.dpdk.org/patch/59103/ https://patchwork.dpdk.org/patch/59104/ https://patchwork.dpdk.org/patch/59105/ https://patchwork.dpdk.org/patch/59106/ 1). Use the function 'rte_bsf64' to iterate the options for getting the name.Haiyue Wang (4):
ethdev: add the API for getting burst mode information net/i40e: support to get the Rx/Tx burst mode net/ice: support to get the Rx/Tx burst mode app/testpmd: show the Rx/Tx burst mode description
Quoted 14 lines
app/test-pmd/config.c | 29 +++++++++ doc/guides/rel_notes/release_19_11.rst | 9 +++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 +++++++++++++++++++++ drivers/net/ice/ice_ethdev.c | 2 + drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 ++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 12 files changed, 343 insertions(+)
A couple of meta comments:
1) Could this be part of dev_info_get somehow?
2) Why should application care? Is this just a test hook?
Hi Stephen,
Quoted 41 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Thursday, September 26, 2019 23:57
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Ye, Xiaolong <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun, Chenmin <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v1 0/4] get Rx/Tx packet burst mode informationQuoted 14 lines · On Thu, 26 Sep 2019 19:48:14 +0800 Haiyue Wang <[email protected]> wrote:
RFCv3 -> v1:
https://patchwork.dpdk.org/patch/59103/ https://patchwork.dpdk.org/patch/59104/ https://patchwork.dpdk.org/patch/59105/ https://patchwork.dpdk.org/patch/59106/ 1). Use the function 'rte_bsf64' to iterate the options for getting the name.Haiyue Wang (4):
ethdev: add the API for getting burst mode information net/i40e: support to get the Rx/Tx burst mode net/ice: support to get the Rx/Tx burst mode app/testpmd: show the Rx/Tx burst mode descriptionQuoted 14 lines
app/test-pmd/config.c | 29 +++++++++ doc/guides/rel_notes/release_19_11.rst | 9 +++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 +++++++++++++++++++++ drivers/net/ice/ice_ethdev.c | 2 + drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 ++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 12 files changed, 343 insertions(+)
Quoted 3 lines
A couple of meta comments:
1) Could this be part ofdev_info_getsomehow?
https://patchwork.dpdk.org/patch/57624/
'Think of a better way that doesn't break ABI.' ;-)
Quoted 1 line
2) Why should application care? Is this just a test hook?
https://patches.dpdk.org/cover/57623/
This is from FD.io VPP's bug, and finally, we come out this API for application accessing the burst mode information. It can be used as a simple trace or something like performance analysis like why slow ? Not in vector, anyway, application can get this burst mode information now, not just open PMD debug log level.
Quoted 43 lines · Haiyue
Hi Stephen,
Quoted 41 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Thursday, September 26, 2019 23:57
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Ye, Xiaolong <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun, Chenmin <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v1 0/4] get Rx/Tx packet burst mode informationQuoted 28 lines · On Thu, 26 Sep 2019 19:48:14 +0800 Haiyue Wang <[email protected]> wrote:
RFCv3 -> v1:
https://patchwork.dpdk.org/patch/59103/ https://patchwork.dpdk.org/patch/59104/ https://patchwork.dpdk.org/patch/59105/ https://patchwork.dpdk.org/patch/59106/ 1). Use the function 'rte_bsf64' to iterate the options for getting the name.Haiyue Wang (4):
ethdev: add the API for getting burst mode information net/i40e: support to get the Rx/Tx burst mode net/ice: support to get the Rx/Tx burst mode app/testpmd: show the Rx/Tx burst mode descriptionapp/test-pmd/config.c | 29 +++++++++ doc/guides/rel_notes/release_19_11.rst | 9 +++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 +++++++++++++++++++++ drivers/net/ice/ice_ethdev.c | 2 + drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 ++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 12 files changed, 343 insertions(+)
Quoted 6 lines
Quoted 3 lines
A couple of meta comments:
1) Could this be part ofdev_info_getsomehow?https://patchwork.dpdk.org/patch/57624/
'Think of a better way that doesn't break ABI.' ;-)
That comment was made relative to 19.08, but 19.11 is the time where API/ABI breakage is allowed.
Quoted 9 lines
Quoted 1 line
2) Why should application care? Is this just a test hook?
https://patches.dpdk.org/cover/57623/
This is from FD.io VPP's bug, and finally, we come out this API for application accessing the burst mode information. It can be used as a simple trace or something like performance analysis like why slow ? Not in vector, anyway, application can get this burst mode information now, not just open PMD debug log level.
From an architecture perspective, diagnostics are good but VPP is probably taking that too far. It is possible to expose local symbols if they want to keep using dlsym() by adjusting linker flags. It is more that VPP is stripping everything. Since VPP has chosen to go their own way is fixable inside VPP without changing DPDK. Also, long term VPP is going away from using DPDK drivers. Probably soon they will have their own drivers for i40e and ice anyway.
The basis of my concern is that this is one of those kind of API's that creates long term technical debt around supporting it as other things change.
Quoted 50 lines · Stephen Hemminger
Quoted 47 lines · Haiyue
Hi Stephen,
Quoted 44 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Thursday, September 26, 2019 23:57
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Ye, Xiaolong <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun, Chenmin <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v1 0/4] get Rx/Tx packet burst mode informationQuoted 14 lines · On Thu, 26 Sep 2019 19:48:14 +0800 Haiyue Wang <[email protected]> wrote:
RFCv3 -> v1:
https://patchwork.dpdk.org/patch/59103/ https://patchwork.dpdk.org/patch/59104/ https://patchwork.dpdk.org/patch/59105/ https://patchwork.dpdk.org/patch/59106/ 1). Use the function 'rte_bsf64' to iterate the options for getting the name.Haiyue Wang (4):
ethdev: add the API for getting burst mode information net/i40e: support to get the Rx/Tx burst mode net/ice: support to get the Rx/Tx burst mode app/testpmd: show the Rx/Tx burst mode descriptionQuoted 14 lines
app/test-pmd/config.c | 29 +++++++++ doc/guides/rel_notes/release_19_11.rst | 9 +++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 +++++++++++++++++++++ drivers/net/ice/ice_ethdev.c | 2 + drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 ++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 12 files changed, 343 insertions(+)A couple of meta comments:
1) Could this be part ofdev_info_getsomehow?
Quoted 5 lines
Quoted 2 lines
https://patchwork.dpdk.org/patch/57624/
'Think of a better way that doesn't break ABI.' ;-)That comment was made relative to 19.08, but 19.11 is the time where API/ABI breakage is allowed.
'rte_eth_dev_info_get()' is already a little messy, yes this can be part of it but I think separate, smaller, better defined APIs are better. Also almost everybody interested in 'rte_eth_dev_info_get()', but not sure everyone will be interested in this info.
Quoted 24 lines
Quoted 10 lines
Quoted 2 lines
2) Why should application care? Is this just a test hook?
https://patches.dpdk.org/cover/57623/
This is from FD.io VPP's bug, and finally, we come out this API for application accessing the burst mode information. It can be used as a simple trace or something like performance analysis like why slow ? Not in vector, anyway, application can get this burst mode information now, not just open PMD debug log level.From an architecture perspective, diagnostics are good but VPP is probably taking that too far. It is possible to expose local symbols if they want to keep using
dlsym()by adjusting linker flags. It is more that VPP is stripping everything. Since VPP has chosen to go their own way is fixable inside VPP without changing DPDK. Also, long term VPP is going away from using DPDK drivers. Probably soon they will have their own drivers for i40e and ice anyway.The basis of my concern is that this is one of those kind of API's that creates long term technical debt around supporting it as other things change.
Quoted 60 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, September 27, 2019 01:15
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Ye, Xiaolong <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun, Chenmin <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v1 0/4] get Rx/Tx packet burst mode informationQuoted 8 lines · Haiyue
Hi Stephen,
Quoted 6 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Thursday, September 26, 2019 23:57
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Ye, Xiaolong <[email protected]>; Kinsella, Ray <[email protected]>; Iremonger, Bernard <[email protected]>; Sun,Chenmin
Quoted 39 lines
Quoted 38 lines
<[email protected]>
Subject: Re: [dpdk-dev] [PATCH v1 0/4] get Rx/Tx packet burst mode informationQuoted 14 lines · On Thu, 26 Sep 2019 19:48:14 +0800 Haiyue Wang <[email protected]> wrote:
RFCv3 -> v1:
https://patchwork.dpdk.org/patch/59103/ https://patchwork.dpdk.org/patch/59104/ https://patchwork.dpdk.org/patch/59105/ https://patchwork.dpdk.org/patch/59106/ 1). Use the function 'rte_bsf64' to iterate the options for getting the name.Haiyue Wang (4):
ethdev: add the API for getting burst mode information net/i40e: support to get the Rx/Tx burst mode net/ice: support to get the Rx/Tx burst mode app/testpmd: show the Rx/Tx burst mode descriptionQuoted 14 lines
app/test-pmd/config.c | 29 +++++++++ doc/guides/rel_notes/release_19_11.rst | 9 +++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev.h | 4 ++ drivers/net/i40e/i40e_rxtx.c | 72 +++++++++++++++++++++ drivers/net/ice/ice_ethdev.c | 2 + drivers/net/ice/ice_rxtx.c | 54 ++++++++++++++++ drivers/net/ice/ice_rxtx.h | 4 ++ lib/librte_ethdev/rte_ethdev.c | 75 ++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 82 ++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++ lib/librte_ethdev/rte_ethdev_version.map | 5 ++ 12 files changed, 343 insertions(+)A couple of meta comments:
1) Could this be part ofdev_info_getsomehow?
Quoted 6 lines
Quoted 2 lines
https://patchwork.dpdk.org/patch/57624/
'Think of a better way that doesn't break ABI.' ;-)That comment was made relative to 19.08, but 19.11 is the time where API/ABI breakage is allowed.
Since 'rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)' focuses on 'port' level, the new rx/tx_burst_mode API can support 'queue' level:
'rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id ...', in other words, PMD can optimize their queues in Vector/Scalar/... modes for each queue, not have to just one mode for all queues at the same time, this API can return "Per Queue" information.
Quoted 19 lines
Quoted 9 lines
Quoted 1 line
2) Why should application care? Is this just a test hook?
https://patches.dpdk.org/cover/57623/
This is from FD.io VPP's bug, and finally, we come out this API for application accessing the burst mode information. It can be used as a simple trace or something like performance analysis like why slow ? Not in vector, anyway, application can get this burst mode information now, not just open PMD debug log level.From an architecture perspective, diagnostics are good but VPP is probably taking that too far. It is possible to expose local symbols if they want to keep using
dlsym()by adjusting linker flags. It is more that VPP is stripping everything. Since VPP has chosen to go their own way is fixable inside VPP without changing DPDK. Also, long term VPP is going away from using DPDK drivers. Probably soon they will have their own drivers for i40e and ice anyway.
Quoted 3 lines
The basis of my concern is that this is one of those kind of API's that creates long term technical debt around supporting it as other things change.
At first, we use 'string format' to make VPP happy, now, we use bit-fields for general use.
People come, people go, even VPP left DPDK, now, testpmd is the first user, and I think it is good for 'test' the PMD with friendly information:
testpmd> show rxq info 0 0
********************* Infos for port 0 , RX queue 0 *********************
Mempool: mbuf_pool_socket_0
RX prefetch threshold: 0
RX host threshold: 0
RX writeback threshold: 0
RX free threshold: 32
RX drop packets: off
RX deferred start: off
RX scattered packets: off
Number of RXDs: 1024
Burst mode: Vector AVX2 =============> direct information, not have to check the
code and open debug to make sure every setting
is right.
testpmd> show txq info 0 0
********************* Infos for port 0 , TX queue 0 ********************* TX prefetch threshold: 32
TX host threshold: 0
TX writeback threshold: 0
TX RS threshold: 32
TX free threshold: 32
TX deferred start: off
Number of TXDs: 1024
Burst mode: Vector AVX2 =============>