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 BF8F7A0547; Wed, 11 Aug 2021 14:04:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C4F740C35; Wed, 11 Aug 2021 14:04:28 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id B2A4140042 for ; Wed, 11 Aug 2021 14:04:26 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10072"; a="212000102" X-IronPort-AV: E=Sophos;i="5.84,311,1620716400"; d="scan'208";a="212000102" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2021 05:04:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,311,1620716400"; d="scan'208";a="460719007" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 11 Aug 2021 05:04:25 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 11 Aug 2021 05:04:24 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 11 Aug 2021 05:04:24 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 11 Aug 2021 05:04:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aK5AIEC9jFlVHKs6vve+iWXFM/IWw6hHIjyI+vM4q7DFKWL0CiyxTZx/DKWwdzkYJw4IfrmnR+2EVk+c1IJYZ1MHYAkXppQMLgOJafoeha3xQDlLnsofVckDFqbYXp0Yruna2YakEzr+hgguLORHy9ByGnfU3AQHH/h7JXGawgsg4KAt1D92bhYjLDAudvRABwiFCVeydR6SORBDDtcDb5j2J5lc1qWFhh8ACj9wy2gaqVfOhpQvHVj0xxklU3ijct9VmXyu+Y7yUYBqNRAgur3jNTb9O2HZo9HsMCPDtX5hgOqRgj4DKb4My96Yq6OGy6z2zw78uT1oWmhyRcgivg== 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-SenderADCheck; bh=xLqzAoIieHh87gmUbTXlgpwcCGyt5edVAKLHH83j190=; b=YbdTHaOVBorz5waAstGTptt/M7NzLj73dJueDSNAowuDy+ALC2u36JX1iL7kfsMFtnGoII+VAOxHnKip4SpSPCGKfTXDEmBlxkneiop6nZRI05Euq+lbWKL1rEN7WCgMqEUy4k4bQkO8sLrC4o4ifvUpzC2deDpImqufXigXHp4ovpSR0C4cq2gPTvs4SlV1EV1o3xfUmsCMNd7UY2HJVfgcZ+setjlv4H2Ttr6vRtTKZ0y8SW8yvAuXB3wq4kpXEHHFYuLW+u6XQXIKgsvct8UVF3HN1KhuuoxEejFo4kJ+E85iO5xckiokQvyBxiYuj7a1DDRPJ7VAle4NHOcnew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xLqzAoIieHh87gmUbTXlgpwcCGyt5edVAKLHH83j190=; b=IL+DGFVysw6B2Nt/Lb+T5oK9V5vV/YsRhSFq9yYEdZbcISD9bCzqdfPgi12sUcfB+Z9Bh+/N8lCDfq9w7JhEvwQtjdAyudNsTAHaerXeifC+uayhlO/LSLHlrBEeB3GSCRhRKR47/w6WuLL//vIhEnSLJS6wIv6gi5+tmnXeAf8= Authentication-Results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4950.namprd11.prod.outlook.com (2603:10b6:510:33::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Wed, 11 Aug 2021 12:04:23 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf%7]) with mapi id 15.20.4415.016; Wed, 11 Aug 2021 12:04:23 +0000 To: "Xueming(Steven) Li" , Jerin Jacob CC: dpdk-dev , NBU-Contact-Thomas Monjalon , Andrew Rybchenko References: <20210727034204.20649-1-xuemingl@nvidia.com> <20210809114716.22035-1-xuemingl@nvidia.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Wed, 11 Aug 2021 13:04:15 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR0P264CA0278.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1::26) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.206] (37.228.236.146) by PR0P264CA0278.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Wed, 11 Aug 2021 12:04:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 298848f4-582b-4efd-ede7-08d95cc02855 X-MS-TrafficTypeDiagnostic: PH0PR11MB4950: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ycaj/ILAY7fjtK+J/d4f4DJQrjymxB1bghiI1MmgksveXACMLvjJoXxuetrWWT8u/BgJ3MJZ/+b/pqkArQBV3bl8pUGjiprRPBKZYWy9WSXPlF0mLeC0ctfAMvyXxdLz/OmYsU60RM5fL6qy9cURaERqPx06yzQhCPeFLrjSrdNDG/7ykiqSbGLA4gszJI3JW2XPOLKPA5ADzajvpMF0+IEjjZGglB8lHUkN10wsvSRDB0I/OHn1DItteiwBhZqbBVutjpv1LX+ONJ6g2SBEElLDI29T4H8aFOkIHjXV+aOTAm5Nrm7WvUloa1EyV3HSSDfZgzY/JAeAFLIWSngXbA/AFnCzqkUAyBfwc7Ywt3cHKgJEbr8dyX0k5kilxPAufhPvcd9oWlhUjRIhf3SgMCaX3MlIjIFpCmglmMrQHsQMhh4ST6qINVoyXgJ1ti3HMBctZggtO4cx0UbMPlslFL8dpjm74bEN2Po8NQBALr1Ritb0uBkjML2mwfZ47rqKDCEYWLRyc8RVoAHMy78DBDXOmoM37WOmSaMGejTMoV6v1mfckUazvFEL3+OYj0tJoRwrdYCJH6f6Ie/p6c4M5LA/WIl5z6kMNqvNHFWsIb+4FEmtOPTjh/pAdVYuwVoV0e3dSDyUE7SFZPSsQWbulD/B/Ha9Sa30ohrkIquvraYmq43Eu92+Zpfa2wuxsNewrf9pulDRH6FQ5BmGY98eW1Nsl5aDlbGCPva0hqZL2NjAXPrRGh6Cf7oNUslKUGGXusplY2GBAeaxwOyBZKvpuP8uN/Y7tIrGemKBtrgAbvs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(53546011)(54906003)(16576012)(316002)(66476007)(66556008)(508600001)(26005)(6486002)(66946007)(8676002)(8936002)(186003)(38100700002)(83380400001)(2616005)(110136005)(2906002)(6666004)(44832011)(5660300002)(86362001)(4326008)(31686004)(36756003)(31696002)(956004)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MHdpMTE5OEtkT2dySU43eWp3S05DRXQzUk44L2ZpU1VUQzlCNjFlMzFEU0V0?= =?utf-8?B?SVQ5Rm9BbHl4Sm56a3VBNlk1Z1R1YzlhTEpZSjNtWUs1bXZ0ZXZ6akozRXMr?= =?utf-8?B?cllaVHBOK0VkRmN6b3U3MmphblRHR28xQVhZRkJlNFF5TlBSWEluL0loNzNu?= =?utf-8?B?TkJ5OGFuUERtM1hPNld0V2pVR21PTmFvWkNaMDlIWVRaWUM0ajJJUEVHMGE3?= =?utf-8?B?WEQvL25heEFlUXJ1a0I5UjVScmxwdkJzQXhCV1ZyUkMyNFhuTG1lQzFLSHl2?= =?utf-8?B?eUl3RzV2RWZuNVA3TS9tNW8xOVVTSFpCQUFob2dmSndIUVlGMk52OU1uOGtx?= =?utf-8?B?blhhaVFkODFxdURZU053WWlkSVA3UU1zQW5tWVpJckxqWTZVbjZjdTJLOVNs?= =?utf-8?B?U1BPTGljbDA1U1g2SGl0b0tSUTl5bWFoQ21jZnBXTkpVNmdONlJpOGc4UEVy?= =?utf-8?B?dXVQM01Gd1hJK0ZNMjY4YXBTZ1NrNDQ4Y3VoMy9tT0wvQjNmVVN6K0hrcEN5?= =?utf-8?B?T1U4THRZY2FpOEdvTUNNWUVUZmpBbjBHU084ejlUY1RkUkQ0WjRDWEh3eGRH?= =?utf-8?B?Rzk4ZUVoRjg3M0NJdHFXZm11U0lMcFhPL3VyNlpkenJlWlpXTjlSOUNmU1lZ?= =?utf-8?B?R2ZOTWNPbDFBNkxmVHozWjBVZFkvTDJrbW9ZQmsxZlpFLzNscFJQT1J5Z0dn?= =?utf-8?B?L1F5d2xuSWlqUVV1MTBZa3ZwYUE3dThCaktPeVR1Wi9PY3lvSnJZREdjUW5v?= =?utf-8?B?QWVSUnZTamdBMncyVFJLL0hxN0pOejI1dnBlUEgyd3VYbzJLUDM1cjlMZ1oy?= =?utf-8?B?c2JEQUhjS3RHUDRmOVlSZVpEN1BRRHVVQWRSUlNhazQ1M1NQQnhXMWt0UmRy?= =?utf-8?B?ODlqNE5Vem0zK1YwZStxT2xBV2M5RUh2dTdndkg1Q29JNlg2bDcybTVYd1Yx?= =?utf-8?B?YlBMaWJRSktReGphcTlXcnE3WWt6TnVwRE5walIwcysrNDJUZWdmdWRYaG1F?= =?utf-8?B?R2oxaHVVTGZESWY0aUFua291ZVE1WXFDTFcvTHdlNytndGlRNmtDYnpQVGF0?= =?utf-8?B?MEFJTm8yVTJxUGJGd3J1Rit6Q0RaWlA4Y2FtZmlNSkVyTmd1SlFSR05yNXJh?= =?utf-8?B?MTk1OG5HaXg0ZUNjUDFtZEJNaWlrWWpTK0xkSVk4aW1QSk16b3FGSnMvT1ZN?= =?utf-8?B?ekFpSXJHRGY0ZkQ4K0d1WEsrSE1NNWVHdXZVTHFUZjE5aWlpL1F3WkFmd05i?= =?utf-8?B?cjU5QXJuZWh2N29UWmE4MWhxUmNpdHBBcFFmaXRPcXlWL0ErM3VOcXE1amNr?= =?utf-8?B?WG1xaFVOeHh3bDUvQldlTE5yMG84VjVSRmQ4b1FnNnVKcnBQbWZBSFpYcmx6?= =?utf-8?B?L0NkOWpOdlNSUXFXOHpDT05WWGlPN1ZoU044YzBCZXFYbTFkNDJYVFJTbWxu?= =?utf-8?B?UHNhQ1ltSkQ5aG5BUUpzcy95aldSWTNucjM0VmRwTDZZU2tkQjU0NTczdGlR?= =?utf-8?B?V2hIN01TV2twdVhHZU1ab0xZRmRob1hEdi9mK3ZTQUttNElvUXdGaS83TmVO?= =?utf-8?B?TzY4R3k0bEc5K24xMUsrcW81S21GOExPblZsZVNFZzlscW5tWm8yNmoyRzB1?= =?utf-8?B?YnlqMU01N1g4a05xU2hpVVVId2N1K3JpNEZWWmY5dFR1Z3BrTi9uNzNoRGFi?= =?utf-8?B?NUV0UE95RDFkanNsSy9wbTF2cUdFZ0J4NElvMTRRaUtXejNTVnpwbjZEY3NL?= =?utf-8?Q?T1VD0REgXZ/Kzknc+v85v95MeKycYiPsMGELH9X?= X-MS-Exchange-CrossTenant-Network-Message-Id: 298848f4-582b-4efd-ede7-08d95cc02855 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2021 12:04:23.0942 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4/MWljCs41T6AW1XTXX5qxMkqa1+1YI6VZExVj9Svjn/LZwG8kiIh4Ct6qCOFZE7nj1QOetN2/dULrzM7g1EaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4950 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1] ethdev: introduce shared Rx queue 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 Sender: "dev" On 8/11/2021 9:28 AM, Xueming(Steven) Li wrote: > > >> -----Original Message----- >> From: Jerin Jacob >> Sent: Wednesday, August 11, 2021 4:03 PM >> To: Xueming(Steven) Li >> Cc: dpdk-dev ; Ferruh Yigit ; NBU-Contact-Thomas Monjalon ; >> Andrew Rybchenko >> Subject: Re: [dpdk-dev] [PATCH v1] ethdev: introduce shared Rx queue >> >> On Mon, Aug 9, 2021 at 7:46 PM Xueming(Steven) Li wrote: >>> >>> Hi, >>> >>>> -----Original Message----- >>>> From: Jerin Jacob >>>> Sent: Monday, August 9, 2021 9:51 PM >>>> To: Xueming(Steven) Li >>>> Cc: dpdk-dev ; Ferruh Yigit ; >>>> NBU-Contact-Thomas Monjalon ; Andrew Rybchenko >>>> >>>> Subject: Re: [dpdk-dev] [PATCH v1] ethdev: introduce shared Rx queue >>>> >>>> On Mon, Aug 9, 2021 at 5:18 PM Xueming Li wrote: >>>>> >>>>> In current DPDK framework, each RX queue is pre-loaded with mbufs >>>>> for incoming packets. When number of representors scale out in a >>>>> switch domain, the memory consumption became significant. Most >>>>> important, polling all ports leads to high cache miss, high >>>>> latency and low throughput. >>>>> >>>>> This patch introduces shared RX queue. Ports with same >>>>> configuration in a switch domain could share RX queue set by specifying sharing group. >>>>> Polling any queue using same shared RX queue receives packets from >>>>> all member ports. Source port is identified by mbuf->port. >>>>> >>>>> Port queue number in a shared group should be identical. Queue >>>>> index is >>>>> 1:1 mapped in shared group. >>>>> >>>>> Share RX queue is supposed to be polled on same thread. >>>>> >>>>> Multiple groups is supported by group ID. >>>> >>>> Is this offload specific to the representor? If so can this name be changed specifically to representor? >>> >>> Yes, PF and representor in switch domain could take advantage. >>> >>>> If it is for a generic case, how the flow ordering will be maintained? >>> >>> Not quite sure that I understood your question. The control path of is >>> almost same as before, PF and representor port still needed, rte flows not impacted. >>> Queues still needed for each member port, descriptors(mbuf) will be >>> supplied from shared Rx queue in my PMD implementation. >> >> My question was if create a generic RTE_ETH_RX_OFFLOAD_SHARED_RXQ offload, multiple ethdev receive queues land into the same >> receive queue, In that case, how the flow order is maintained for respective receive queues. > > I guess the question is testpmd forward stream? The forwarding logic has to be changed slightly in case of shared rxq. > basically for each packet in rx_burst result, lookup source stream according to mbuf->port, forwarding to target fs. > Packets from same source port could be grouped as a small burst to process, this will accelerates the performance if traffic come from > limited ports. I'll introduce some common api to do shard rxq forwarding, call it with packets handling callback, so it suites for > all forwarding engine. Will sent patches soon. > All ports will put the packets in to the same queue (share queue), right? Does this means only single core will poll only, what will happen if there are multiple cores polling, won't it cause problem? And if this requires specific changes in the application, I am not sure about the solution, can't this work in a transparent way to the application? Overall, is this for optimizing memory for the port represontors? If so can't we have a port representor specific solution, reducing scope can reduce the complexity it brings? >> If this offload is only useful for representor case, Can we make this offload specific to representor the case by changing its name and >> scope. > > It works for both PF and representors in same switch domain, for application like OVS, few changes to apply. > >> >> >>> >>>> >>>>> >>>>> Signed-off-by: Xueming Li >>>>> --- >>>>> doc/guides/nics/features.rst | 11 +++++++++++ >>>>> doc/guides/nics/features/default.ini | 1 + >>>>> doc/guides/prog_guide/switch_representation.rst | 10 ++++++++++ >>>>> lib/ethdev/rte_ethdev.c | 1 + >>>>> lib/ethdev/rte_ethdev.h | 7 +++++++ >>>>> 5 files changed, 30 insertions(+) >>>>> >>>>> diff --git a/doc/guides/nics/features.rst >>>>> b/doc/guides/nics/features.rst index a96e12d155..2e2a9b1554 100644 >>>>> --- a/doc/guides/nics/features.rst >>>>> +++ b/doc/guides/nics/features.rst >>>>> @@ -624,6 +624,17 @@ Supports inner packet L4 checksum. >>>>> ``tx_offload_capa,tx_queue_offload_capa:DEV_TX_OFFLOAD_OUTER_UDP_CKSUM``. >>>>> >>>>> >>>>> +.. _nic_features_shared_rx_queue: >>>>> + >>>>> +Shared Rx queue >>>>> +--------------- >>>>> + >>>>> +Supports shared Rx queue for ports in same switch domain. >>>>> + >>>>> +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:RTE_ETH_RX_OFFLOAD_SHARED_RXQ``. >>>>> +* **[provides] mbuf**: ``mbuf.port``. >>>>> + >>>>> + >>>>> .. _nic_features_packet_type_parsing: >>>>> >>>>> Packet type parsing >>>>> diff --git a/doc/guides/nics/features/default.ini >>>>> b/doc/guides/nics/features/default.ini >>>>> index 754184ddd4..ebeb4c1851 100644 >>>>> --- a/doc/guides/nics/features/default.ini >>>>> +++ b/doc/guides/nics/features/default.ini >>>>> @@ -19,6 +19,7 @@ Free Tx mbuf on demand = >>>>> Queue start/stop = >>>>> Runtime Rx queue setup = >>>>> Runtime Tx queue setup = >>>>> +Shared Rx queue = >>>>> Burst mode info = >>>>> Power mgmt address monitor = >>>>> MTU update = >>>>> diff --git a/doc/guides/prog_guide/switch_representation.rst >>>>> b/doc/guides/prog_guide/switch_representation.rst >>>>> index ff6aa91c80..45bf5a3a10 100644 >>>>> --- a/doc/guides/prog_guide/switch_representation.rst >>>>> +++ b/doc/guides/prog_guide/switch_representation.rst >>>>> @@ -123,6 +123,16 @@ thought as a software "patch panel" front-end for applications. >>>>> .. [1] `Ethernet switch device driver model (switchdev) >>>>> >>>>> >>>>> `_ >>>>> >>>>> +- Memory usage of representors is huge when number of representor >>>>> +grows, >>>>> + because PMD always allocate mbuf for each descriptor of Rx queue. >>>>> + Polling the large number of ports brings more CPU load, cache >>>>> +miss and >>>>> + latency. Shared Rx queue can be used to share Rx queue between >>>>> +PF and >>>>> + representors in same switch domain. >>>>> +``RTE_ETH_RX_OFFLOAD_SHARED_RXQ`` >>>>> + is present in Rx offloading capability of device info. Setting >>>>> +the >>>>> + offloading flag in device Rx mode or Rx queue configuration to >>>>> +enable >>>>> + shared Rx queue. Polling any member port of shared Rx queue can >>>>> +return >>>>> + packets of all ports in group, port ID is saved in ``mbuf.port``. >>>>> + >>>>> Basic SR-IOV >>>>> ------------ >>>>> >>>>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >>>>> index 9d95cd11e1..1361ff759a 100644 >>>>> --- a/lib/ethdev/rte_ethdev.c >>>>> +++ b/lib/ethdev/rte_ethdev.c >>>>> @@ -127,6 +127,7 @@ static const struct { >>>>> RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM), >>>>> RTE_RX_OFFLOAD_BIT2STR(RSS_HASH), >>>>> RTE_ETH_RX_OFFLOAD_BIT2STR(BUFFER_SPLIT), >>>>> + RTE_ETH_RX_OFFLOAD_BIT2STR(SHARED_RXQ), >>>>> }; >>>>> >>>>> #undef RTE_RX_OFFLOAD_BIT2STR >>>>> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >>>>> index d2b27c351f..a578c9db9d 100644 >>>>> --- a/lib/ethdev/rte_ethdev.h >>>>> +++ b/lib/ethdev/rte_ethdev.h >>>>> @@ -1047,6 +1047,7 @@ struct rte_eth_rxconf { >>>>> uint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */ >>>>> uint8_t rx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */ >>>>> uint16_t rx_nseg; /**< Number of descriptions in rx_seg array. >>>>> */ >>>>> + uint32_t shared_group; /**< Shared port group index in >>>>> + switch domain. */ >>>>> /** >>>>> * Per-queue Rx offloads to be set using DEV_RX_OFFLOAD_* flags. >>>>> * Only offloads set on rx_queue_offload_capa or >>>>> rx_offload_capa @@ -1373,6 +1374,12 @@ struct rte_eth_conf { >>>>> #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000 >>>>> #define DEV_RX_OFFLOAD_RSS_HASH 0x00080000 >>>>> #define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT 0x00100000 >>>>> +/** >>>>> + * Rx queue is shared among ports in same switch domain to save >>>>> +memory, >>>>> + * avoid polling each port. Any port in group can be used to receive packets. >>>>> + * Real source port number saved in mbuf->port field. >>>>> + */ >>>>> +#define RTE_ETH_RX_OFFLOAD_SHARED_RXQ 0x00200000 >>>>> >>>>> #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ >>>>> DEV_RX_OFFLOAD_UDP_CKSUM | \ >>>>> -- >>>>> 2.25.1 >>>>>