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 C6C0CA0560; Tue, 18 Oct 2022 21:47:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC2364114A; Tue, 18 Oct 2022 21:47:03 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2054.outbound.protection.outlook.com [40.107.223.54]) by mails.dpdk.org (Postfix) with ESMTP id A5533410E8 for ; Tue, 18 Oct 2022 21:47:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jjhFpo1kp6TpZAx+sGV+uyv4cr0Ui5GvoQ30oAFzVg+IUk2lNd33AxhIIv6jmx0yx2nDcEirT+qxS4f+U1U8giwCt8RaKCvQKem0nJWNHJY/Ag9tBme9TW0WY4veqf0diuGJFv50gb/pRG+xkgN1q62XoBTgQW1t0PT61zvFu+6uFiANsbs6+tN6ejavJI/RRKl33bCjPgn1qHRl6PGCHvG545gX+VtxfEFuIc3qpKBoLpfaEK7pCZWjLT2mZlmyTxsr8Qv1PDex+8nCBNN3rpOVIYAqFUF2ZXaMpol9phgTrKBAbPzddsjf9tMa/WzRj9OgMOYl6PbwWrmNVcXj1w== 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=j4JSo6ijUZmOGKDlK4y1T49EIKysdvyyLqEt95pXBEI=; b=gfresJTaGFRbTuF5p5TN2EKUFOd5/OSU2xTGBu1oIF166TKtfGRM4hWi5xHn48lJClR6860Ed8nlU83KUeMOqQLTAikweLF5yiey2DD8pgrJywrBICZFIfGdE4Sf08E3xbnze9Vphgzcb4QZwWENrOz89m/K4ZZAK2ixj9HQsFJOek8SwzL4cen42x3dV256avrqUb1ia26nIJot0uNHAnKAg2JaI2JYP3B+33FFOO4Ufrq4TOdXulh0F7qBNiCWI3/oQ1dZCKpdnOYhGgF7rDhePDuvv+RfcaB69OXcDbU53zo57IB7ujd+RK1yohxzSs8IIb8EM9Vq/Y9k/BuBFg== 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=j4JSo6ijUZmOGKDlK4y1T49EIKysdvyyLqEt95pXBEI=; b=S9pkNmJlP5SCgrW8qkbeCW91Pnu7H5j1pQFEEpzy2+vKMUFTu8bjpEImpb5sJZhUntRsYLL5RsZaxcmzsHu2Kl9XeiKV15DRahgglGVSb/CcAscFMaLrCvABSuQj7K/04xjlxPS47P8s7FPIj2AMBtA/UglNGoHZypphfZ+a4zY= Received: from DS7PR05CA0044.namprd05.prod.outlook.com (2603:10b6:8:2f::10) by CH2PR12MB4248.namprd12.prod.outlook.com (2603:10b6:610:7a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Tue, 18 Oct 2022 19:47:00 +0000 Received: from DM6NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2f:cafe::3a) by DS7PR05CA0044.outlook.office365.com (2603:10b6:8:2f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.6 via Frontend Transport; Tue, 18 Oct 2022 19:47:00 +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 DM6NAM11FT064.mail.protection.outlook.com (10.13.172.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5723.20 via Frontend Transport; Tue, 18 Oct 2022 19:46:59 +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.31; Tue, 18 Oct 2022 14:46:37 -0500 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 26/36] net/ionic: advertise supported packet types Date: Tue, 18 Oct 2022 12:41:21 -0700 Message-ID: <20221018194131.23006-27-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221011005032.47584-1-andrew.boyer@amd.com> References: <20221011005032.47584-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT064:EE_|CH2PR12MB4248:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c20461b-5c5e-47ce-eb91-08dab14185a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: erjiTeDrkyWIiitCCSgv6SoqQOWBLexeMntw6e0b6KjjdIUkJ8/lMR2tgKS76F4I1e0X4OvFOUA9/ODYAI8SJGFFNMOC2uAaE4XE5ZM60ikr/XuzxEdxel73FbkZ7MUM/60yNOaYuSChKyHYBxZElhOjmZvzupVj4MjYV5KRuwV3urAMyO2G1V9OVrgtaemTrU+KNhDXo5L5XFuK4iZjTusMpQiBVY2fGyg0JRtrtx1FJALLYYYgIyS2OB23Fs+aeU3+dRabc2Gke1VJgASdTOKzjyQMT4uT2KZOCy2kNdTMFDIrPtiYhZq/nfn8FiwrdST61iFngEsj+9ms+HYobb5XyGMr+60YuFf6GlTzFwDBmUAxvBv624RBKSnp7Bjv6VCdtaQPeBX5UJjnxoAdtEN6ATjf6LwjeKfKUVK45959gOnfi2lQv2FjNtevPjBGE1HNiIC4Lx//M9G5Kli9M+32r90JPBSj0O5xTYY7wryvkXaz+g4WshZla+9UMe4q7pzArzJIiwj70UjBDYzbpEhgXTZ6NloRuk7jrDw+5vTovFbHc4s3qd/9MoPvcB921jzFtF/sVIaLoCG4c0AbMM7JcaMJ+rii7tWsrn+s0PZ5k4pzW4dqf2ZCg5OiOQLp9ZlfABg/bpZ8bGCc11eRibyJiDFuKWpMempWARyp+3TZC9x8wXA0RFusY5GiwXaVITXuHdnXP/41HEwRqr2Z/BLCODpmvBh1JOyCH51JjKZK3zZ2YEaFgy5C6A0XdhPoUYfKSqsjsVfFCqMLEl29QdlswQ0D3SWERQ8tWAysl2A= 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)(136003)(346002)(39860400002)(451199015)(46966006)(36840700001)(40470700004)(36860700001)(82310400005)(81166007)(356005)(478600001)(82740400003)(186003)(40460700003)(2616005)(36756003)(4326008)(44832011)(6916009)(316002)(6666004)(70586007)(70206006)(47076005)(16526019)(336012)(8676002)(5660300002)(40480700001)(426003)(2906002)(1076003)(26005)(8936002)(86362001)(83380400001)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 19:46:59.9061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c20461b-5c5e-47ce-eb91-08dab14185a9 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: DM6NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4248 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 4ad525375f..0db516157c 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -147,6 +147,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. * **Updated Intel iavf driver.** diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 7d21bc0a9b..2560a30fe4 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 697e6dcc15..f92cf3fb46 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 6f9f3f92c6..e4c56d734d 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