Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in the Debug CLI what rx/tx function is being used: #show hardware-interface tx burst function: ice_xmit_pkts rx burst function: ice_recv_scattered_pkts But if the tx/rx is static, then 'dladdr' will return nil: tx burst function: (nil) │······················ rx burst function: (nil) │······················ For making things consistent and gracefull, we introduce an new string field to describe the Rx/Tx burst information. This is vendor-neutral, it is used to identify the Rx/Tx burst selection if the PMD has more than one. If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'. This is for net/ice PMD result. 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: on Number of RXDs: 1024 Burst description: AVX2 Vector Scattered Rx <------------ NEW 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 description: AVX2 Vector Tx <------------ NEW Haiyue Wang (3): ethdev: add the Rx/Tx burst description field in queue information testpmd: show the Rx/Tx burst description field in queue net/ice: support the Rx/Tx burst description field in queue information app/test-pmd/config.c | 2 ++ drivers/net/ice/ice_rxtx.c | 49 ++++++++++++++++++++++++++++++++++++++++++ lib/librte_ethdev/rte_ethdev.h | 7 ++++++ 3 files changed, 58 insertions(+) -- 2.7.4
Since each PMD has different Rx/Tx burst capabilities such as Vector, Scattered, Bulk etc, adding the Rx/Tx burst description field in queue information to provide apps current configuration of PMD Rx/Tx burst. This is a self-description for each PMD in its own format. Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> --- lib/librte_ethdev/rte_ethdev.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index dc6596b..bc48c0c 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -1192,6 +1192,9 @@ struct rte_eth_dev_info { struct rte_eth_switch_info switch_info; }; +/** Maximum information length to describe the PMD RX/TX functions */ +#define RTE_PMD_BURST_INFO_SIZE 128 + /** * Ethernet device RX queue information structure. * Used to retrieve information about configured queue. @@ -1201,6 +1204,8 @@ struct rte_eth_rxq_info { struct rte_eth_rxconf conf; /**< queue config parameters. */ uint8_t scattered_rx; /**< scattered packets RX supported. */ uint16_t nb_desc; /**< configured number of RXDs. */ + char burst_info[RTE_PMD_BURST_INFO_SIZE]; + /**< Description of PMD RX function, such as Vector, Scattered etc */ } __rte_cache_min_aligned; /** @@ -1210,6 +1215,8 @@ struct rte_eth_rxq_info { struct rte_eth_txq_info { struct rte_eth_txconf conf; /**< queue config parameters. */ uint16_t nb_desc; /**< configured number of TXDs. */ + char burst_info[RTE_PMD_BURST_INFO_SIZE]; + /**< Description of PMD TX function, such as Vector, Scattered etc */ } __rte_cache_min_aligned; /** Maximum name length for extended statistics counters */ -- 2.7.4
Add the 'Burst description' section into command 'show rxq|txq info <port_id> <queue_id>' to show the Rx/Tx burst description field in queue information. Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> --- app/test-pmd/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 1a5a5c1..69607ba 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -354,6 +354,7 @@ 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); + printf("\nBurst description: %s\n", qinfo.burst_info); printf("\n"); } @@ -383,6 +384,7 @@ 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); + printf("\nBurst description: %s\n", qinfo.burst_info); printf("\n"); } -- 2.7.4
According to the Rx/Tx burst function that's selected currently, format the distinct burst description information for apps to query. Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> --- drivers/net/ice/ice_rxtx.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 0282b53..9e6b1f7 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -15,6 +15,16 @@ #define ICE_RX_ERR_BITS 0x3f +static uint16_t ice_recv_scattered_pkts(void *rx_queue, + struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); +static uint16_t ice_recv_pkts_bulk_alloc(void *rx_queue, + struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); +static uint16_t ice_xmit_pkts_simple(void *tx_queue, + struct rte_mbuf **tx_pkts, + uint16_t nb_pkts); + static enum ice_status ice_program_hw_rx_queue(struct ice_rx_queue *rxq) { @@ -935,6 +945,30 @@ ice_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.rx_free_thresh = rxq->rx_free_thresh; qinfo->conf.rx_drop_en = rxq->drop_en; qinfo->conf.rx_deferred_start = rxq->rx_deferred_start; + + if (dev->rx_pkt_burst == ice_recv_scattered_pkts) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Scattered Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts_bulk_alloc) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Bulk Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Normal Rx"); +#ifdef RTE_ARCH_X86 + else if (dev->rx_pkt_burst == ice_recv_scattered_pkts_vec_avx2) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "AVX2 Vector Scattered Rx"); + else if (dev->rx_pkt_burst == ice_recv_scattered_pkts_vec) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Vector Scattered Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts_vec_avx2) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "AVX2 Vector Rx"); + else if (dev->rx_pkt_burst == ice_recv_pkts_vec) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Vector Rx"); +#endif } void @@ -955,6 +989,21 @@ ice_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->conf.tx_rs_thresh = txq->tx_rs_thresh; qinfo->conf.offloads = txq->offloads; qinfo->conf.tx_deferred_start = txq->tx_deferred_start; + + if (dev->tx_pkt_burst == ice_xmit_pkts_simple) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Simple Tx"); + else if (dev->tx_pkt_burst == ice_xmit_pkts) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Normal Tx"); +#ifdef RTE_ARCH_X86 + else if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx2) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "AVX2 Vector Tx"); + else if (dev->tx_pkt_burst == ice_xmit_pkts_vec) + snprintf(qinfo->burst_info, sizeof(qinfo->burst_info), + "Vector Tx"); +#endif } uint32_t -- 2.7.4
On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
>
> Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> the Debug CLI what rx/tx function is being used:
> #show hardware-interface
>
> tx burst function: ice_xmit_pkts
> rx burst function: ice_recv_scattered_pkts
>
> But if the tx/rx is static, then 'dladdr' will return nil:
>
> tx burst function: (nil) │······················
> rx burst function: (nil) │······················
>
> For making things consistent and gracefull, we introduce an new string
> field to describe the Rx/Tx burst information. This is vendor-neutral,
> it is used to identify the Rx/Tx burst selection if the PMD has more
> than one.
>
> If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
The rx/tx handlers are the same for all queues of a ethdev port.
What is the added value to put this in a per queue api ?
--
David Marchand
On Mon, 12 Aug 2019 22:15:03 +0800
Haiyue Wang <haiyue.wang@intel.com> wrote:
> Since each PMD has different Rx/Tx burst capabilities such as Vector,
> Scattered, Bulk etc, adding the Rx/Tx burst description field in queue
> information to provide apps current configuration of PMD Rx/Tx burst.
>
> This is a self-description for each PMD in its own format.
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
I can see why it might help with diagnosing issues on VPP,
but it would have bigger impacts for other users of DPDK.
Think of a better way that doesn't break ABI.
This is not enough value to make the DPDK more unstable.
On Mon, 12 Aug 2019 16:27:11 +0200
David Marchand <david.marchand@redhat.com> wrote:
> On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> >
> > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> > the Debug CLI what rx/tx function is being used:
> > #show hardware-interface
> >
> > tx burst function: ice_xmit_pkts
> > rx burst function: ice_recv_scattered_pkts
> >
> > But if the tx/rx is static, then 'dladdr' will return nil:
> >
> > tx burst function: (nil) │······················
> > rx burst function: (nil) │······················
> >
> > For making things consistent and gracefull, we introduce an new string
> > field to describe the Rx/Tx burst information. This is vendor-neutral,
> > it is used to identify the Rx/Tx burst selection if the PMD has more
> > than one.
> >
> > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
>
> The rx/tx handlers are the same for all queues of a ethdev port.
> What is the added value to put this in a per queue api ?
With some symbol table lookup tools it is possible to do introspection
to find the symbol from the function pointer. Without breaking API/ABI.
> -----Original Message----- > From: David Marchand [mailto:david.marchand@redhat.com] > Sent: Monday, August 12, 2019 22:27 > To: Wang, Haiyue <haiyue.wang@intel.com> > Cc: dev <dev@dpdk.org> > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field > > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote: > > > > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in > > the Debug CLI what rx/tx function is being used: > > #show hardware-interface > > > > tx burst function: ice_xmit_pkts > > rx burst function: ice_recv_scattered_pkts > > > > But if the tx/rx is static, then 'dladdr' will return nil: > > > > tx burst function: (nil) │······················ > > rx burst function: (nil) │······················ > > > > For making things consistent and gracefull, we introduce an new string > > field to describe the Rx/Tx burst information. This is vendor-neutral, > > it is used to identify the Rx/Tx burst selection if the PMD has more > > than one. > > > > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'. > > The rx/tx handlers are the same for all queues of a ethdev port. > What is the added value to put this in a per queue api ? > We will add support Receive Flex Descriptor per queue in 19.11: drivers/net/ice/base/ice_lan_tx_rx.h --> enum ice_rxdid Then the burst_info will be Vector (generic info) + RXDID info, that's why we changed the design from const char * to char []. > > -- > David Marchand
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Monday, August 12, 2019 23:38
> To: David Marchand <david.marchand@redhat.com>
> Cc: Wang, Haiyue <haiyue.wang@intel.com>; dev <dev@dpdk.org>
> Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
>
> On Mon, 12 Aug 2019 16:27:11 +0200
> David Marchand <david.marchand@redhat.com> wrote:
>
> > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > >
> > > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> > > the Debug CLI what rx/tx function is being used:
> > > #show hardware-interface
> > >
> > > tx burst function: ice_xmit_pkts
> > > rx burst function: ice_recv_scattered_pkts
> > >
> > > But if the tx/rx is static, then 'dladdr' will return nil:
> > >
> > > tx burst function: (nil) │······················
> > > rx burst function: (nil) │······················
> > >
> > > For making things consistent and gracefull, we introduce an new string
> > > field to describe the Rx/Tx burst information. This is vendor-neutral,
> > > it is used to identify the Rx/Tx burst selection if the PMD has more
> > > than one.
> > >
> > > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
> >
> > The rx/tx handlers are the same for all queues of a ethdev port.
> > What is the added value to put this in a per queue api ?
>
> With some symbol table lookup tools it is possible to do introspection
> to find the symbol from the function pointer. Without breaking API/ABI.
Sounds cool, any link can be reached ?
VPP uses as below, but will fail for static function.
static const char *
ptr2sname (void *p)
{
Dl_info info = { 0 };
if (dladdr (p, &info) == 0)
return 0;
return info.dli_sname;
}
On Mon, 12 Aug 2019 15:42:45 +0000
"Wang, Haiyue" <haiyue.wang@intel.com> wrote:
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Monday, August 12, 2019 23:38
> > To: David Marchand <david.marchand@redhat.com>
> > Cc: Wang, Haiyue <haiyue.wang@intel.com>; dev <dev@dpdk.org>
> > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
> >
> > On Mon, 12 Aug 2019 16:27:11 +0200
> > David Marchand <david.marchand@redhat.com> wrote:
> >
> > > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > > >
> > > > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> > > > the Debug CLI what rx/tx function is being used:
> > > > #show hardware-interface
> > > >
> > > > tx burst function: ice_xmit_pkts
> > > > rx burst function: ice_recv_scattered_pkts
> > > >
> > > > But if the tx/rx is static, then 'dladdr' will return nil:
> > > >
> > > > tx burst function: (nil) │······················
> > > > rx burst function: (nil) │······················
> > > >
> > > > For making things consistent and gracefull, we introduce an new string
> > > > field to describe the Rx/Tx burst information. This is vendor-neutral,
> > > > it is used to identify the Rx/Tx burst selection if the PMD has more
> > > > than one.
> > > >
> > > > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
> > >
> > > The rx/tx handlers are the same for all queues of a ethdev port.
> > > What is the added value to put this in a per queue api ?
> >
> > With some symbol table lookup tools it is possible to do introspection
> > to find the symbol from the function pointer. Without breaking API/ABI.
>
> Sounds cool, any link can be reached ?
>
> VPP uses as below, but will fail for static function.
>
> static const char *
> ptr2sname (void *p)
> {
> Dl_info info = { 0 };
>
> if (dladdr (p, &info) == 0)
> return 0;
>
> return info.dli_sname;
> }
You need to link with -g and not strip the binary.
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Monday, August 12, 2019 23:54
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: David Marchand <david.marchand@redhat.com>; dev <dev@dpdk.org>
> Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
>
> On Mon, 12 Aug 2019 15:42:45 +0000
> "Wang, Haiyue" <haiyue.wang@intel.com> wrote:
>
> > > -----Original Message-----
> > > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > > Sent: Monday, August 12, 2019 23:38
> > > To: David Marchand <david.marchand@redhat.com>
> > > Cc: Wang, Haiyue <haiyue.wang@intel.com>; dev <dev@dpdk.org>
> > > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
> > >
> > > On Mon, 12 Aug 2019 16:27:11 +0200
> > > David Marchand <david.marchand@redhat.com> wrote:
> > >
> > > > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > > > >
> > > > > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> > > > > the Debug CLI what rx/tx function is being used:
> > > > > #show hardware-interface
> > > > >
> > > > > tx burst function: ice_xmit_pkts
> > > > > rx burst function: ice_recv_scattered_pkts
> > > > >
> > > > > But if the tx/rx is static, then 'dladdr' will return nil:
> > > > >
> > > > > tx burst function: (nil) │······················
> > > > > rx burst function: (nil) │······················
> > > > >
> > > > > For making things consistent and gracefull, we introduce an new string
> > > > > field to describe the Rx/Tx burst information. This is vendor-neutral,
> > > > > it is used to identify the Rx/Tx burst selection if the PMD has more
> > > > > than one.
> > > > >
> > > > > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
> > > >
> > > > The rx/tx handlers are the same for all queues of a ethdev port.
> > > > What is the added value to put this in a per queue api ?
> > >
> > > With some symbol table lookup tools it is possible to do introspection
> > > to find the symbol from the function pointer. Without breaking API/ABI.
> >
> > Sounds cool, any link can be reached ?
> >
> > VPP uses as below, but will fail for static function.
> >
> > static const char *
> > ptr2sname (void *p)
> > {
> > Dl_info info = { 0 };
> >
> > if (dladdr (p, &info) == 0)
> > return 0;
> >
> > return info.dli_sname;
> > }
>
> You need to link with -g and not strip the binary.
You mean gdb debug mode, I guess they will not accept this also. ;-)
On Mon, 12 Aug 2019 16:00:27 +0000
"Wang, Haiyue" <haiyue.wang@intel.com> wrote:
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Monday, August 12, 2019 23:54
> > To: Wang, Haiyue <haiyue.wang@intel.com>
> > Cc: David Marchand <david.marchand@redhat.com>; dev <dev@dpdk.org>
> > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
> >
> > On Mon, 12 Aug 2019 15:42:45 +0000
> > "Wang, Haiyue" <haiyue.wang@intel.com> wrote:
> >
> > > > -----Original Message-----
> > > > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > > > Sent: Monday, August 12, 2019 23:38
> > > > To: David Marchand <david.marchand@redhat.com>
> > > > Cc: Wang, Haiyue <haiyue.wang@intel.com>; dev <dev@dpdk.org>
> > > > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
> > > >
> > > > On Mon, 12 Aug 2019 16:27:11 +0200
> > > > David Marchand <david.marchand@redhat.com> wrote:
> > > >
> > > > > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > > > > >
> > > > > > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> > > > > > the Debug CLI what rx/tx function is being used:
> > > > > > #show hardware-interface
> > > > > >
> > > > > > tx burst function: ice_xmit_pkts
> > > > > > rx burst function: ice_recv_scattered_pkts
> > > > > >
> > > > > > But if the tx/rx is static, then 'dladdr' will return nil:
> > > > > >
> > > > > > tx burst function: (nil) │······················
> > > > > > rx burst function: (nil) │······················
> > > > > >
> > > > > > For making things consistent and gracefull, we introduce an new string
> > > > > > field to describe the Rx/Tx burst information. This is vendor-neutral,
> > > > > > it is used to identify the Rx/Tx burst selection if the PMD has more
> > > > > > than one.
> > > > > >
> > > > > > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
> > > > >
> > > > > The rx/tx handlers are the same for all queues of a ethdev port.
> > > > > What is the added value to put this in a per queue api ?
> > > >
> > > > With some symbol table lookup tools it is possible to do introspection
> > > > to find the symbol from the function pointer. Without breaking API/ABI.
> > >
> > > Sounds cool, any link can be reached ?
> > >
> > > VPP uses as below, but will fail for static function.
> > >
> > > static const char *
> > > ptr2sname (void *p)
> > > {
> > > Dl_info info = { 0 };
> > >
> > > if (dladdr (p, &info) == 0)
> > > return 0;
> > >
> > > return info.dli_sname;
> > > }
> >
> > You need to link with -g and not strip the binary.
>
> You mean gdb debug mode, I guess they will not accept this also. ;-)
There other ways to mark symbol as non-debug but -g is easiest.
One way is to not mark the function as static.
Other ways are to achieve the same think like __attribute((visibility())
and linker scripts etc.
Remember this is VPP you are talking about and it doesn't use standard
DPDK make and flags.
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, August 13, 2019 01:29
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: David Marchand <david.marchand@redhat.com>; dev <dev@dpdk.org>
> Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
>
> On Mon, 12 Aug 2019 16:00:27 +0000
> "Wang, Haiyue" <haiyue.wang@intel.com> wrote:
>
> > > -----Original Message-----
> > > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > > Sent: Monday, August 12, 2019 23:54
> > > To: Wang, Haiyue <haiyue.wang@intel.com>
> > > Cc: David Marchand <david.marchand@redhat.com>; dev <dev@dpdk.org>
> > > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
> > >
> > > On Mon, 12 Aug 2019 15:42:45 +0000
> > > "Wang, Haiyue" <haiyue.wang@intel.com> wrote:
> > >
> > > > > -----Original Message-----
> > > > > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > > > > Sent: Monday, August 12, 2019 23:38
> > > > > To: David Marchand <david.marchand@redhat.com>
> > > > > Cc: Wang, Haiyue <haiyue.wang@intel.com>; dev <dev@dpdk.org>
> > > > > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field
> > > > >
> > > > > On Mon, 12 Aug 2019 16:27:11 +0200
> > > > > David Marchand <david.marchand@redhat.com> wrote:
> > > > >
> > > > > > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > > > > > >
> > > > > > > Since some PMDs have multi-path for Rx/Tx, FD.io VPP will tell you in
> > > > > > > the Debug CLI what rx/tx function is being used:
> > > > > > > #show hardware-interface
> > > > > > >
> > > > > > > tx burst function: ice_xmit_pkts
> > > > > > > rx burst function: ice_recv_scattered_pkts
> > > > > > >
> > > > > > > But if the tx/rx is static, then 'dladdr' will return nil:
> > > > > > >
> > > > > > > tx burst function: (nil) │······················
> > > > > > > rx burst function: (nil) │······················
> > > > > > >
> > > > > > > For making things consistent and gracefull, we introduce an new string
> > > > > > > field to describe the Rx/Tx burst information. This is vendor-neutral,
> > > > > > > it is used to identify the Rx/Tx burst selection if the PMD has more
> > > > > > > than one.
> > > > > > >
> > > > > > > If a PMD supports this, then rxqinfo/txqinfo->burst_info[0] != '\0'.
> > > > > >
> > > > > > The rx/tx handlers are the same for all queues of a ethdev port.
> > > > > > What is the added value to put this in a per queue api ?
> > > > >
> > > > > With some symbol table lookup tools it is possible to do introspection
> > > > > to find the symbol from the function pointer. Without breaking API/ABI.
> > > >
> > > > Sounds cool, any link can be reached ?
> > > >
> > > > VPP uses as below, but will fail for static function.
> > > >
> > > > static const char *
> > > > ptr2sname (void *p)
> > > > {
> > > > Dl_info info = { 0 };
> > > >
> > > > if (dladdr (p, &info) == 0)
> > > > return 0;
> > > >
> > > > return info.dli_sname;
> > > > }
> > >
> > > You need to link with -g and not strip the binary.
> >
> > You mean gdb debug mode, I guess they will not accept this also. ;-)
>
> There other ways to mark symbol as non-debug but -g is easiest.
> One way is to not mark the function as static.
> Other ways are to achieve the same think like __attribute((visibility())
> and linker scripts etc.
>
> Remember this is VPP you are talking about and it doesn't use standard
> DPDK make and flags.
>
Yes, this calling is a little geek style, so we are trying to scratch
some code to make thing graceful, at least, this makes sense if multiple
rx /tx paths are provided.
Thanks for your quick feedback, we will try to find other possible design.