From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0086.outbound.protection.outlook.com [104.47.0.86]) by dpdk.org (Postfix) with ESMTP id 9851E1B16A for ; Fri, 28 Sep 2018 09:46:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pIPKxuLKg8txhEZLjYVEO/37t4CIuc3kmjIENmsGxjA=; b=evqY18w5MT+zdAFEY6SknItktupiICQ6Bgm546FDSf65/Rzh4q25z7753z3M1OhjnyWwAo04yz0naiNwgf3CNhqcqcy4E2kttGKT8Bc0W17Ltc1ll6tZn24iDUS7n+8W8QcV8mC8hew0wZt3cepU0ks4RoRL9uIiB/eRlIAX8Wc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=G.Singh@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by DB5PR04MB1528.eurprd04.prod.outlook.com (2a01:111:e400:5993::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.20; Fri, 28 Sep 2018 07:46:37 +0000 From: Gagandeep Singh To: dev@dpdk.org, ferruh.yigit@intel.com Cc: pankaj.chauhan@nxp.com, Gagandeep Singh Date: Fri, 28 Sep 2018 13:16:00 +0530 Message-Id: <20180928074601.4287-4-g.singh@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180928074601.4287-1-g.singh@nxp.com> References: <20180928051647.32341-1-g.singh@nxp.com> <20180928074601.4287-1-g.singh@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0037.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::23) To DB5PR04MB1528.eurprd04.prod.outlook.com (2a01:111:e400:5993::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 401c597f-b037-45ea-160a-08d6251685ab X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB5PR04MB1528; X-Microsoft-Exchange-Diagnostics: 1; DB5PR04MB1528; 3:ZNs8ELP8CUacql++N9YVkHs2rzf/LZqu8NVm5jo8BADG19I0TvhYFDm44SPOEbxigKAaiJKrclLlpkT5dhdXTspeHFg9aReG9LevYD89HvvjwnWGQX74UvZGNID5et6FZCtdM+gXIICEqWyX/wTLMQrOwMoSqL2OHFv0FLLt9aI0mOp4x6IQRrC0AhiVLD9CmUPPLpf8Tz2pSfrXj1wIQJyrPeQPUX7ImNOQqCkZr6GTsKeNt2ER9zwfNu8MTD56; 25:sIjip+Hegb1uON6Hddha1GtLLrRm7FDy2UFbaXY1wfn9qO1ueXg4vMSfOkT6/+93mebDcftn4ntXD3dnO2m3KAnOoUFQDleJGg9brBULzCYYtpmUSDnkPPzVYQTlRBjgjabuMijW2q0Wk+fV+I4DTWfy0GwrNJ51/ETpJgmGHKGpzkQ8m5W7mN31gE5tUzNJv8CjWkr04UOBG4EuL5Awe8ECd0GKLr9U7T4je/9gxPwMGgtJNfqR2hD6N9QinnDkjSiPbrP1SNUqunkE/rjtfpFl58/RXj42P0reA4P781BXyAv31lBz9zLuKoq96+ZvGIS4K9CB+ic6bN2MBOok6w==; 31:odjSAN/d+pHm0hujE3jPD2e9lv92Tq4yiUy2I1Rrvvga7SUp9hbRJFLq0Voj+mVOcy2dfW0ROVbgq/zn1TiXp8NhLZWR+S28RXTttWqpfMrGznBMV/djs99QqrfO2lB6rH4HQRAv42rGrMlxdCazZm7HeykrvX68mELza2jgJVb8ULh40JmbHTeAzKxmQbeQ1DxZAW0I4PW30DP3S5vzaXqzrHmk9tXAGoDLEMZpk4Y= X-MS-TrafficTypeDiagnostic: DB5PR04MB1528: X-Microsoft-Exchange-Diagnostics: 1; DB5PR04MB1528; 20:lYkk7bmsB4G1jCTsemhLm33GNeAYymeDj0MbMq55MTZrke8ln3SJPVmBKDOhwqq6ZhPFdghdsQB6/n87AzCEafecFZ4tnoKbJI7tW1o73l9TApMhICJQ2hjHtyU4EThoGUCLK6/jmLqshGZ7R1QJSn+UFcqStzBCX1mcPWLbsXmjMhMaPysXW59pPeJss9AK6tHpGchbr+afUZNpo8TaaRcXMBh5hnicwhwY2s2Z73mHx9CHQIup2MaympojpfzDlsIkem/OY1pCaGmlj7C8jWfgvIqR7bR66uQdrhXB1QmMS4OO1AC5HJ8B7eZO5ujhD9/6nzWV+Mdx5vcftI5PgZcYcunyyJdBix+sk2aAdlEjc0k0S+Sv6NOD+C4aPtIqTPLmrhSNb7U71aokN/gku2+tVURaEcQxR3mVKSWzrhRn3hh3F+FX5hX8q10x2N+VLt81fF5/+rAwmrjsl2oW3NesNT+39IXdSg0mUO0a0Jh/SQeIVI37yiIIsRnZWO9W; 4:2wbipIQK8RXnn/8foD9tScRyRynVC6kUeyKMNtzvbvSOgXJavx/rIBx3Vc2EcTtAIApAPGZuu9GFm6XZEXjfL8F//IyjWuZFkH8jUa33/jMF3gUeBgIMwlja2qU+iV67vo2yhRLPovPGmiulwu2AB5DpC6Y5GZVyZoh3+EA2ALxf6D4RHRFcmZbqE5xWSSxbVXLievfJDjrSd9CFwpSwLrYqCJVRTISzOK74oqfYmm6OzmV/NtsJepZ6aFI/MvKLd5Lbi6JB1qqsxq5aHRW+5VJQyznSrZpJsW99JfRmCs031pgV7aFb0W9G1/lEkPoG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:DB5PR04MB1528; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB1528; X-Forefront-PRVS: 0809C12563 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(376002)(39860400002)(346002)(396003)(366004)(189003)(199004)(386003)(6506007)(7736002)(186003)(6512007)(305945005)(36756003)(11346002)(97736004)(6486002)(956004)(52116002)(76176011)(51416003)(5660300001)(34290500001)(68736007)(50466002)(81166006)(81156014)(446003)(8676002)(50226002)(8936002)(47776003)(105586002)(48376002)(6116002)(3846002)(26005)(16526019)(106356001)(53936002)(66066001)(316002)(55236004)(1076002)(4326008)(2616005)(72206003)(478600001)(25786009)(14444005)(476003)(86362001)(5009440100003)(16586007)(6666003)(486006)(2906002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB1528; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR04MB1528; 23:wGVLux4NkkixvaCWb93RUwCbXaZNFeosq4IiARj54?= =?us-ascii?Q?FTdSelx6acPDRBNwRchGcyVQxLaYhskv9AB8H1V1yWh3czkN2i7N+J8am6Pi?= =?us-ascii?Q?dTG3XKB5zHmcwmpZl8pibhp2mocuDIDL3n0Rj23KJYWlDSbuQjBqgpLbWU50?= =?us-ascii?Q?J7BzJhIoezwuhMYTsS+3FpbMi6o7EP+ZbG7FquCgZXQP6bzh6fEo5Td1jPAY?= =?us-ascii?Q?wWgcmZTgRYCYNWTftNI7BCt0SHLKo3f/kJCWtFqxOYOowzkjUjI8BcSPVcoZ?= =?us-ascii?Q?0x4ssz+1K7ZCkfpcShqI0ed+Ze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yiVwCWrr65eUyWNDe0g==; 5:d3w45qCTgd/pwaM5i+R0MwD/Dwi2JufyUAVy5ZDjm8beVQkVwpzqTHONe67fEkEzdWmMN8/4RgU3Cy9DDF78XlWRxUrP2gVt2BUPePJjik+aLl0EG40oigpauheoX7t0ikrHaqZ8N/yvQdUFwCFa+eYXAb7820+S91auUqgDHGc=; 7:vLEMxEx9nuco7g/QWleK/hJbCfTj8s/xGo5A68FLQvp/p+HpysGegcLz/HxmkIlBfhhWwuabVjzLhENmNhUIzGcV/cWi8+Dbico/Lly6IFdPuOa6fEmabZ+Nvoa/Ww8n2nN2SfponCuSN/nV0nIahbXUArbwEPav71XFXVTFDIhpGewlayC3h+GHcYdk9q2LvcMNEXHiL19UnRMF6bilaEufz7u5ZljfWZfW3YkwRNd2QNr3Z9hy5IAuSbSqVDZn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2018 07:46:37.0505 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 401c597f-b037-45ea-160a-08d6251685ab X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB1528 Subject: [dpdk-dev] [PATCH v4 3/4] net/enetc: support packet parse type 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: , X-List-Received-Date: Fri, 28 Sep 2018 07:46:39 -0000 Signed-off-by: Gagandeep Singh --- drivers/net/enetc/enetc_ethdev.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 2d90d8fd5..8f4da8533 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -28,6 +28,7 @@ static int enetc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, const struct rte_eth_txconf *tx_conf); static void enetc_tx_queue_release(void *txq); +static const uint32_t *enetc_supported_ptypes_get(struct rte_eth_dev *dev); /* * The set of PCI devices this driver supports @@ -50,6 +51,7 @@ static const struct eth_dev_ops enetc_ops = { .rx_queue_release = enetc_rx_queue_release, .tx_queue_setup = enetc_tx_queue_setup, .tx_queue_release = enetc_tx_queue_release, + .dev_supported_ptypes_get = enetc_supported_ptypes_get, }; /** @@ -165,6 +167,23 @@ enetc_dev_close(struct rte_eth_dev *dev __rte_unused) PMD_INIT_FUNC_TRACE(); } +static const uint32_t * +enetc_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused) +{ + static const uint32_t ptypes[] = { + RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_L4_SCTP, + RTE_PTYPE_L4_ICMP, + RTE_PTYPE_UNKNOWN + }; + + return ptypes; +} + /* return 0 means link status changed, -1 means not changed */ static int enetc_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused) -- 2.17.1