Message ID | 20190806080206.1572-1-pbhagavatula@marvell.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 395471B949; Tue, 6 Aug 2019 10:02:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2C56D1B203 for <dev@dpdk.org>; Tue, 6 Aug 2019 10:02:11 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7680TRK010357 for <dev@dpdk.org>; Tue, 6 Aug 2019 01:02:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=WHtRAd9wn1m4s/RB+67oiZzFk3jVxBqdJw6uvZBAuC8=; b=S/53b4Snbhmhl2RcPXWf5jlGTDwVujBcxXMitxuHT7qHYUnZlMhJl+tN6xN5/1vn68RK zaivKsdbEzrDJ6q5vD0RshXUPLYuhukqzN/K+maOcKA8lpbDuh6Z/TFJWr2DvVQCKHHn TmUDRg3yGDIj/LLQeAJds2zU6TJal+bA2Ni7X2b9SNCFjLwKYsCPdkykHNSiiG+Fi9Kd 6RxCxiMb4eA1NnKBO8dk6C0YyKCsyUIwmsfe7WMOxuxFuMkJW1h3ZVyc6V1QS3gGrjsM cPFJQRHZY52RG+LB7nb/jcCLZCwzvEWCva64pRTdYYB0t/nqC/pCiuuhG1A3NTqljZQK lw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2u57mr29xn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <dev@dpdk.org>; Tue, 06 Aug 2019 01:02:09 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 6 Aug 2019 01:02:09 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 6 Aug 2019 01:02:09 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.50]) by maili.marvell.com (Postfix) with ESMTP id 82A063F703F; Tue, 6 Aug 2019 01:02:07 -0700 (PDT) From: <pbhagavatula@marvell.com> To: <jerinj@marvell.com> CC: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com> Date: Tue, 6 Aug 2019 13:32:01 +0530 Message-ID: <20190806080206.1572-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-06_04:2019-07-31,2019-08-06 signatures=0 Subject: [dpdk-dev] [RFC 0/3] ethdev: add ptype as Rx offload 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 |
ethdev: add ptype as Rx offload
|
|
Message
Pavan Nikhilesh Bhagavatula
Aug. 6, 2019, 8:02 a.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Add PTYPE to DEV_RX_OFFLOAD_* flags.
Currently, most of the NICs already support PTYPE parsing and update
the mbuf->packet_type through an internal lookup table, but there is
no way to disable the lookup if the application is not intrested in
ptypes returned by `rte_eth_dev_get_supported_ptypes`.
Pavan Nikhilesh (3):
ethdev: add ptype as an Rx offload
net: update Rx offload capabilities
examples: add Rx ptype offload
doc/guides/nics/features.rst | 3 +++
drivers/net/atlantic/atl_ethdev.c | 3 ++-
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
drivers/net/cxgbe/cxgbe.h | 3 ++-
drivers/net/dpaa/dpaa_ethdev.c | 3 ++-
drivers/net/dpaa2/dpaa2_ethdev.c | 3 ++-
drivers/net/e1000/em_rxtx.c | 3 ++-
drivers/net/e1000/igb_rxtx.c | 3 ++-
drivers/net/enetc/enetc_ethdev.c | 3 ++-
drivers/net/enic/enic_res.c | 3 ++-
drivers/net/failsafe/failsafe_ops.c | 6 ++++--
drivers/net/fm10k/fm10k_ethdev.c | 15 ++++++++-------
drivers/net/i40e/i40e_ethdev.c | 3 ++-
drivers/net/iavf/iavf_ethdev.c | 3 ++-
drivers/net/ice/ice_ethdev.c | 3 ++-
drivers/net/ixgbe/ixgbe_rxtx.c | 3 ++-
drivers/net/mlx4/mlx4_rxq.c | 3 ++-
drivers/net/mlx5/mlx5_rxq.c | 3 ++-
drivers/net/mvneta/mvneta_ethdev.h | 3 ++-
drivers/net/mvpp2/mrvl_ethdev.c | 3 ++-
drivers/net/netvsc/hn_rndis.c | 3 ++-
drivers/net/nfp/nfp_net.c | 3 ++-
drivers/net/octeontx/octeontx_ethdev.h | 3 ++-
drivers/net/octeontx2/otx2_ethdev.c | 5 +++++
drivers/net/octeontx2/otx2_ethdev.h | 15 ++++++++-------
drivers/net/qede/qede_ethdev.c | 3 ++-
drivers/net/tap/rte_eth_tap.c | 3 ++-
drivers/net/thunderx/nicvf_ethdev.h | 3 ++-
drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 ++-
examples/ip_fragmentation/main.c | 7 +++++++
examples/l3fwd-power/main.c | 8 ++++++++
examples/l3fwd/main.c | 9 +++++++++
examples/performance-thread/l3fwd-thread/main.c | 9 +++++++++
examples/tep_termination/vxlan_setup.c | 1 +
lib/librte_ethdev/rte_ethdev.h | 1 +
35 files changed, 111 insertions(+), 40 deletions(-)
--
2.17.1
Comments
> > Add PTYPE to DEV_RX_OFFLOAD_* flags. > > Currently, most of the NICs already support PTYPE parsing and update the > mbuf->packet_type through an internal lookup table, but there is no way to > disable the lookup if the application is not intrested in ptypes returned by > `rte_eth_dev_get_supported_ptypes`. > [Hemant] it will also mean introducing another check in datapath, if the application has asked for PTYPE offload - copy the results to mbuf->packet_type otherwise don't do it. Your second patch is incomplete in the sense that it only adds the capability. But it does not disable the lookups?
>-----Original Message----- >From: Hemant Agrawal <hemant.agrawal@nxp.com> >Sent: Tuesday, August 6, 2019 1:49 PM >To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin >Jacob Kollanukkaran <jerinj@marvell.com> >Cc: dev@dpdk.org >Subject: RE: [dpdk-dev] [RFC 0/3] ethdev: add ptype as Rx offload >> >> Add PTYPE to DEV_RX_OFFLOAD_* flags. >> >> Currently, most of the NICs already support PTYPE parsing and update >the >> mbuf->packet_type through an internal lookup table, but there is no >way to >> disable the lookup if the application is not intrested in ptypes >returned by >> `rte_eth_dev_get_supported_ptypes`. >> >[Hemant] it will also mean introducing another check in datapath, if the >application has asked for PTYPE offload - copy the results to mbuf- >>packet_type otherwise don't do it. > I think that having the check would give better performance than loading ptype table to L1 doing a lookup and copying it to mbuf when the application doesn't need it. >Your second patch is incomplete in the sense that it only adds the >capability. But it does not disable the lookups? It is upto the maintainer of the PMD to disable the lookup in data path. If there is a scope of optimization then they could do it. There is no harm in exposing PTYPE even RX_OFFLOAD_PTYPE is not enabled. I was hesitant to touch data path as it would be impossible to verify performance effect on all NICs.
On 8/6/19 11:47 AM, Pavan Nikhilesh Bhagavatula wrote: > >> -----Original Message----- >> From: Hemant Agrawal <hemant.agrawal@nxp.com> >> Sent: Tuesday, August 6, 2019 1:49 PM >> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin >> Jacob Kollanukkaran <jerinj@marvell.com> >> Cc: dev@dpdk.org >> Subject: RE: [dpdk-dev] [RFC 0/3] ethdev: add ptype as Rx offload >>> Add PTYPE to DEV_RX_OFFLOAD_* flags. >>> >>> Currently, most of the NICs already support PTYPE parsing and update >> the >>> mbuf->packet_type through an internal lookup table, but there is no >> way to >>> disable the lookup if the application is not intrested in ptypes >> returned by >>> `rte_eth_dev_get_supported_ptypes`. >>> >> [Hemant] it will also mean introducing another check in datapath, if the >> application has asked for PTYPE offload - copy the results to mbuf- >>> packet_type otherwise don't do it. > I think that having the check would give better performance than loading ptype table to L1 > doing a lookup and copying it to mbuf when the application doesn't need it. Anyway, if PMD decides that it is better to always provide packet type information - there is no harm. Basically if the offload is not requested it makes packet_type undefined in mbuf. >> Your second patch is incomplete in the sense that it only adds the >> capability. But it does not disable the lookups? > It is upto the maintainer of the PMD to disable the lookup in data path. If there is a scope of optimization > then they could do it. There is no harm in exposing PTYPE even RX_OFFLOAD_PTYPE is not enabled. > I was hesitant to touch data path as it would be impossible to verify performance effect on all NICs. I think it is the right way to approach it especially taking transition into account.
On Tue, 6 Aug 2019 12:06:35 +0300 Andrew Rybchenko <arybchenko@solarflare.com> wrote: > On 8/6/19 11:47 AM, Pavan Nikhilesh Bhagavatula wrote: > > > >> -----Original Message----- > >> From: Hemant Agrawal <hemant.agrawal@nxp.com> > >> Sent: Tuesday, August 6, 2019 1:49 PM > >> To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Jerin > >> Jacob Kollanukkaran <jerinj@marvell.com> > >> Cc: dev@dpdk.org > >> Subject: RE: [dpdk-dev] [RFC 0/3] ethdev: add ptype as Rx offload > >>> Add PTYPE to DEV_RX_OFFLOAD_* flags. > >>> > >>> Currently, most of the NICs already support PTYPE parsing and update > >> the > >>> mbuf->packet_type through an internal lookup table, but there is no > >> way to > >>> disable the lookup if the application is not intrested in ptypes > >> returned by > >>> `rte_eth_dev_get_supported_ptypes`. > >>> > >> [Hemant] it will also mean introducing another check in datapath, if the > >> application has asked for PTYPE offload - copy the results to mbuf- > >>> packet_type otherwise don't do it. > > I think that having the check would give better performance than loading ptype table to L1 > > doing a lookup and copying it to mbuf when the application doesn't need it. > > Anyway, if PMD decides that it is better to always provide packet type > information - there is no harm. Basically if the offload is not requested > it makes packet_type undefined in mbuf. > > >> Your second patch is incomplete in the sense that it only adds the > >> capability. But it does not disable the lookups? > > It is upto the maintainer of the PMD to disable the lookup in data path. If there is a scope of optimization > > then they could do it. There is no harm in exposing PTYPE even RX_OFFLOAD_PTYPE is not enabled. > > I was hesitant to touch data path as it would be impossible to verify performance effect on all NICs. > > I think it is the right way to approach it especially taking transition > into account. > With hardline API policy, this has to fail on compile for old applications. You can't magically assume that applications using ptype will set new feature.