From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id ADE1229CA for ; Wed, 2 Mar 2016 21:11:40 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 02 Mar 2016 12:11:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,530,1449561600"; d="scan'208";a="58609482" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 02 Mar 2016 12:11:40 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 2 Mar 2016 12:11:39 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.232]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.132]) with mapi id 14.03.0248.002; Thu, 3 Mar 2016 04:11:32 +0800 From: "Chen, Jing D" To: "Tan, Jianfeng" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 05/12] pmd/fm10k: add dev_ptype_info_get implementation Thread-Index: AQHRcGTzLU4J1S594kqkGp7ULhj3J59Gndcw Date: Wed, 2 Mar 2016 20:11:30 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D04453611@shsmsx102.ccr.corp.intel.com> References: <1451544799-70776-1-git-send-email-jianfeng.tan@intel.com> <1456445371-147264-1-git-send-email-jianfeng.tan@intel.com> <1456445371-147264-6-git-send-email-jianfeng.tan@intel.com> In-Reply-To: <1456445371-147264-6-git-send-email-jianfeng.tan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmFiMzliZGItNzhiZC00MjFhLWJhZjktNjE5MjM0MmM3MTQ3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImIzOFhtZWVITjBGc05sUkhFdnFvbU5YRWpWTDJcL0d6M2FxMjB1NTFsTTEwPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 05/12] pmd/fm10k: add dev_ptype_info_get implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 20:11:41 -0000 Hi, -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jianfeng Tan Sent: Thursday, February 25, 2016 6:09 PM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v4 05/12] pmd/fm10k: add dev_ptype_info_get impl= ementation Signed-off-by: Jianfeng Tan --- drivers/net/fm10k/fm10k_ethdev.c | 50 ++++++++++++++++++++++++++++++++++= ++++ drivers/net/fm10k/fm10k_rxtx.c | 3 +++ drivers/net/fm10k/fm10k_rxtx_vec.c | 3 +++ 3 files changed, 56 insertions(+) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_eth= dev.c index 421266b..429cbdd 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1335,6 +1335,55 @@ fm10k_dev_infos_get(struct rte_eth_dev *dev, }; } =20 +#ifdef RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE +static const uint32_t * +fm10k_dev_ptype_info_get(struct rte_eth_dev *dev) { + if (dev->rx_pkt_burst =3D=3D fm10k_recv_pkts || + dev->rx_pkt_burst =3D=3D fm10k_recv_scattered_pkts) { + static uint32_t ptypes[] =3D { + /* refers to rx_desc_to_ol_flags() */ + RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV4_EXT, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L3_IPV6_EXT, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_UNKNOWN + }; + + return ptypes; + } else if (dev->rx_pkt_burst =3D=3D fm10k_recv_pkts_vec || + dev->rx_pkt_burst =3D=3D fm10k_recv_scattered_pkts_vec) { + static uint32_t ptypes_vec[] =3D { + /* refers to fm10k_desc_to_pktype_v() */ + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV4_EXT, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L3_IPV6_EXT, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_TUNNEL_GENEVE, + RTE_PTYPE_TUNNEL_NVGRE, + RTE_PTYPE_TUNNEL_VXLAN, + RTE_PTYPE_TUNNEL_GRE, + RTE_PTYPE_UNKNOWN + }; + + return ptypes_vec; + } + + return NULL; +} May I know when " fm10k_dev_ptype_info_get " will be called? In fm10k, the = actual=20 Rx/tx func will be decided after port is started.=20