Message ID | 1565619305-17116-1-git-send-email-haiyue.wang@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 41098378B; Mon, 12 Aug 2019 16:20:13 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 36ED727D for <dev@dpdk.org>; Mon, 12 Aug 2019 16:20:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 07:20:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,377,1559545200"; d="scan'208";a="327368410" Received: from npg-dpdk-haiyue-1.sh.intel.com ([10.67.111.73]) by orsmga004.jf.intel.com with ESMTP; 12 Aug 2019 07:20:09 -0700 From: Haiyue Wang <haiyue.wang@intel.com> To: dev@dpdk.org Cc: Haiyue Wang <haiyue.wang@intel.com> Date: Mon, 12 Aug 2019 22:15:02 +0800 Message-Id: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description field X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series | show the Rx/Tx burst description field | |
Message
Wang, Haiyue
Aug. 12, 2019, 2:15 p.m. UTC
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(+)
Comments
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 ?
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.