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 AC20C41CC1; Fri, 17 Feb 2023 17:45:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9357740F18; Fri, 17 Feb 2023 17:45:52 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2087.outbound.protection.outlook.com [40.107.102.87]) by mails.dpdk.org (Postfix) with ESMTP id BB45440EE3 for ; Fri, 17 Feb 2023 17:45:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sqi1YR0Z2lQ5LhzR7MnXNmcUYOLt5OPiWPpLuBViw/Isg0m+HXfBiq0ZTUFMG4P+iekHz9WyF9d6waVrbIiCtzwYJvP+08Mat3fUweaKDfcEPQVto5wC5sg5Ff0BnnqT03wSU5BKoWbABQSim1fuCVbg6mJbItJ94q0DaqJpB00yNqvDuMmAwW7hTaSOhdAuAxn/4HXelEABhljxvk4RBvu+RgPLz0mbEW5+j7XWEftfMWsmqolGDxWwg28XRM2YebDZDLm6U89ahfSOvtBn/qI5Rthor1kMZYtCHA4jH/lqzPuOMikfeX/8IXZcMe6YBiAb4n15xRuYtAB4rmRwyg== 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=o6Y6BKcCHM17xx25wMqkCgZquA46Pj0itaH8aXN6NQs=; b=DIpg6Tqt/Lh+OZqyxlKA53636q9081RKAxn3u+YYOndVStADInwnrXafx8dAFGiLccjViSdOZv7JjrhiMyhOndAw2yIyACoPOP+PtyxxDWMhXe4+0ikYFqZ+1xFb0x30Np3mNBPVuVuE1p0HD/C3l3DoxUZTvKjbKx2pUmq0z8xtD+dLf+g9m4042rWbHzL/raeZfv1aFcsk/KBoF1AEuBkcc5N3ysBvqG1sC3Ww7q8A3QKx30hF4PhagjE7+YWQASROIlwrSLXc2La3l3BsRWtOjkfhg6JzkzL58yBiRneLwhN0O4bFxkK9v3GwEpsFZ1qpn7fza0wPnDoWDXfO4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=o6Y6BKcCHM17xx25wMqkCgZquA46Pj0itaH8aXN6NQs=; b=eOz42wicAev9If5brkzqm3PcBP5g9dxaBakC0I6y4WNPD95/RH1nk90yI2VGhketEznDg/l95/r4Rm4Pvo+iu5n7lBiIeaEzekICetDL6DqdSaI2uurjyBotwk/u+qQODSyTuYk+fP8WGbzbzNeA6NhteykpKk414Ul+jlUSMQs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CH3PR12MB8657.namprd12.prod.outlook.com (2603:10b6:610:172::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Fri, 17 Feb 2023 16:45:48 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%7]) with mapi id 15.20.6111.013; Fri, 17 Feb 2023 16:45:47 +0000 Message-ID: <18e7722d-efeb-d6e9-85b2-4b322a84ad56@amd.com> Date: Fri, 17 Feb 2023 16:45:40 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH v7 0/2] Add Tx queue mapping of aggregated ports Content-Language: en-US To: Jiawei Wang , viacheslavo@nvidia.com, orika@nvidia.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru Cc: dev@dpdk.org, rasland@nvidia.com References: <20230203050717.46914-1-jiaweiw@nvidia.com> <20230217154747.12401-1-jiaweiw@nvidia.com> From: Ferruh Yigit In-Reply-To: <20230217154747.12401-1-jiaweiw@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO3P265CA0024.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:387::19) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB8657:EE_ X-MS-Office365-Filtering-Correlation-Id: 73cd8681-6007-4b95-b1bd-08db11066b77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lltStOt053VFeRb7HG12TEN4GAwJevKZRc00e09Hc5b/X1WsZSLGp0CGbASwvv1KGzhU0lI/OGB9WABcSdbY92JwGpIi6ur5qVLcsUU0a2JE2eme9Ouw1t/ysV4S6w260mxQBFAylLVm/3d+m9ld2dwlSGl6cc5MBsH+Iy7h3U/Q0f9CHUCjkos54kqqs2sOrBAfHERy7/UZCL+OHyhgVitZ5Yw+mbA/PhgxuyHMg/AZBFzlO2GWNnX98wfHXQdZQAAy0gU1NvcIOYyABJMMyE31ZgHF19+I61oBUY+NyRQjBqypGZtdbJVELHTZWmEaQALz0glupYnPEwGA4yuLWDzQ8yY4k14lAjPPtldJREAST6FuvAGmFa+xtSQSmTfi82FjIZ0045GXAgT7CXNYLbcDnl9231ftPkxHIvwcz1Tgu9dMqGi1X0fdcUUSbbspD1nR1ojQjhpFxAtOthXAzJF9fLGFHpPtGc0UfeGPxh+yomkaFJAaYUqa6FHATOB0e/iOEw70PVgAXoAzJpnT29CKjmvoWfE+2PTa47ZIZTsGteHbDI3DRYFON6ZkyyK5vrIG+DQRDMD/ceVXFtmBRYCiwvG1t73CH3jPWGSY6YW6RKZ0o6+91kHwDtTGSmm0LUCooQdxg8E9A+Cc+k1gjxwrUssW+wJt/M6goukTdxVNwZnYsTgFCEG0lHDgMP8rbkoj9dxGi6l19oExHvTkgg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(376002)(39860400002)(136003)(366004)(396003)(346002)(451199018)(31686004)(36756003)(66556008)(66946007)(8936002)(2906002)(66476007)(8676002)(4326008)(44832011)(5660300002)(38100700002)(86362001)(31696002)(6666004)(6486002)(966005)(478600001)(316002)(41300700001)(6506007)(83380400001)(2616005)(26005)(53546011)(6512007)(186003)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NWpTN3U3ZG9DVnU1ZXRNeHRRZEJpQ1JUK21XREpjaEJqa0JGNmUxblBjOEl0?= =?utf-8?B?S2lqdHF5MWxqMWNtLzArYkx4eTJRamsvaGVlaG91RjJjdU0xSGE2dytnVjU0?= =?utf-8?B?ME9DQ0N4aklXTkptWmVnMDdSVWluSU41VVNiVFl2SjllSGlidW1hM0NSWUh3?= =?utf-8?B?R1FYMDFBcDN5ZzVYNWNQNkYzdFduSzMxUTRKRHhOcXJQZTMvY3FaZnA1bExV?= =?utf-8?B?WnhHY1RraVd3ZytSREsrd1MyR2FSbU5ZYXgyU3Vub1FKcVlzY1JOUkZPRVU5?= =?utf-8?B?UU4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TUhOcmRD?= =?utf-8?Q?ls39QY8qtDEAlIlcrqv0+dLVa?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73cd8681-6007-4b95-b1bd-08db11066b77 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 16:45:47.6351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CMs5y8e7PWdxttOPOnY3tfRdN/5qHlkMd9HJioBhPYY5bVkXgg4XFG/F0f95VIWK X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8657 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 On 2/17/2023 3:47 PM, Jiawei Wang wrote: > When multiple ports are aggregated into a single DPDK port, > (example: Linux bonding, DPDK bonding, failsafe, etc.), > we want to know which port is used for Rx and Tx. > > This patch introduces the new ethdev API > rte_eth_dev_map_aggr_tx_affinity(), it's used to map a Tx queue > with an aggregated port of the DPDK port (specified with port_id), > The affinity is the number of the aggregated port. > Value 0 means no affinity and traffic could be routed to any > aggregated port, this is the default current behavior. > > The maximum number of affinity is given by rte_eth_dev_count_aggr_ports(). > > This patch allows to map a Rx queue with an aggregated port by using > a flow rule. The new item is called RTE_FLOW_ITEM_TYPE_AGGR_AFFINITY. > > While uses the aggregated affinity as a matching item in the flow rule, > and sets the same affinity value by call > rte_eth_dev_map_aggr_tx_affinity(), then the packet can be sent from > the same port as the receiving one. > The affinity numbering starts from 1, then trying to match on > aggr_affinity 0 will result in an error. > > RFC: http://patches.dpdk.org/project/dpdk/cover/20221221102934.13822-1-jiaweiw@nvidia.com/ > > v7: > * Remove the -ENOTSUP return value since no need anymore. > * Use the rte_eth_dev as argument in the internal function. > > v6: > * Update the commit titles. > * Return 0 by default if dev_ops.count_aggr_ports is not defined. > * Adds the dev_configure and affinity value checking before call map_aggr_tx_affinity. > * Update the rte_eth_dev_count_aggr_ports description. > > v5: > * Adds rte_eth_dev_map_aggr_tx_affinity() to map a Tx queue to an aggregated port. > * Adds rte_eth_dev_count_aggr_ports() to get the number of aggregated ports. > * Updates the flow item RTE_FLOW_ITEM_TYPE_AGGR_AFFINITY. > > v4: > * Rebase the latest code > * Update new field description > * Update release release note > * Reword the commit log to make clear > > v3: > * Update exception rule > * Update the commit log > * Add the description for PHY affinity and numbering definition > * Add the number of physical ports into device info > * Change the patch order > > v2: Update based on the comments > > Jiawei Wang (2): > ethdev: add Tx queue mapping of aggregated ports > ethdev: add flow matching of aggregated port Series applied to dpdk-next-net/main, thanks.