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 C4E68A0548; Tue, 17 Aug 2021 11:33:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F73840DF5; Tue, 17 Aug 2021 11:33:55 +0200 (CEST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mails.dpdk.org (Postfix) with ESMTP id 02E214014E for ; Tue, 17 Aug 2021 11:33:53 +0200 (CEST) Received: by mail-io1-f43.google.com with SMTP id a21so11804249ioq.6 for ; Tue, 17 Aug 2021 02:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8wcQwUSjxBOgYIRWUQaMC4jGSeWGmk5Akw7+v4ms2Xw=; b=mJfORb9hqglMl6BMjkq6lPKsGlGM1VRSJdlfyXngkvVH4bbE+nzdn35Fg+ynNuTNTS MrYb8sf1pqngjCojSau5NL6bpFkGfCMX4XrYIBQl+9J/5nvbGqXWTfi1FITqDVBbnvJ4 5FSHltV+UxWexjMZssHK3N+gP1ikCExGJvASQ23SIGkrcIv2WBnBfBVlj1wvidkpQvVw Va8R02Ii4v5S3TauaCPu/Jun3NC3XYxaWDJZxQ/E4xN8bEEodU9MZ5xBA6bKRH3/hV20 SxIk6NLtkKfdNi6B1LNyAcoJ2gj1W+DLMI8bl/trNnWY2iSimBItyIdjDMsgJRFfqxmP bSsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8wcQwUSjxBOgYIRWUQaMC4jGSeWGmk5Akw7+v4ms2Xw=; b=r/V5/WLlrr86A/kh6gCVf7ZT4mi6WerqwZ3Z5xq4efxanHTJqczn/Qh8nOKsw9uDkJ 0/EYW/iyapuA/NVojlBFmFAnQKI8E3TnE9aEoUTUL0tVNfJtN78vK2OYPOg2bG041Q5W UqlY+d9ta4w4vFvbM8JJZm/G3vjRYmSYvighryCM+86pzDXzPuNh5D4/SK0koQZnvR23 EC0IiNO098dmtFsvS/mAFl9aOUKLeeb6G8duYURcWs50y189XAMAksRPt+o3ZDdxBPr4 MJsJQGPhbsSp9h0zYXQ3eBK2khO+YMf4brBN0mE7JJqg9QNAHN469WJeDMTyLG0bgGMC /JCA== X-Gm-Message-State: AOAM532sPLz7jIkn9+u2Nuvui45qbe9K4gDcB+/7mCTXINZJmIVTPJTB qyKCoW7HTkGdLLtoSpuhoxIkxPkcw2i0pGJb2Eo= X-Google-Smtp-Source: ABdhPJw9MGHXZmcFCJ93BzCEYIEF7TxAtFcz549gxj8ANatE78NgpeMUHTsrHY6dIiZhMiIf2N/96/nfmt4xr/rYf/w= X-Received: by 2002:a5d:9486:: with SMTP id v6mr2249745ioj.163.1629192833224; Tue, 17 Aug 2021 02:33:53 -0700 (PDT) MIME-Version: 1.0 References: <20210727034204.20649-1-xuemingl@nvidia.com> <20210811140418.393264-1-xuemingl@nvidia.com> In-Reply-To: <20210811140418.393264-1-xuemingl@nvidia.com> From: Jerin Jacob Date: Tue, 17 Aug 2021 15:03:27 +0530 Message-ID: To: Xueming Li Cc: dpdk-dev , Ferruh Yigit , Thomas Monjalon , Andrew Rybchenko Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 01/15] 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 Wed, Aug 11, 2021 at 7:34 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 must be polled on single thread or core. > > Multiple groups is supported by group ID. > > Signed-off-by: Xueming Li > Cc: Jerin Jacob > --- > Rx queue object could be used as shared Rx queue object, it's important > to clear all queue control callback api that using queue object: > https://mails.dpdk.org/archives/dev/2021-July/215574.html > #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. */ Not to able to see anyone setting/creating this group ID test application. How this group is created? > /** > * 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 >