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 46DBCA034C; Wed, 21 Dec 2022 11:30:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AFF240A7F; Wed, 21 Dec 2022 11:30:21 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2061.outbound.protection.outlook.com [40.107.102.61]) by mails.dpdk.org (Postfix) with ESMTP id 7441F40A7A for ; Wed, 21 Dec 2022 11:30:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dvui19HqNfYzpjPsHZPYqPvxFKxmzGV48LQqaAEJVs3+xGK1tKbWSOwVc232JSOjC2AT7VkAmhuFWMY8ftQWFM8mc2k5uPe6071p0JGMt/zmszoI3cFhAbMsF+pydo/L5N26s6IPX8j3DkGHJVqFIoTwTegXYJgQ0eLVpALRexGJu8dAOZRKa48UywvZFDtt0cTxYQV0BfYs4WjCFbP7xyK69qbCBpEC+mxOsCrBR2I2UW+65eH3qy6Mp5MPjqUJnWLXn9CajILCZnkmmMtHX82KHgZtBK1p4gv6y+6Tz4zi41yY9THhIQRo6W/026PdgDJhzJFtjWmnbVteXms3LQ== 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=U0UkH3/b9M6gZMOksqcHXdZM5z4xM/W0pl5jfk/wOxk=; b=iUbfKWjIlz1s4G/WxCUCD71tRzsPv5tDpMotMGirs9IlgqYJSqWFmAX5fFPOYkQLjC73b6TWKkigPDLCLJB8lBlvY2lnXThZ5zxMkoWIijjNxnnalI2AsJbWI6XBAkDXR/lr4cve72mBgjh0wvBDZNc00bW+BtUG9ASyCGJ7R7vNa0z7ge8Nr9e35+3MONHu5lQg6JWCUJogde0lqvhbgLcKgXiRybLgNcAdq5XpkXvWC22U5m2UpE9J6JObW7h+CnTW9NBADV63XlOlLmXdwDWEb6pfH5tOZQXlVQn0eJXfXPahl+tju+QyXSD+rPiRBCXKL3tM5CCMEgTqTP0Ozg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U0UkH3/b9M6gZMOksqcHXdZM5z4xM/W0pl5jfk/wOxk=; b=Zt2cixnE4P1oMZNxkfYZrCS2uwZmyi0cWaq5tYN6QT8OI3lQC7ja/vf0YeXkkxNLdXD9slSVwe1nUtjoxzKd6mJcoS4SAjV7uE9OXoAbh//Zur0ILon9N1/gLRkaHlQuqDdwwgxcet14u/gtyCVpSQNZpBSfijdqNmuEmXzZiwka3RzP99mrhz4FJDk4RwvG3GWoAu7JITCJF5OLvSrJvQbUk6cU/8kE610Qe2B2tlP3KeDJkv4REJUj7/FYuVkvFOxGzsGFzfG6UpE9Mzkswe3nriQPk2aC62z/92D6hdvArloWm95BewV9rAe/zXmcSVO2c7xyX+QZh6+2sCSPMQ== Received: from MW3PR06CA0018.namprd06.prod.outlook.com (2603:10b6:303:2a::23) by LV2PR12MB5847.namprd12.prod.outlook.com (2603:10b6:408:174::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Wed, 21 Dec 2022 10:30:16 +0000 Received: from CO1NAM11FT074.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2a:cafe::87) by MW3PR06CA0018.outlook.office365.com (2603:10b6:303:2a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19 via Frontend Transport; Wed, 21 Dec 2022 10:30:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT074.mail.protection.outlook.com (10.13.174.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.10 via Frontend Transport; Wed, 21 Dec 2022 10:30:15 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 02:30:03 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 02:30:01 -0800 From: Jiawei Wang To: , , CC: , Subject: [RFC 0/5] add new port affinity item and affinity in Tx queue API Date: Wed, 21 Dec 2022 12:29:29 +0200 Message-ID: <20221221102934.13822-1-jiaweiw@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT074:EE_|LV2PR12MB5847:EE_ X-MS-Office365-Filtering-Correlation-Id: 7eaf756d-2e73-4c44-9099-08dae33e5985 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zCx4lrY5Y97VV9SZaCczTWSXddWC056oG5gq7fxD4Uy62YeVEiQ9p/0y39Q58Oc34uFUYHZLocXh7Wx1JzB7t4as8q9Dd4Z4eEOUIuiC9H3tqBQqMTHDLRgFpUV7yYKcfzm1qB5JJnHuK1uU0xhGaARU+azgIBsKCb3vHbrNlu906kCoRYcLLoze4+YHezFAxmb9hBGyVOnFK9wKjzNntVQKl/q2Ni7VBL2DFZ6Uxyc5cp1NBbGHkUbpozVUTD7ZPmcNsIY3vHdKYOkrY8g9nVYgnUyNaWpxFNZGH/b5C/t74vJf3skH2PEHYzSTTeZ7HqaRdpf37CSz6BthuKIxpvJX8NTQXfBdcuz6ixc7T8RFnNmlA6y+9Q25ywzVMuCQklO1gQU+ECq6REf5UYfBdS2icMiznP8psgUEcF1zFnPQCTatZ3wFJfFk6KmKeaY0tpcVTIkqVJRQOZCumlEQKQWFdPslq4VjixWZeSLhufqvi3YBTagxHEF0DuR41DX9KOvaCWNV+v/60b+ivvOc521i6wTp0owrGbntJ27ZMHBUUdB8s9Pn5CFpPMTc0zZ1bX5o8+GCeowcnAXCOCQSPMtkfGDjcC+78e+uiBw6upw7X5BR3LHyL6Boo7lLJYpT25caXZdJzAp6NkqYNP/bbjYFHUPaC6fZw00hE0rTEnrtnzCYLH/JODfxDuTdV9XgLPr+8XxZ4e/IEnmpuHPDww== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199015)(40470700004)(46966006)(36840700001)(8676002)(70206006)(70586007)(336012)(316002)(36860700001)(55016003)(4326008)(1076003)(36756003)(16526019)(8936002)(83380400001)(41300700001)(5660300002)(47076005)(426003)(86362001)(7696005)(6666004)(107886003)(478600001)(110136005)(2616005)(40460700003)(6286002)(26005)(82310400005)(54906003)(186003)(2906002)(356005)(82740400003)(7636003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 10:30:15.4343 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7eaf756d-2e73-4c44-9099-08dae33e5985 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT074.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5847 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 For the multiple hardware ports connect to a single DPDK port (mhpsdp), currently there is no information to indicate the packet belongs to which hardware port. This patch introduces a new port affinity item in rte flow API, and the port affinity value reflects the physical port affinity of the received packets. The example of match the affinity item: testpmd> flow create 0 ingress group 0 pattern port_affinity affinity is 1 / end actions queue index 0 / end This patch adds the tx_affinity setting in Tx queue API, the affinity value reflects packets be sent to which hardware port. The testpmd command format as below: testpmd> port config (port_id) txq (queue_id) affinity (value) While uses the port affinity as a matching item in the flow, and sets the same affinity on the tx queue, then the packet can be sent from the same hardware port with received. Jiawei Wang (5): ethdev: add port affinity match item ethdev: introduce the affinity field in Tx queue API drivers: add lag Rx port affinity in PRM net/mlx5: add port affinity item support drivers: enhance the Tx queue affinity app/test-pmd/cmdline.c | 84 ++++++++++++++++++ app/test-pmd/cmdline_flow.c | 29 +++++++ devtools/libabigail.abignore | 5 ++ doc/guides/nics/features/mlx5.ini | 1 + doc/guides/nics/mlx5.rst | 4 +- doc/guides/prog_guide/rte_flow.rst | 7 ++ doc/guides/rel_notes/release_22_03.rst | 9 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 17 ++++ drivers/common/mlx5/mlx5_devx_cmds.c | 3 + drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 15 ++-- drivers/net/mlx5/linux/mlx5_os.c | 6 ++ drivers/net/mlx5/mlx5.c | 43 +++++----- drivers/net/mlx5/mlx5.h | 3 + drivers/net/mlx5/mlx5_devx.c | 21 +++-- drivers/net/mlx5/mlx5_flow.h | 3 + drivers/net/mlx5/mlx5_flow_dv.c | 95 +++++++++++++++++++++ drivers/net/mlx5/mlx5_flow_hw.c | 14 +++ drivers/net/mlx5/mlx5_tx.h | 1 + drivers/net/mlx5/mlx5_txq.c | 9 ++ lib/ethdev/rte_ethdev.h | 1 + lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 28 ++++++ 23 files changed, 357 insertions(+), 43 deletions(-) -- 2.18.1