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 D5D06A04B5; Thu, 17 Sep 2020 05:00:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 579D61D446; Thu, 17 Sep 2020 05:00:30 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E1C1F1D444 for ; Thu, 17 Sep 2020 05:00:28 +0200 (CEST) IronPort-SDR: kLMvDyWY8dRfc7XkPHcZKolwJz+hAOFMHweMQWEvQrfIMk4eX4Z3Ku8MQoeNeNcCCFyejMcAwV wKWCXNZFp+0Q== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="147296686" X-IronPort-AV: E=Sophos;i="5.76,434,1592895600"; d="scan'208";a="147296686" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 20:00:27 -0700 IronPort-SDR: syq0BMuhAbWdU0nsbT1MQuhpNki1uMl+wb24MqSyul585RFstVxvLM63KDiK4fWn823wl+1JMy GuSaRQKmVatw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,434,1592895600"; d="scan'208";a="346451924" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga007.jf.intel.com with ESMTP; 16 Sep 2020 20:00:27 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 16 Sep 2020 20:00:27 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Sep 2020 20:00:27 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 16 Sep 2020 20:00:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpm0VPhJlON2l+KHHdMcdyCyX+nsOgUfczD7WBk9CsGaVwp6ktVSRJoLegT1IgOG3Zm5xH6RNI+WcHnBlzt889rfoU2PN/NtR7TTUP3ZMVqpcm0wFe0JAEaZsv6F2nBZOd3oWzHQh/rmczbWggMnoG9kVSFha53xVnOmQiLsA3bEQBU9dvP/QWJdhTeQpj4PJ7ov/uJ3ngopMTzIRdKPgbNpHlzuE31xv1DOSzAZp0swj+SrtxXqEiWBYf+V/g03C9D3qb6NKYXEIpEasS4L2KbrvC0EfSfFpA0qJJII/XoSpRxTarKRmy0Id7mtesIQm7dDE+BGTNcAgmj56Our5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n1R1UlY2IDqIXKrDIKFNo6vGhBXhwVJ4Hg/kZlBXutU=; b=aS+XaABIoGLrx4NCcGEXbKk9v7u09I/AJalI9FOJJNHerTmGaXe4U5VTUGuoUu57dKwwU3Tz0kUZ5LU/DQBIbcv+fH8iP32Y4KzIMexCkOifnVV5edu83U7gmsq/Y59mjMThDmRWZ1vvRf4gZYhr/7cVFrUhfIYVcQzdi//OYlIM0Ey0jAcMGUkxBXemtYgVF0jZ/AAn29+R8XZmYSO3E5Y93r/io/3wtG7AG+HnL7mBmbNfrqbrNOnBheo81dECybUVJ9NGj53nRAdl+SxiyECPjF2HHZpUMAuI0XKb77l6e9wGNzOMqrKjCZgclBE5oRdNfh7j5gsL/4C3nJz8CA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n1R1UlY2IDqIXKrDIKFNo6vGhBXhwVJ4Hg/kZlBXutU=; b=qgGG9nW8uZU4SJUJsKrk5g0p5gnBpDcGiR7F6Nu4TCkM7C43l2EPhDMXZgeZ+2W5z14cWZAb2QBKe0jqPAjKh4fOrYyxtOeuM9RiyM7dKBIi5QVA9d3EAb6bOn0IUTu09BRKFIclUJmMbyQjVfb1TAOA5ewUYjqefu4VSkv87u4= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN6PR11MB0035.namprd11.prod.outlook.com (2603:10b6:405:62::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 17 Sep 2020 03:00:11 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e4a8:91ab:e032:b8ae]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e4a8:91ab:e032:b8ae%5]) with mapi id 15.20.3370.019; Thu, 17 Sep 2020 03:00:11 +0000 From: "Wang, Haiyue" To: "Guo, Jia" , "Wu, Jingjing" , "Zhang, Qi Z" , "Xing, Beilei" CC: "dev@dpdk.org" , "Guo, Jia" Thread-Topic: [dpdk-dev] [PATCH v1] net/iavf: support flex desc metadata extraction Thread-Index: AQHWhlTViE5C8zS5qkmHtoli3hOapqlsKpIg Date: Thu, 17 Sep 2020 03:00:10 +0000 Message-ID: References: <20200909025415.6185-1-jia.guo@intel.com> In-Reply-To: <20200909025415.6185-1-jia.guo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2e9c9fdd-9585-431d-427c-08d85ab5cabf x-ms-traffictypediagnostic: BN6PR11MB0035: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:265; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Q8q7S31ox6xQHNcOH5Q7IK+L4Di/2LwxbsxnMpZsT97UHvpgC1vVuw2VZeyn82XhC/Kvgdr1otkqFw6Xr4CO0RWUnpdgevcnnvx/jav/RcmYiahCtzflGPuM2kQjBrj4V3K2yPUfVBIw2KgV/EqUkLC4xwLHOAN9RjLADoZhcpsQcJ1cmL7JK703P9oEZVJVY8qoxOTytc+v41CCmqDiihf/U0KqyBySLVg1Y4MIVgVxJgrdRs86FehO5X1RSBmImpr0uPDsGZh9Peldc6AQH6TBk6KrjHT68Iy3jY9I++Xw2WbUujNrRnd4j0vUHhoVXrH8LixO6A1tdGA21tmts1ENoGuMhAzfIX6OjysQdI+JFOHJIhrLoPGaHsCF1Pmh x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(376002)(136003)(346002)(39860400002)(30864003)(2906002)(6636002)(54906003)(9686003)(55016002)(107886003)(5660300002)(7696005)(110136005)(52536014)(316002)(6506007)(66446008)(86362001)(71200400001)(478600001)(8936002)(64756008)(83380400001)(53546011)(33656002)(4326008)(76116006)(19627235002)(66946007)(26005)(66476007)(66556008)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: yVsr/FOAli+Iity2GjEghyFF8+NuWTV3dP3MmcxfnfOTqgF/fyDZ/IuWiCObp/nu7wXZzsPjBBDKfqQX/ged5F5197d0wNB6Ew5g755/86NfU93gPR+Kv9jdSKz0a458MMIw9cQ6xX5z5yWFf1ii85WQyKX+d1W5YwAlO92FqSp+uEJqBX9sANG6UgDY8F9BtUXMdz2xpghaBrRX8/UI8tg4MZfxis9qJX5yplTAacAEBkIXCkjm7wvzPhjFBfiDKL3O8HW43EU7QFyvv1LFY6FESwb+P2Uj6kXqTNu9tYOEm7iFMf8NI5npMcQ9NLnEp6qfy0HNwv1yVj1sgw13ISDelwK5ZWZRjm3xzoFDfDkQPTQKulryGamO7ZQsrXZDYjfwG7yeO55EDYLYcz0cHoPN/Tfc815Ru2qrEPlVRTbAIdtwqJead/FH6knhexthKv5C9od88CA1C0miL6n/AUf+XHkhr9wjluyG59NpUtaSrFjK8H0s2wKq2B/RNRg7692IpeYMWQCRQ5h57toea66pCeXPM+a+Mszxh+zEFiVhzj0gpEpaSFwZbYS+NUkQeCjje6P53Gdw0DlY+N51wWNoTCxDYZyRbrrvcgnMt/CqcT/qgG0/xnU+lGGJ1M3zpPs/iTz4W52uTUxe7NtSmQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e9c9fdd-9585-431d-427c-08d85ab5cabf X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2020 03:00:10.7219 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 67ZvD7jy/MnKlCK/6qdKdPrclx3U22G6rizKmeScTCYdA1dEP6vUn3C/3eszlgrvwuAPBrZjKtF32RRm9UG0ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB0035 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1] net/iavf: support flex desc metadata extraction 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" Hi Jeff, > -----Original Message----- > From: dev On Behalf Of Jeff Guo > Sent: Wednesday, September 9, 2020 10:54 > To: Wu, Jingjing ; Zhang, Qi Z ; Xing, Beilei > > Cc: dev@dpdk.org; Guo, Jia > Subject: [dpdk-dev] [PATCH v1] net/iavf: support flex desc metadata extra= ction >=20 > Enable metadata extraction for flexible descriptors in AVF, that would > allow network function directly get metadata without additional parsing > which would reduce the CPU cost for VFs. The enabling metadata > extractions involve the metadata of VLAN/IPv4/IPv6/IPv6-FLOW/TCP/OVS/ > MPLS flexible descriptors, and the VF could negotiate the capability of > the flexible descriptor with PF and correspondingly configure the > specific offload at receiving queues. >=20 > Signed-off-by: Jeff Guo > --- > doc/guides/rel_notes/release_20_11.rst | 6 + > drivers/net/iavf/Makefile | 1 + > drivers/net/iavf/iavf.h | 25 +- > drivers/net/iavf/iavf_ethdev.c | 398 +++++++++++++++++++++++++ > drivers/net/iavf/iavf_rxtx.c | 230 +++++++++++++- > drivers/net/iavf/iavf_rxtx.h | 17 ++ > drivers/net/iavf/iavf_vchnl.c | 22 +- > drivers/net/iavf/meson.build | 2 + > drivers/net/iavf/rte_pmd_iavf.h | 258 ++++++++++++++++ > 9 files changed, 937 insertions(+), 22 deletions(-) > create mode 100644 drivers/net/iavf/rte_pmd_iavf.h >=20 > ------------- > diff --git a/drivers/net/iavf/Makefile b/drivers/net/iavf/Makefile > index 792cbb7f7..05fcbdc47 100644 > --- a/drivers/net/iavf/Makefile > +++ b/drivers/net/iavf/Makefile meson build only now, remove the Makefile > diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c > index 05a7dd898..fa71b4a80 100644 > --- a/drivers/net/iavf/iavf_rxtx.c > +++ b/drivers/net/iavf/iavf_rxtx.c > @@ -26,6 +26,74 @@ > + > +/* Translate the rx flex descriptor status to pkt flags */ > +static inline void > +iavf_rxd_to_pkt_fields(struct rte_mbuf *mb, > + volatile union iavf_rx_flex_desc *rxdp, uint8_t rxdid) > +{ > + if (rxdid =3D=3D IAVF_RXDID_COMMS_GENERIC || > + rxdid =3D=3D IAVF_RXDID_COMMS_AUX_VLAN || > + rxdid =3D=3D IAVF_RXDID_COMMS_AUX_IPV4 || > + rxdid =3D=3D IAVF_RXDID_COMMS_AUX_IPV6 || > + rxdid =3D=3D IAVF_RXDID_COMMS_AUX_IPV6_FLOW || > + rxdid =3D=3D IAVF_RXDID_COMMS_AUX_TCP || > + rxdid =3D=3D IAVF_RXDID_COMMS_AUX_IP_OFFSET) > + iavf_rxd_to_pkt_fields_aux(mb, rxdp); > + else if (rxdid =3D=3D IAVF_RXDID_COMMS_OVS_1) > + iavf_rxd_to_pkt_fields_ovs(mb, rxdp); > +} We can optimize this by calling function handle: struct iavf_rx_queue *rxq->rxd_to_pkt_fields(mb, rxdp) and when setup the queue, assign the right handle according to the rxdid. if (rxdid =3D=3D IAVF_RXDID_COMMS_GENERIC ...) rxq->rxd_to_pkt_fields =3D iavf_rxd_to_pkt_fields_aux; else if (OVS_1) rxq->rxd_to_pkt_fields =3D iavf_rxd_to_pkt_fields_ovs; > --- a/drivers/net/iavf/meson.build > +++ b/drivers/net/iavf/meson.build > @@ -35,3 +35,5 @@ if arch_subdir =3D=3D 'x86' > objs +=3D iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c') > endif > endif > + > +install_headers('rte_pmd_iavf.h') > diff --git a/drivers/net/iavf/rte_pmd_iavf.h b/drivers/net/iavf/rte_pmd_i= avf.h > new file mode 100644 > index 000000000..858201bd7 > --- /dev/null > +++ b/drivers/net/iavf/rte_pmd_iavf.h > @@ -0,0 +1,258 @@ > +/* SPDX-Liavfnse-Identifier: BSD-3-Clause > + * Copyright(c) 2019 Intel Corporation > + */ > + > +#ifndef _RTE_PMD_IAVF_H_ > +#define _RTE_PMD_IAVF_H_ > + > +/** > + * @file rte_pmd_iavf.h > + * > + * iavf PMD specific functions. > + * > + * @b EXPERIMENTAL: this API may change, or be removed, without prior no= tiavf > + * > + */ > + > +#include > +#include > +#include > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +/** > + * The supported network flexible descriptor's extraction metadata forma= t. > + */ > +union rte_net_iavf_flex_desc_metadata { > + uint32_t metadata; > + > + struct { > + uint16_t data0; > + uint16_t data1; > + } raw; > + > + struct { > + uint16_t stag_vid:12, > + stag_dei:1, > + stag_pcp:3; > + uint16_t ctag_vid:12, > + ctag_dei:1, > + ctag_pcp:3; > + } vlan; > + > + struct { > + uint16_t protocol:8, > + ttl:8; > + uint16_t tos:8, > + ihl:4, > + version:4; > + } ipv4; > + > + struct { > + uint16_t hoplimit:8, > + nexthdr:8; > + uint16_t flowhi4:4, > + tc:8, > + version:4; > + } ipv6; > + > + struct { > + uint16_t flowlo16; > + uint16_t flowhi4:4, > + tc:8, > + version:4; > + } ipv6_flow; > + > + struct { > + uint16_t fin:1, > + syn:1, > + rst:1, > + psh:1, > + ack:1, > + urg:1, > + ece:1, > + cwr:1, > + res1:4, > + doff:4; > + uint16_t rsvd; > + } tcp; > + > + uint32_t ip_ofs; > +}; > + > +/* Offset of mbuf dynamic field for flexible descriptor's extraction dat= a */ > +extern int rte_net_iavf_dynfield_flex_desc_metadata_offs; > + > +/* Mask of mbuf dynamic flags for flexible descriptor's extraction type = */ > +extern uint64_t rte_net_iavf_dynflag_flex_desc_vlan_mask; > +extern uint64_t rte_net_iavf_dynflag_flex_desc_ipv4_mask; > +extern uint64_t rte_net_iavf_dynflag_flex_desc_ipv6_mask; > +extern uint64_t rte_net_iavf_dynflag_flex_desc_ipv6_flow_mask; > +extern uint64_t rte_net_iavf_dynflag_flex_desc_tcp_mask; > +extern uint64_t rte_net_iavf_dynflag_flex_desc_ovs_mask; > +extern uint64_t rte_net_iavf_dynflag_flex_desc_ip_offset_mask; > + > +/** > + * The mbuf dynamic field pointer for flexible descriptor's extraction m= etadata. > + */ > +#define RTE_NET_IAVF_DYNF_FLEX_DESC_METADATA(m) \ > + RTE_MBUF_DYNFIELD((m), \ > + rte_net_iavf_dynfield_flex_desc_metadata_offs, \ > + uint32_t *) > + > +/** > + * The mbuf dynamic flag for VLAN protocol extraction metadata, it is va= lid > + * when dev_args 'flex_desc' has 'vlan' specified. > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_VLAN \ > + (rte_net_iavf_dynflag_flex_desc_vlan_mask) > + > +/** > + * The mbuf dynamic flag for IPv4 protocol extraction metadata, it is va= lid > + * when dev_args 'flex_desc' has 'ipv4' specified. > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IPV4 \ > + (rte_net_iavf_dynflag_flex_desc_ipv4_mask) > + > +/** > + * The mbuf dynamic flag for IPv6 protocol extraction metadata, it is va= lid > + * when dev_args 'flex_desc' has 'ipv6' specified. > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IPV6 \ > + (rte_net_iavf_dynflag_flex_desc_ipv6_mask) > + > +/** > + * The mbuf dynamic flag for IPv6 with flow protocol extraction metadata= , it is > + * valid when dev_args 'flex_desc' has 'ipv6_flow' specified. > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IPV6_FLOW \ > + (rte_net_iavf_dynflag_flex_desc_ipv6_flow_mask) > + > +/** > + * The mbuf dynamic flag for TCP protocol extraction metadata, it is val= id > + * when dev_args 'flex_desc' has 'tcp' specified. > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_TCP \ > + (rte_net_iavf_dynflag_flex_desc_tcp_mask) > + > +/** > + * The mbuf dynamic flag for the extraction metadata of OVS flexible > + * descriptor, it is valid when dev_args 'flex_desc' has 'ovs' specified= . > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_OVS \ > + (rte_net_iavf_dynflag_flex_desc_ovs_mask) > + > +/** > + * The mbuf dynamic flag for IP_OFFSET extraction metadata, it is valid > + * when dev_args 'flex_desc' has 'ip_offset' specified. > + */ > +#define RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IP_OFFSET \ > + (rte_net_iavf_dynflag_flex_desc_ip_offset_mask) > + > +/** > + * Check if mbuf dynamic field for flexible descriptor's extraction meta= data > + * is registered. > + * > + * @return > + * True if registered, false otherwise. > + */ > +__rte_experimental > +static __rte_always_inline int > +rte_net_iavf_dynf_flex_desc_metadata_avail(void) > +{ > + return rte_net_iavf_dynfield_flex_desc_metadata_offs !=3D -1; > +} > + > +/** > + * Get the mbuf dynamic field for flexible descriptor's extraction metad= ata. > + * > + * @param m > + * The pointer to the mbuf. > + * @return > + * The saved protocol extraction metadata. > + */ > +__rte_experimental > +static __rte_always_inline uint32_t > +rte_net_iavf_dynf_flex_desc_metadata_get(struct rte_mbuf *m) > +{ > + return *RTE_NET_IAVF_DYNF_FLEX_DESC_METADATA(m); > +} > + > +/** > + * Dump the mbuf dynamic field for flexible descriptor's extraction meta= data. > + * > + * @param m > + * The pointer to the mbuf. > + */ > +__rte_experimental > +static inline void > +rte_net_iavf_dump_flex_desc_metadata(struct rte_mbuf *m) > +{ > + union rte_net_iavf_flex_desc_metadata data; > + > + if (!rte_net_iavf_dynf_flex_desc_metadata_avail()) > + return; > + > + data.metadata =3D rte_net_iavf_dynf_flex_desc_metadata_get(m); > + > + if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_VLAN) > + printf(" - Flexible descriptor's Metadata: [0x%04x:0x%04x]," > + "vlan,stag=3D%u:%u:%u,ctag=3D%u:%u:%u", > + data.raw.data0, data.raw.data1, > + data.vlan.stag_pcp, > + data.vlan.stag_dei, > + data.vlan.stag_vid, > + data.vlan.ctag_pcp, > + data.vlan.ctag_dei, > + data.vlan.ctag_vid); > + else if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IPV4) > + printf(" - Flexible descriptor's Metadata: [0x%04x:0x%04x]," > + "ipv4,ver=3D%u,hdrlen=3D%u,tos=3D%u,ttl=3D%u,proto=3D%u", > + data.raw.data0, data.raw.data1, > + data.ipv4.version, > + data.ipv4.ihl, > + data.ipv4.tos, > + data.ipv4.ttl, > + data.ipv4.protocol); > + else if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IPV6) > + printf(" - Flexible descriptor's Metadata: [0x%04x:0x%04x]," > + "ipv6,ver=3D%u,tc=3D%u,flow_hi4=3D0x%x,nexthdr=3D%u,hoplimit=3D= %u", > + data.raw.data0, data.raw.data1, > + data.ipv6.version, > + data.ipv6.tc, > + data.ipv6.flowhi4, > + data.ipv6.nexthdr, > + data.ipv6.hoplimit); > + else if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IPV6_FLOW) > + printf(" - Flexible descriptor's Metadata: [0x%04x:0x%04x]," > + "ipv6_flow,ver=3D%u,tc=3D%u,flow=3D0x%x%04x", > + data.raw.data0, data.raw.data1, > + data.ipv6_flow.version, > + data.ipv6_flow.tc, > + data.ipv6_flow.flowhi4, > + data.ipv6_flow.flowlo16); > + else if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_TCP) > + printf(" - Flexible descriptor's Metadata: [0x%04x:0x%04x]," > + "tcp,doff=3D%u,flags=3D%s%s%s%s%s%s%s%s", > + data.raw.data0, data.raw.data1, > + data.tcp.doff, > + data.tcp.cwr ? "C" : "", > + data.tcp.ece ? "E" : "", > + data.tcp.urg ? "U" : "", > + data.tcp.ack ? "A" : "", > + data.tcp.psh ? "P" : "", > + data.tcp.rst ? "R" : "", > + data.tcp.syn ? "S" : "", > + data.tcp.fin ? "F" : ""); > + else if (m->ol_flags & RTE_IAVF_PKT_RX_DYNF_FLEX_DESC_IP_OFFSET) > + printf(" - Flexible descriptor's Extraction: ip_offset=3D%u", > + data.ip_ofs); > +} > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif /* _RTE_PMD_IAVF_H_ */ You need to export these global symbols into rte_pmd_iavf_version.map like: EXPERIMENTAL { global: rte_net_iavf_dynfield_proto_xtr_metadata_offs; ... }; > -- > 2.20.1