From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39019A04FD; Fri, 7 Oct 2022 19:47:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAF5542BE7; Fri, 7 Oct 2022 19:45:03 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2063.outbound.protection.outlook.com [40.107.237.63]) by mails.dpdk.org (Postfix) with ESMTP id 3BC5842BD3 for ; Fri, 7 Oct 2022 19:45:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fzsfnh+sxVlwxM38gv1jReUYLJmqkJxsblbTMeS6xo8Dg//fm85h1v3uOhZU9oLgE8GkUk4th0CwRPra3VTGB4AzhjvGjkRPlgSsNmtwiqiNqdtwq2Ci7rxhRTeYOJu6AJPPwG0ByAqv9bZ8jbrZXHKy+oQ2ffkLd5BjY9QcpbWiE075flfFF8r+mvhXiqFloQiyYcYoMG1ebu0uOG2kCElV6iKiJXg2p+lQoaL+35Wpq40oAl1wYb4Oraq8r9fHWmIUq48G2kR94dK/hgSuilAGG9ThtwgvaDWHfOejK0rAgVMeGWrOr/fpujoK65lsGU5JOeRU5zDEcl76+ggh9w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lwgYGUSBB36tAcbuPjAAcA77R4J7SkRed0DTw9p1q7I=; b=Gn94jKDiRwX3icWwj4cUpvGFVU57fwVccczv4POKcLGXIDr8U8lctdI7AmIdVZuNkulSLNyQhrPj3zNsIRGKE2giMx8fI94AzjqUIBOTC0JMPVv16hHdqhDCCoS972axmJ0MkEqeMakjpA/xncTb7dvRsUWewTpXyqcaW9BPSOM5rtRGfc4wPgFmYvaVx+5MWWBjgR8A7IcutBTOptQOWQtV9JYGwNFUiXEZ5vS53UtGjSETN20AKU5yU0OUZThH+o8t808/B95CigvXu8VUsZCWtbwGPamFSGUa5x6db+ojeix8wB4IT/8Nuzp+qBu/nmTK3tZF7JwXPJbw5ggewg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lwgYGUSBB36tAcbuPjAAcA77R4J7SkRed0DTw9p1q7I=; b=VAGB4ONX88vF8qqJz+hAPxN/cyk1e+mPn/QHUZM4C/vP0xDv5PSG5UgmjHG4CMyA0YUUCpklj/KBg/zqtobcqYvh5baAiYIJO+lnbqc6hLQUyC43kkfMXm157JHEOo/BMumpge4k9tX11cY6tOmmJi/MUpbSTcw2ZPwopdnajic= Received: from MW4PR03CA0333.namprd03.prod.outlook.com (2603:10b6:303:dc::8) by DM8PR12MB5480.namprd12.prod.outlook.com (2603:10b6:8:24::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Fri, 7 Oct 2022 17:44:58 +0000 Received: from CO1NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::54) by MW4PR03CA0333.outlook.office365.com (2603:10b6:303:dc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.26 via Frontend Transport; Fri, 7 Oct 2022 17:44:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT068.mail.protection.outlook.com (10.13.175.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Fri, 7 Oct 2022 17:44:57 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 7 Oct 2022 12:44:56 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH 25/35] net/ionic: advertise supported packet types Date: Fri, 7 Oct 2022 10:43:26 -0700 Message-ID: <20221007174336.54354-26-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221007174336.54354-1-andrew.boyer@amd.com> References: <20221007174336.54354-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT068:EE_|DM8PR12MB5480:EE_ X-MS-Office365-Filtering-Correlation-Id: 68a259e6-19ec-47d2-58a6-08daa88ba6f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d+nt8725Xg1Mo9spi9Zdv087cHAEiQtEuI4d5t1vpvkbj7EH8bhPwr6P13UuY7c8FyQrA4zwGaIj/5FjXf7ehJ8u5+8/KKDjqurGfwt95HdeUICwjKIsDccPMJseJM8smrZ8cWQtNOMU/LIJ339UNzJnDPjxCj17Z7kqgw/yBUm5ZrovrVcdcdTGzBbt5f/ghuHC9BcjV0ddFiC57jUknSlkftmCMpJ3eC+bMshTtyIyQYj3j+bmAmqINvktOS6OeLqinyb4L+c5ycT29vHLmGoRHkDcLJd/nXUPIfLhUkCDI/F0r97nFM96ZeBaVDApx/UWXE6Pub+4nO3RSksiC7Cl9v6pEcPNQRj8RDx+vIDOn9IuySjqBYnUxSSZ4BhtgP43ayzYee4flEO/xtMvqo8/3iQ3uFoIL7nbwwy+V+CCF/nrvIyD+cpl1LnyJ4yvQyQTHg6FDQU1JVAgomTLuCWDKC+DZowhDfMb83pmzCKkzqD4/kdBtboCWKV5M0JjkYD8rTWqvelFXx0J1rI8OVNzN6knrxXI3iLsIoEwDwk97tU4pJUDhbGxsHqmr8jisk/YTPvdYNTtz8R87o9eJIjssI6q5T22KGgaAIc+zW2bAr/MkGYK3KZcfB2TFOwIVxE9UkFgfokSyLDDG3XPL6fJ7Vpbf7+VqQBAXQh9iRlnZdLVAGv8p91rf4f9yzOJsJiz4p/fzMamXxtjy9XPAstVEox0kxe1JxneJdv9hbzogTAgQCgzIiMOnorQSi8qzr8Sx9+xlnOc1MX+RDwNYzgRw6cmnFMm2N4qQ0c3ej4= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(396003)(376002)(346002)(39860400002)(136003)(451199015)(46966006)(40470700004)(36840700001)(40480700001)(8936002)(86362001)(356005)(478600001)(44832011)(81166007)(2906002)(82310400005)(36756003)(5660300002)(6916009)(2616005)(186003)(1076003)(70206006)(4326008)(82740400003)(26005)(70586007)(8676002)(316002)(47076005)(336012)(16526019)(426003)(41300700001)(6666004)(83380400001)(40460700003)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 17:44:57.9907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68a259e6-19ec-47d2-58a6-08daa88ba6f9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5480 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This improves performance, since clients may be able to skip SW packet classification. Signed-off-by: Andrew Boyer --- doc/guides/rel_notes/release_22_11.rst | 1 + drivers/net/ionic/ionic_ethdev.c | 1 + drivers/net/ionic/ionic_rxtx.c | 19 +++++++++++++++++++ drivers/net/ionic/ionic_rxtx.h | 2 ++ 4 files changed, 23 insertions(+) diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst index 0c962f9637..5c3bd15e55 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -85,6 +85,7 @@ New Features * Updated to reflect that Pensando has been acquired by AMD. * Enhanced data path to provide substantial performance improvements. * Added support for mbuf fast free. + * Added support for advertising packet types. Removed Items ------------- diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 38241d41ec..39bbe60d79 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -70,6 +70,7 @@ static const struct rte_eth_desc_lim tx_desc_lim_v1 = { static const struct eth_dev_ops ionic_eth_dev_ops = { .dev_infos_get = ionic_dev_info_get, + .dev_supported_ptypes_get = ionic_dev_supported_ptypes_get, .dev_configure = ionic_dev_configure, .mtu_set = ionic_dev_mtu_set, .dev_start = ionic_dev_start, diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index 134589b016..24fd8fcf04 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -850,6 +850,25 @@ static const uint32_t ionic_ptype_table[IONIC_RXQ_COMP_PKT_TYPE_MASK] RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP, }; +const uint32_t * +ionic_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused) +{ + /* See ionic_ptype_table[] */ + static const uint32_t ptypes[] = { + RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L2_ETHER_TIMESYNC, + RTE_PTYPE_L2_ETHER_LLDP, + RTE_PTYPE_L2_ETHER_ARP, + RTE_PTYPE_L3_IPV4, + RTE_PTYPE_L3_IPV6, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_UNKNOWN + }; + + return ptypes; +} + /* * Cleans one descriptor. Connects the filled mbufs into a chain. * Does not advance the tail index. diff --git a/drivers/net/ionic/ionic_rxtx.h b/drivers/net/ionic/ionic_rxtx.h index 79ec1112de..de51f21012 100644 --- a/drivers/net/ionic/ionic_rxtx.h +++ b/drivers/net/ionic/ionic_rxtx.h @@ -40,4 +40,6 @@ void ionic_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, void ionic_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_txq_info *qinfo); +const uint32_t *ionic_dev_supported_ptypes_get(struct rte_eth_dev *dev); + #endif /* _IONIC_RXTX_H_ */ -- 2.17.1