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 C5614A0C43; Tue, 14 Sep 2021 16:01:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A59F14068F; Tue, 14 Sep 2021 16:01:11 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3ECAA4003C for ; Tue, 14 Sep 2021 16:01:09 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10106"; a="307551501" X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="307551501" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2021 07:01:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="470152839" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 14 Sep 2021 07:01:01 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 14 Sep 2021 07:01:01 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 14 Sep 2021 07:01:01 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 14 Sep 2021 07:00:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dF5G+BrrktfSz/HPLehbkeVVWC+f957ZuIV/zFP4aK86i8yMZRBanQEkKjo7gak/SZ9I1rtbqArb/ev4grS6Htu+14abb6PdeGu3SsGrD5wW6ALe2IiusPWPs1VNfKQyc+1fhKMHa0MrXTAHXOkF/T8sHVL91Drkt4mNACw2bUfppMQ2ZNwksuwxibw+z2IjQ0v237X1lUZavHxo0tlP2ieoIs16aVDiO3eMXbdCpa7vj4f2R/5G4FNtXq74qCyPRZ1OU4z/PE7gyuU0X8mvjaZPdTbaCp7P8jWEBm+xpLsdLkXndtX9UUNx2EbBxlQrtD5s/44dq43HyAIKhI5dAQ== 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; bh=uk/7WF1Tf/ddf0+KBupoWycIOgtCthsH7cK5UIRCLfE=; b=GIBZ2Kim07PrUd80JvN6DhpA/3HJmNL/gUPd/S3WDuN2rFlqNI2rVvlhGkL6G2a/0fMiwAv9ogLgYDs2THFixQ24TNJMbaNOU2RVYlgxty3O/oXXwcqbioz0r70iGOk6cFFBiK6gba2mHah5YrvAxXP+wbITt9XnOOLPAGlHoDt04o7oQcVW4xiwYd9L4pvvmAGCLgec8PkfCfyg6/SJEBQyATYur4pJB2T68ecNrx2NfKHZb1pqqcm0FUCy4r0BLXTLUuvSQ+2aJB9gyYqubO6AgZgfG88LWLOr1pTtB318neuNOePkwhf942JUVuYElU4D6HEt7++4hmQJTg+JoQ== 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=uk/7WF1Tf/ddf0+KBupoWycIOgtCthsH7cK5UIRCLfE=; b=JqkG6HiHmmgEoTj5vmEn/OBH5nyierxlPfzxXckg2U8C4nl5Ct0MAkxf+j13cKzx21TK1JZL6SNo4f/Zw2c2MlKnY6HhcVCCua7krxc8hymtWzE3yvYCIykA7wfFsHL8pEVdeCujr0TQDlVIABS3NTZC4qO3YhWTfPEvAEHAKfk= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5127.namprd11.prod.outlook.com (2603:10b6:510:3c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 14 Sep 2021 14:00:54 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4500.019; Tue, 14 Sep 2021 14:00:54 +0000 To: Alvin Zhang , , CC: , Ajit Khaparde , "Aman Deep Singh" References: <20210831094459.7840-1-alvinx.zhang@intel.com> <20210831095255.21156-1-alvinx.zhang@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Tue, 14 Sep 2021 15:00:48 +0100 In-Reply-To: <20210831095255.21156-1-alvinx.zhang@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB6PR0301CA0091.eurprd03.prod.outlook.com (2603:10a6:6:30::38) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR0301CA0091.eurprd03.prod.outlook.com (2603:10a6:6:30::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Tue, 14 Sep 2021 14:00:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87e0a8a2-796c-460d-7582-08d97788116c X-MS-TrafficTypeDiagnostic: PH0PR11MB5127: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True 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: XTLQq2otuTKS2Vw1utuokQI7Nj4dYxPRZfNTtFaqKSnMWpXSkykn+8MP/zc4LKyCk2TCj2jS2P0R7LSlxxhNhCvMJ3fTM2xfsJy53LlgrSttQu4iHujkWm3mYZBOZf3N2s5AV4/Z7Nd0HH62XClYwc1orv9E9oeh1QbBd0dUIiBNQ/+1Uq7VoRTlWN9VSW65hey1S3Ji6VwEuSaU0WxYcw3fw3JYBS9OVLCIpVH5776VWIW+9MXJKDYNoZ37yd/JpYHiA6bRgb0etMFjw/pnLcMG9Gjm+JXMK7z41BSQwn3PIyCVT9RvECV2zcH1v1Deo/YuE/LbL6wRVi9qkt02s7Y/RfcJX7ZhFjCj5QGjaKb+mNVxHGe6ApwVcQg/1aobQHhejrAbUfnpAPJaNdiGdGY1+Z5rrwiZgbW+GISIT0BfYCVUTjDb3ctOdT57dMKVeq1bLvWTIYrbmz4wEEJkhGmwy5/W+MmFJyhoGecpgOK+c+vltvlrBsbB1vQz2gg3xNjEc8zqHKyNkMc96F4fnDdKU51edMH7GmmEqHknuy5WoLo1AlAZYZtDZqPX5wrAy2wqaTkFw4pEFxetXU2H/uwDb/IB/ZN0JjyQEsAW4jl50hENMhUowVpEEyb/VsgViflMHHwX+Pr+F1dQgAYFHSlhuvkjJHG1ghQBEB07wwMdv4At1nHgRpyCDdS46OY6VDu/zRLCwSz14xGSO5SAFg== 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)(136003)(346002)(396003)(39860400002)(376002)(366004)(2906002)(16576012)(316002)(31696002)(54906003)(6666004)(107886003)(31686004)(8676002)(83380400001)(8936002)(66556008)(478600001)(186003)(38100700002)(66476007)(66946007)(53546011)(2616005)(6486002)(956004)(4326008)(5660300002)(44832011)(36756003)(6636002)(26005)(86362001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a0MrOVRudWNjTDdvVlIxYU9mVnA2UEd6bDhiQURPMTIxUzJvYldlWVkvdy9D?= =?utf-8?B?SlFjeVFmUndvZmlyWEtsdzBMQVFFLzYwUnFTNkFTaXhlMlBGRlVPR2FaM3pZ?= =?utf-8?B?cndFeHNBRDl0NzNHQ2w2a2JJRWcvZS8wa0UrQ01vaWFWTk1qR3NaQXZ6Z2ww?= =?utf-8?B?emRUU2FjM1NTVkFKdzV2MEExTlE2SSt0UC8rbFdNWGpSREhXaGp0S3JuY1Bu?= =?utf-8?B?a3NoT2gwN0Nhc1g0Nzlmc1FESjdkMnl3c25QV1dLVXEzYnBGOTRtSlRQNFVW?= =?utf-8?B?ekNMQWV2VjN3OEI3WjNrRzZsNHZ0SnhhNk0xUlBkVFFvMzFkcnJBa1lZSGNP?= =?utf-8?B?WTV2bDU3azhFN0VBWGxJbUhNbkpYS08xa1N0NVNpYjkveFZIZVpHMXhWR0NZ?= =?utf-8?B?OStyRUlzeWRjS2NlYzlkdHJkTDJBbzhwNkhxWm5NUkVjMWgyM3Z4aGY2Z2p4?= =?utf-8?B?Y3lucXZkRnNyaXNzdklSTEszbU96VC9u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zRlaGhxTkhsMGhsUGJqYkEwYm5uOFU2RHJQM1RZZldSbjZzTEpW?= =?utf-8?B?UHdRVmQ1NDdtWno2QkdhRnFqYWNqUzJGQmtVa2xTWU9IUVZ3R1grQ2NGaTFF?= =?utf-8?B?Y05vMG1PMlB6RUJadnlpNHVqc05Sb01GZHc0RGpsZ0l0MFVPVk1DMUxwa3pk?= =?utf-8?B?VVloOUpDY0hXT01yWVpFU0pjcEg0Sk5CeTU3R09YMSt5ZzhVWG51SXBSZWZZ?= =?utf-8?B?b2VkVHRDNmdhdEZzV3MwY0M3eDlLVlRXbjlycFlyajU1WE84M1gwRlJUUDBp?= =?utf-8?B?OEY4OHY1RldyNHFFQ2ZSMHdFRndUbWpITE1rSHl6cUFOcDJTRFUxdEJYMU95?= =?utf-8?Q?mZrPLWPwcCOr0z4R8IGoc6kZaIzlS7/grXzYopb?= X-MS-Exchange-CrossTenant-Network-Message-Id: 87e0a8a2-796c-460d-7582-08d97788116c X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2021 14:00:54.2578 (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: DNY7rrzTnpVOSJghb77y2dgNNYhtxbKF2nymy0lULcKD1J5cVc8lZ3UkSLAqM14Xt3rKFysFRGfmHf9vAZQW8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5127 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v7] 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 8/31/2021 10:52 AM, Alvin Zhang wrote: > This patch defines new RSS offload types for IPv4 and > L4(TCP/UDP/SCTP) checksum, which are required when users want > to distribute packets based on the IPv4 or L4 checksum field. > > 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 > Acked-by: Ajit Khaparde > Acked-by: Aman Deep Singh > --- > > v6: rebase to eeedef70, update some note > v7: fix code style issues > --- > app/test-pmd/cmdline.c | 4 +++- > app/test-pmd/config.c | 2 ++ > doc/guides/rel_notes/release_21_11.rst | 5 +++++ > lib/ethdev/rte_ethdev.h | 24 ++++++++++++++++++++++++ > 4 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 82253bc..656a311 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2252,6 +2252,8 @@ 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, "none")) > rss_conf.rss_hf = 0; > else if (!strcmp(res->value, "level-default")) { > @@ -2323,7 +2325,7 @@ struct cmd_config_rss { > .help_str = "port config all rss " > "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" > "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|mpls|none|level-default|" > - "level-outer|level-inner|", > + "level-outer|level-inner|ipv4-chksum|", > .tokens = { > (void *)&cmd_config_rss_port, > (void *)&cmd_config_rss_keyword, > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 31d8ba1..ece78f2 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/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst > index d707a55..fa29b13 100644 > --- a/doc/guides/rel_notes/release_21_11.rst > +++ b/doc/guides/rel_notes/release_21_11.rst > @@ -55,6 +55,11 @@ New Features > Also, make sure to start the actual text at the margin. > ======================================================= > > +* **Add new RSS offload types for IPv4/L4 checksum in RSS flow.** > + > + Add macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and > + TCP/UDP/SCTP header checksum field can be used as input set for RSS. > + > > Removed Items > ------------- > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index d2b27c3..e6734df 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -537,6 +537,30 @@ 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) > + > +/** > + * The ETH_RSS_L4_CHKSUM generally refers to a type of checksum field for what does 'generally' means here? Is there a case it refers to something else? > + * any L4 header, such as TCP, UDP and SCTP. It is similar to ETH_RSS_PORT, > + * it does not specify the type of L4 header. > + * We use this macro to replace below macro for constricting the use of RSS > + * offload bits: > + * ETH_RSS_IPV4_TCP_CHKSUM > + * ETH_RSS_IPV4_UDP_CHKSUM > + * ETH_RSS_IPV4_SCTP_CHKSUM > + * ETH_RSS_IPV6_TCP_CHKSUM > + * ETH_RSS_IPV6_UDP_CHKSUM > + * ETH_RSS_IPV6_SCTP_CHKSUM As I get you are listing them here to say the 'ETH_RSS_L4_CHKSUM' replaces possible usage of above list, but my concern is it may confuse people as those macros exists (or did exist in the past), so what do you think to remove them? And just to confirm, we can't use this flag, 'ETH_RSS_L4_CHKSUM' anymore with 'rte_eth_rss_conf.rss_hf', right? Since it will be missing some context for it. Which means some old APIs (and configuration) won't support this new offload, but only rte_flow will support it. If above is correct should it be highlighted in above comment? > + * > + * Then how to use this macro? We can use it in RSS flow where the pattern Can we convert this question to a description just to be a little more formal? > + * type will specify the L4 header type, for example "flow create 0 ingress \ > + * pattern eth / ipv4 / tcp / end actions rss types l4-chksum end queues end \ > + * / end" > + * > + * For the case that checksum is not used in a UDP header, it takes the > + * reserved value 0 as input for the hash function. > + */ > +#define ETH_RSS_L4_CHKSUM (1ULL << 35) > > /* > * We use the following macros to combine with above ETH_RSS_* for >