From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8DED1A0471 for ; Mon, 12 Aug 2019 19:28:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 772E7326D; Mon, 12 Aug 2019 19:28:39 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by dpdk.org (Postfix) with ESMTP id 6D59A1252 for ; Mon, 12 Aug 2019 19:28:38 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id b13so50024061pfo.1 for ; Mon, 12 Aug 2019 10:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xvS0YzllrLNwourQkggM+746/en5J0XF+ZQ4rSoDY6g=; b=iYlPyLGI6WQ1Aj16E02C/G305jClQsTxwPVt4Hf3vbSPYoJdh394SQMwefLAHdTKR4 CNgQylbEyq6am4pTubUZmZOfbCFqxX5Rqa6ulozMRZ3uip7+2sFouKgpQ0mzFksuBPyf G6s6EcKp5aP7HG59xE5ASsI22SgZ6KsPXTqUlE1CcN17enELmzDqhKehNRTJUkXEFQZH uQZ42VBZmKl0CNGVmESFsGGc+16Dsc0NLaJiMNblxfYGuH+MtvNC+mkggBO77MZ/O03N p3K3Jvxvk5F8euRUutpoaHHIOPOImE87w8SYnHuCje2Fx+SoqsKauD7MuJoAGXabPGaV gIlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xvS0YzllrLNwourQkggM+746/en5J0XF+ZQ4rSoDY6g=; b=sjo2Ryzn6eng36TW5ilIoIgXoypINmQODu8inJnuIxQvqQJnkDYzNOFejtHiNL07tF 9zpVbTKi+VArvgBwKfJLTvnkxr9CV1HzoKYCH5at2L3eFfV8PCxr5IIMn2LqiSBXFxrL crZDitl3UOqgNrS9FAv85IrvHfNGCJYJvqcqRKEAlgkt8RFZAMUIlGa2GD6m8d/dUf6w JVjJ3upeTenLZC04GVs+PLmtEZ165tpHfyx/LbdIb2Vk2CKiUcfpaycDS7V7ox+4oswO /6RFw9ywMCnHQVmJ7XqHWjKT7/9bPId8X6u4xmfEmm/Hc/jj9QugSG1ZG/4dQjX5e71T A8Uw== X-Gm-Message-State: APjAAAVJxaTi0TYDufjduoJj2P71gcRo+NxbS1eGzFMgN3kjBLycjRTd oL18SlQGusx6Mp7xe9rDzEjMAA== X-Google-Smtp-Source: APXvYqyaN8PUkoOLqDRNo6fI/z2CurrPrBMYwEYH1W8o7PTx7DTB80urMCblcjBWqpzJrPZLM1bLyg== X-Received: by 2002:a63:221f:: with SMTP id i31mr31751680pgi.251.1565630917417; Mon, 12 Aug 2019 10:28:37 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 203sm8956831pfu.30.2019.08.12.10.28.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 10:28:37 -0700 (PDT) Date: Mon, 12 Aug 2019 10:28:30 -0700 From: Stephen Hemminger To: "Wang, Haiyue" Cc: David Marchand , dev Message-ID: <20190812102830.52bb35ad@hermes.lan> In-Reply-To: References: <1565619305-17116-1-git-send-email-haiyue.wang@intel.com> <20190812083823.72e7c2a9@hermes.lan> <20190812085414.03c119e7@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 12 Aug 2019 16:00:27 +0000 "Wang, Haiyue" wrote: > > -----Original Message----- > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > Sent: Monday, August 12, 2019 23:54 > > To: Wang, Haiyue > > Cc: David Marchand ; dev > > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst description f= ield > >=20 > > On Mon, 12 Aug 2019 15:42:45 +0000 > > "Wang, Haiyue" wrote: > > =20 > > > > -----Original Message----- > > > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > > > Sent: Monday, August 12, 2019 23:38 > > > > To: David Marchand > > > > Cc: Wang, Haiyue ; dev > > > > Subject: Re: [dpdk-dev] [RFC v1 0/3] show the Rx/Tx burst descripti= on field > > > > > > > > On Mon, 12 Aug 2019 16:27:11 +0200 > > > > David Marchand wrote: > > > > =20 > > > > > On Mon, Aug 12, 2019 at 4:20 PM Haiyue Wang wrote: =20 > > > > > > > > > > > > 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) =E2=94=82=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7 > > > > > > rx burst function: (nil) =E2=94=82=C2=B7=C2=B7=C2=B7= =C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2= =B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7=C2=B7 > > > > > > > > > > > > For making things consistent and gracefull, we introduce an new= string > > > > > > field to describe the Rx/Tx burst information. This is vendor-n= eutral, > > > > > > 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] != =3D '\0'. =20 > > > > > > > > > > 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 ? =20 > > > > > > > > With some symbol table lookup tools it is possible to do introspect= ion > > > > to find the symbol from the function pointer. Without breaking API/= ABI. =20 > > > > > > 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 =3D { 0 }; > > > > > > if (dladdr (p, &info) =3D=3D 0) > > > return 0; > > > > > > return info.dli_sname; > > > } =20 > >=20 > > You need to link with -g and not strip the binary. =20 >=20 > 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.