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 6B4A3A0C49; Tue, 15 Jun 2021 10:26:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2F814067A; Tue, 15 Jun 2021 10:26:25 +0200 (CEST) Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by mails.dpdk.org (Postfix) with ESMTP id BAB0140140 for ; Tue, 15 Jun 2021 10:26:24 +0200 (CEST) Received: by mail-il1-f171.google.com with SMTP id b9so14613726ilr.2 for ; Tue, 15 Jun 2021 01:26:24 -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=SsWPnXI+HCnaPJEH9vKa4W8MlSIVVCmq47wDXdfSTrg=; b=ZEMw+GcFhUmZEWL3GV4wfkjEpQEeEov09kwyurg6ExnibvwcwIOPvafGCLeQBLWSsy N+UPfHf0RjvupCUVttazqiOzjrSdDJ31FVUeaBpFsUB8I+aYPgQxOjUTeTQ+l9vpLEGN I+uHmZDwgOx0Wd88BNNvAcywLzH30HNNoNg4EWxdF+XFY5OYNWJkAv9jBMnzQS9NC1WN VKdah25Px0VU/g+wzWyEm9n6u8IQfaPtuoS+p9alf1wF2cO2ivXn1kxQTILejQ15DiIG QrR/tnI5bLNXGCJ2e6/K9qxSUmbjRPITGcf394wunSuhfMIoZJ6fwdvI0RA7EArQ0aIU 2cyw== 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=SsWPnXI+HCnaPJEH9vKa4W8MlSIVVCmq47wDXdfSTrg=; b=iNoCnJ1o71D+u/D4AckOYbarE/U6lLvuQtXCeyND0+s6AvOtF+34ljz0uHSJ0rOLwY ej/lxDAB58RERCk0A+K/TD1dx76lDhmZk1RdeoDCtvMkuhyqkSiokfwoVlHdGMNLxndP +AMBNkFbkdNVeGPF5eINDIT5jUdxTh2RW6ovMua14Yd6JoJEN/FHpTKbAxiRykb14crQ sePX83oSYM8Cu0SjttKvNE7g1dGH+L7X4MG2N7t9CVLus2GnQr83LmwT8qCD2UYaqLev eCv/3rIX+5zS1+fRIBT8Ia9gZrEzwjSPQ+YbFdJWFew2CiUP6oqwF+dmfxKt926PcHgM WHMQ== X-Gm-Message-State: AOAM5314ZYo+bjswrGcpo97CkYoI+jJA/1NMjm2tLv4KmPVP/cdcw7yP bC87z+F50+ghrASsiU12THq8AfBjCGDbv+FfcYU= X-Google-Smtp-Source: ABdhPJz/oRVfnKL7wvUIUmHdWhbXoizBAQ+Ik/xKizaYtnhAdNPD1QmrZf1YcDoFEziciCCXOQRC2+PIVuVixz8TEE8= X-Received: by 2002:a05:6e02:1a6a:: with SMTP id w10mr17369370ilv.130.1623745583976; Tue, 15 Jun 2021 01:26:23 -0700 (PDT) MIME-Version: 1.0 References: <20210603080352.10924-1-alvinx.zhang@intel.com> <20210615081956.23656-1-alvinx.zhang@intel.com> In-Reply-To: <20210615081956.23656-1-alvinx.zhang@intel.com> From: Jerin Jacob Date: Tue, 15 Jun 2021 13:56:08 +0530 Message-ID: To: Alvin Zhang Cc: Qi Zhang , Andrew Rybchenko , Ajit Khaparde , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3] ethdev: add IPv4 and L4 checksum RSS offload types 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 Tue, Jun 15, 2021 at 1:50 PM Alvin Zhang wrote: > > This patch defines new RSS offload types for IPv4 and L4 checksum, > which are required when users want to distribute packets based on the > IPv4 or L4 checksum field. What is the usecase for distribution based on L4/IPv4 checksum? Is it something like HW has the feature so expose it or there is some real use case for this application? > For example "flow create 0 ingress pattern eth / ipv4 / end > actions rss types ipv4-chksum end queues end / end", this flow > causes all matching packets to be distributed to queues on > basis of IPv4 checksum. > > Signed-off-by: Alvin Zhang > Reviewed-by: Andrew Rybchenko > Acked-by: Ajit Khaparde > --- > > v3: Add L4 checksum RSS offload type > --- > app/test-pmd/cmdline.c | 4 ++++ > app/test-pmd/config.c | 2 ++ > lib/ethdev/rte_ethdev.h | 2 ++ > 3 files changed, 8 insertions(+) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 0268b18..6148d84 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2254,6 +2254,10 @@ struct cmd_config_rss { > rss_conf.rss_hf = ETH_RSS_ECPRI; > else if (!strcmp(res->value, "mpls")) > rss_conf.rss_hf = ETH_RSS_MPLS; > + else if (!strcmp(res->value, "ipv4-chksum")) > + rss_conf.rss_hf = ETH_RSS_IPV4_CHKSUM; > + else if (!strcmp(res->value, "l4-chksum")) > + rss_conf.rss_hf = ETH_RSS_L4_CHKSUM; > else if (!strcmp(res->value, "none")) > rss_conf.rss_hf = 0; > else if (!strcmp(res->value, "level-default")) { > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 43c79b5..14968bf 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -140,6 +140,8 @@ > { "gtpu", ETH_RSS_GTPU }, > { "ecpri", ETH_RSS_ECPRI }, > { "mpls", ETH_RSS_MPLS }, > + { "ipv4-chksum", ETH_RSS_IPV4_CHKSUM }, > + { "l4-chksum", ETH_RSS_L4_CHKSUM }, > { NULL, 0 }, > }; > > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index faf3bd9..1268729 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -537,6 +537,8 @@ struct rte_eth_rss_conf { > #define ETH_RSS_PPPOE (1ULL << 31) > #define ETH_RSS_ECPRI (1ULL << 32) > #define ETH_RSS_MPLS (1ULL << 33) > +#define ETH_RSS_IPV4_CHKSUM (1ULL << 34) > +#define ETH_RSS_L4_CHKSUM (1ULL << 35) > > /* > * We use the following macros to combine with above ETH_RSS_* for > -- > 1.8.3.1 >