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 6AD9CA0544; Tue, 11 Oct 2022 02:53:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEE5A42C23; Tue, 11 Oct 2022 02:52:20 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2051.outbound.protection.outlook.com [40.107.237.51]) by mails.dpdk.org (Postfix) with ESMTP id 3B00042C12 for ; Tue, 11 Oct 2022 02:52:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zk/cysTjUF/f2YunmAexwPeOzKRPugIXWnUsQ1tqI+IN36zoN+jqGBP19UBOHVNdULHmFayenGbehUuASWUcTSw2w/R3tCrNogC4FEgtTzrMBOKhqLvfs+oKOoNUtZxAO9/CYdFiEXDPZtn5v1io35M6TxKGRsWqzUeBw55+enGsI0/cmwltogfZFriQa5KRLVHmsbrdBleezI5yvoch5lCwwMXLh5KzISOAntJiFcBcpKtzH6ETIxRphJlIbZCNYlPMdfb6d93aXw8el+eWwAXJF18MsIH/Ocfv+60EBGZ+WPlcwBkEi0hAQ1NXjSqlV0eqzvYw9MuvAZSZxvB4sA== 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=/1Fj1/CoVqJS3b2/oudcG0ugXPoC+WOM1kXp8vc65Qw=; b=JK7sPfnuoyzUvN4u3iGAIrPbCuOWVLkMEKwGO0OCXK6AR/rScxTt9Zq5XFnWdK3h1xL7EuDZM/W5NoQrDhpFHk3v4A9qvS0Ndxazl7CYRlX5FmBKD7lrVrJkwPqGUexCmh540Az93JPnFjgeDdtom8R+r6JP30WUDMzRXs8J0Nw/B8P7yFlvKOWxgytCcGm7EY14U7PolbsVS+g57RV9d6Fcr0z/wCAzEjHu+k9z/wZwW2/ojlyM9flygxMP8h1MWqNSrGNEXJQQU/iZK43NdvJvoEdAN3710DrU1qTIfYQFlv+rxK1XFm5AKQa5oNv8dFt1or7pzpJ8gvZ+Hjos4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=temperror 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=/1Fj1/CoVqJS3b2/oudcG0ugXPoC+WOM1kXp8vc65Qw=; b=LV837xGYxQXR35+DEy8k/J5cF8gbVnYP5L4eaL4tBfnci01Db1TDxfUUoatzweKMS1yf+OHzw5efJQtbMtH/YuAbs0KSE2rDEsYJUhIhTa6i3L7qXDuSOo2lU06ios4tWbDbFeFuzCCKK+HpkJTCQ1zTkCnO1Aa71NkhW8wq7XI= Received: from BN9PR03CA0035.namprd03.prod.outlook.com (2603:10b6:408:fb::10) by DM4PR12MB5262.namprd12.prod.outlook.com (2603:10b6:5:399::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.19; Tue, 11 Oct 2022 00:52:13 +0000 Received: from BN8NAM11FT089.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fb:cafe::9b) by BN9PR03CA0035.outlook.office365.com (2603:10b6:408:fb::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15 via Frontend Transport; Tue, 11 Oct 2022 00:52:13 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=temperror action=none header.from=amd.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of amd.com: DNS Timeout) Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT089.mail.protection.outlook.com (10.13.176.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Tue, 11 Oct 2022 00:52:13 +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; Mon, 10 Oct 2022 19:52:12 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v1 25/35] net/ionic: advertise supported packet types Date: Mon, 10 Oct 2022 17:50:22 -0700 Message-ID: <20221011005032.47584-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: BN8NAM11FT089:EE_|DM4PR12MB5262:EE_ X-MS-Office365-Filtering-Correlation-Id: c22bfb5b-6d7d-4fe6-4d16-08daab22d5c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zmWo89lKW3r8b8konO13/arVrMvtWufmSfg3v/E7hUCBwVcgALGFiS8E/Ft7SP757qEvYJpDta1kMB/kVgHi8dBgkB9VOdFiDHd4mvDdmqmqLaV8AIZIK7JVIuoNp0ss7ejTpybo+zqKaL5sv95MqxHIC7N0/Z+LWXPQY8lCIn5PdQnaty0m8rLehKSZnCReo6p3s/0hiFD0XwRYKp6uzeylW+qDOYkYYyoakNNzoR2V7WJeiFfWc1o5eH3A4V1DWKbcisQXh3j+OQu8Uy5esqmOD72WIIOhLjg2LYygh3Wb/1jZe4pJTgVjhdFEeaIql5Pw0P6C8bmuCFGtgFkqNAF5S8LIlP9V5884JFXEY59ewmYoZjquH0TKSwrJTw8sbswgwNiaUZn2aWW9prQjdSOjAt8/uqWKAFZjazEE3ruq4TRxRtLuUkXfnGM2hrujFhMD3xuOIbOOaDhbImmqGja5++eyad5x8cDnkQ+fQp9jU90+77uyQSs9yMUdPgbKlrg/YqadVNfcywFzTaKtufw5/6uPAi4qg3UxceAcENixqJo0zvZcICrLZdRfJGY5SvFUldVK2KDD1saGJtqOOuLxP01VSX0Nm/QSYiqEFZCVcxqQfaY8MsYma3maT7wOi95kbCP4bsueahq1VqPmhYxGva9NpEEXQ7UB2ZnX4RljEzgShKSPrlpMYP1GAPd0X6CQxeQhNGFZTgMGyprtIAEuEk90hvYjU54Nji6S1NgPpk1mzSxFJhfic8FZvUIdzEgsG6c54zOe0H0EdOAe0zc1ZdEcsxbMrrtqB1Mv5a4= 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)(376002)(346002)(39860400002)(396003)(136003)(451199015)(36840700001)(46966006)(40470700004)(36756003)(40480700001)(40460700003)(86362001)(82740400003)(81166007)(356005)(316002)(6916009)(36860700001)(478600001)(8936002)(44832011)(5660300002)(8676002)(4326008)(70586007)(70206006)(41300700001)(2906002)(63350400001)(82310400005)(63370400001)(426003)(47076005)(83380400001)(6666004)(2616005)(336012)(16526019)(1076003)(186003)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 00:52:13.0011 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c22bfb5b-6d7d-4fe6-4d16-08daab22d5c9 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: BN8NAM11FT089.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5262 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 2fdc82b673..2b62310e06 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -166,6 +166,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. * **Added support for MACsec in rte_security.** 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