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 083B545BCB; Fri, 25 Oct 2024 19:01:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACF5D402BD; Fri, 25 Oct 2024 19:01:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by mails.dpdk.org (Postfix) with ESMTP id A80A940156 for ; Fri, 25 Oct 2024 19:01:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729875676; x=1761411676; h=message-id:date:subject:to:references:from:in-reply-to: mime-version; bh=2Zyt16S/vnmczrG0pHXfz+l1I6oPSr9Agvt7NnbqiIw=; b=SnorjzuNrIicxsjYktB9LtOwYfa/elW7Vsx8jIwWoC4tks40Nnz0rRV6 Yscy1DXJC7uZVNQsPG9d5xq1j3AIYmGlaAfyn5ZwGB2wvLNtU/rQ0lMAG osM+dnOcA+lz0oJBy3gnV0DitmUHAj4LChNBRVY7952rsKxnD4vnob/+W 0aTib/LESwVaj/HMKDmtcVKN30kCVvAebTbkrG7Dv2Nc21fsNRd5d+wSL Ay8QShuNHOR5iAuXFbfQLbQOwSSfFeF9bAx7upYE/oMHN+LvmQVa82Sv1 KBfdxwsDovrdIduNfVIp3iaW0lK8TX5qRJeaaHY+OQZdqK8A4jK/4Ly/5 g==; X-CSE-ConnectionGUID: 0uK2nhkcQm6qFhvgpHOaMw== X-CSE-MsgGUID: z8iPhYEXSD6CjEKrVYeDSQ== X-IronPort-AV: E=McAfee;i="6700,10204,11236"; a="29447391" X-IronPort-AV: E=Sophos;i="6.11,232,1725346800"; d="scan'208,217";a="29447391" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2024 10:01:15 -0700 X-CSE-ConnectionGUID: wn+5ba9rQo+xOKKU6RfTVQ== X-CSE-MsgGUID: 3AZz1jOiRnWVZzVI1c3KsQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,232,1725346800"; d="scan'208,217";a="81069614" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 25 Oct 2024 10:01:14 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 25 Oct 2024 10:01:13 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 25 Oct 2024 10:01:13 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) 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.2507.39; Fri, 25 Oct 2024 10:01:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JTX34b4APFlA7R70oOjlNZcfHNPA1mNxt9vJy/H9QE2NsZBPBhySH3FIfYfVjE+V45NNO6ZEQFS3AaaD3VfCBpIEyO6/36oNoOc1k+SQClz8EAdZeonVN765DrIH8Ms11VQyt65mRXXKZS1/4dYeJyl8yqvPsVp0KpSrHtmr4C2PhO483DWDsihYduoiqxUPsMToeZmJaCxQB7/tv9OR+4x0stiOv6+G4xqp+NauCpKnz2iRAXMPMUJV8HEhqgl6zvRfkHZdR48qUPBrsYp8nZ3qSTpAO6qWBRbLCvwN8wod+5oBJyx71Jmu82iNQtfqhE13DBHCEQLAwq14ajQ7dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=BNHHvrw5Vo5L9gmQSyLbF3kwmBzeJo5CmQ8Khdy4FPQ=; b=HOZgHmDmRzfcLy0lxWE+4u9lbcl8Exaaye+FZo6b6fZczUlbx+kATJdlo4qD98Mmu8qbB16QJRyprTIW3mb7nmMa1uLR+fGpE717PIlYK0urFSc2UNKndpYo7RZve4yPdDXgEoHBANlJAgPO0ei8AhsWunoJyarK0I4sCX0pZODwSLfDVBh7XwvdKwTI+FrvdMHHISQ92XxcgjmvBkIlY4O1BbKtZKoa7CyQT7N3PUkIOb5tXOxCtqKgXAMtikbqQBwXOcv74vWDE6++Qeu+/jruHB210RfnYZHspUQRJMHyyYH7hJtGTy4Jfd6bwuedHcMSTtBjfMeltB/3/8PV6g== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by DS0PR11MB7580.namprd11.prod.outlook.com (2603:10b6:8:148::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Fri, 25 Oct 2024 17:01:11 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%4]) with mapi id 15.20.8093.018; Fri, 25 Oct 2024 17:01:11 +0000 Content-Type: multipart/alternative; boundary="------------5e15S4HH1xw0uKXo5S0vO7b0" Message-ID: Date: Fri, 25 Oct 2024 18:01:06 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/5] net/ice: add option to download scheduler topology To: Bruce Richardson , References: <20240807093407.452784-1-bruce.richardson@intel.com> <20241023165540.893269-1-bruce.richardson@intel.com> <20241023165540.893269-2-bruce.richardson@intel.com> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <20241023165540.893269-2-bruce.richardson@intel.com> X-ClientProxiedBy: WA2P291CA0045.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1f::19) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|DS0PR11MB7580:EE_ X-MS-Office365-Filtering-Correlation-Id: a357e074-1fce-4c34-132b-08dcf516a0a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024|8096899003; X-Microsoft-Antispam-Message-Info: =?utf-8?B?S1FXQ3pXV3F3cFYwL1dFOFhJbUVRV2ZYRmtxWngxd2dteGVDTVp1dzlibEpK?= =?utf-8?B?cTdWQWozL2RaYjY1bzdqeUM4ME50OFE2THpZZlYzMUYySEtZWXczbHR5TXNI?= =?utf-8?B?TFBHQTN2UkplZkpINXpreEY1VTkxZFpna3JoVmpGMG01Rmhla292MVY5cDBV?= =?utf-8?B?dzNTN0NmTFh2bDVwY1hXci9ZSWpNRFZXa2ViY0FaNnBlT2VyYWdpNFdhRm9X?= =?utf-8?B?NkdBWHk0TElQN01uNVVJd2xBbzZGZWt4OWNrc3ltb0J0OXF2czM1cmo0UFp2?= =?utf-8?B?YmRHZGlUanZROXVwTEdtekM3YlBxOTJMQkY5TFJFeDdUbDlrNHRDNVJjSzhH?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SDJW?= =?utf-8?B?SHo2K3ZoOE1HTjVYUU5IemJvZjRQMDczdzNZeERNYUVvR1U5eDdUeU12MzVy?= =?utf-8?B?T2YrMGpkS3hady82Si80U1ZoUWZpVlVXTFU1SXlDMGM5bHRPQmFTajJydENZ?= =?utf-8?B?N1IxUXZiR1NTTTBjaEJZWGRSZFBTQmh0Zy9EZ3lZcG5zbFI5Ty9PeHBTVFpu?= =?utf-8?B?ckpUVVpkTFZkaUY3bFJlcllVM2VhUkE4VFB0SlJ1dWhwdTlZeDVreEhFQTRa?= =?utf-8?B?ZW5FOHBpekVMK0ZzeXd5SXJxY25xMXpRem5RM3BBSzJKVVVKVGpvU1R6L1ds?= =?utf-8?B?eW1QNlRPcm9OQzBMU01pQ3lqcFJ5bGFKbXp4NXg0QXY2ZjRwc1B6VFI4SlYv?= =?utf-8?B?MGxFWmRNeW1WL3Fnbnl1ejdGSXNmSUUwMnJuMTNmUTd4aWVWV1JTOXhwSXhu?= =?utf-8?B?UlZRSnI5YklsY3ZqU3RDb1BHMVhFalB0cncxL2RXUzh0cEVvWHU2UEVaaHFu?= =?utf-8?Q?HkYZmK+UoNgaremFsm0Q0Z56d3peFEitjfz/2Tm?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(8096899003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TWZ6T1JZSnVWTjIrUCtNM1JqeEVaeTRldk5jZUdmdGlBeWc2MGE5UnBsRzFT?= =?utf-8?B?MkUraGV0UDNmQ1FEbmtJQWcwNHF0bnZJMEpOYzhkR2JEa1NoNVFWaG1vVFZl?= =?utf-8?B?Z3JmN0h5RzY4UkJVSVI5YkZnZHc2Y3VSTGpneGdZQnB3WjB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xTHkyWlIwWjJSUXBJSXh5UXcxR1VuZHlSY1U5QkNnWlBOb1ps?= =?utf-8?B?VVllbk4rTjBSU1gwajlYbVJVK0xVbGhJLzVkTVZSRHk4bThDMVlDWWtkYVd2?= =?utf-8?B?b3FGZUNiWEFyUUFiQUJNVmJ5U05YemJidWRIWGF4eDYvdWlTcHpsRk1ONTJt?= =?utf-8?B?cTY1Y1YybDVqQ0FWSmF3L2dvOXRERE1ud0hjL3VPRmlUQXM5L0hSOHhCZVVl?= =?utf-8?B?Y1E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: a357e074-1fce-4c34-132b-08dcf516a0a9 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2024 17:01:11.5934 (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: kGEXCCsKY9JJ4u4ocmpZ23NNpJtD+BDfimQ3dCTkDk4fIrZ1BJk9xufT3QBnbJ7JPNhGXAQ+YKarVSX5eblPS9tp/MTEBaDnVwetifmbHUI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7580 X-OriginatorOrg: intel.com 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 --------------5e15S4HH1xw0uKXo5S0vO7b0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Hi Bruce, On 23/10/2024 17:55, Bruce Richardson wrote: > The DDP package file being loaded at init time may contain an > alternative Tx Scheduler topology in it. Add driver option to load this > topology at init time. > > Signed-off-by: Bruce Richardson > --- > doc/guides/nics/ice.rst | 15 +++++++++++++++ > drivers/net/ice/base/ice_ddp.c | 20 +++++++++++++++++--- > drivers/net/ice/base/ice_ddp.h | 4 ++-- > drivers/net/ice/ice_ethdev.c | 24 +++++++++++++++--------- > drivers/net/ice/ice_ethdev.h | 1 + > 5 files changed, 50 insertions(+), 14 deletions(-) > > @@ -2030,19 +2032,18 @@ static int > parse_bool(const char *key, const char *value, void *args) > { > int *i = (int *)args; > - char *end; > - int num; > > - num = strtoul(value, &end, 10); > - > - if (num != 0 && num != 1) { > - PMD_DRV_LOG(WARNING, "invalid value:\"%s\" for key:\"%s\", " > - "value must be 0 or 1", > + if (value == NULL || value[0] == '\0') { > + PMD_DRV_LOG(WARNING, "key:\"%s\", requires a value, which must be 0 or 1", key); > + return -1; > + } > + if (value[1] != '\0' || (value[0] != '0' && value[0] != '1')) { > + PMD_DRV_LOG(WARNING, "invalid value:\"%s\" for key:\"%s\", value must be 0 or 1", > value, key); > return -1; > } > > - *i = num; > + *i = value[0] - '0'; Ithinkthatinsteadof usingchararithmetic,it wouldbe better to: *i = !(value[0] == '0') > return 0; > } > > @@ -2307,6 +2308,10 @@ static int ice_parse_devargs(struct rte_eth_dev *dev) > if (ret) > goto bail; > > + ret = rte_kvargs_process(kvlist, ICE_DDP_LOAD_SCHED_ARG, > + &parse_bool, &ad->devargs.ddp_load_sched); > + if (ret) > + goto bail; > bail: > rte_kvargs_free(kvlist); > return ret; > @@ -7185,6 +7190,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice, > ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>" > ICE_DEFAULT_MAC_DISABLE "=<0|1>" > ICE_DDP_FILENAME_ARG "=" > + ICE_DDP_LOAD_SCHED_ARG "=<0|1>" > ICE_RX_LOW_LATENCY_ARG "=<0|1>"); > > RTE_LOG_REGISTER_SUFFIX(ice_logtype_init, init, NOTICE); > diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h > index 076cf595e8..2794a76096 100644 > --- a/drivers/net/ice/ice_ethdev.h > +++ b/drivers/net/ice/ice_ethdev.h > @@ -564,6 +564,7 @@ struct ice_devargs { > uint8_t proto_xtr[ICE_MAX_QUEUE_NUM]; > uint8_t pin_idx; > uint8_t pps_out_ena; > + uint8_t ddp_load_sched; > int xtr_field_offs; > uint8_t xtr_flag_offs[PROTO_XTR_MAX]; > /* Name of the field. */ -- Regards, Vladimir --------------5e15S4HH1xw0uKXo5S0vO7b0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi Bruce,

On 23/10/2024 17:55, Bruce Richardson wrote:
The DDP package file being loa=
ded at init time may contain an
alternative Tx Scheduler topology in it. Add driver option to load this
topology at init time.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/nics/ice.rst        | 15 +++++++++++++++
 drivers/net/ice/base/ice_ddp.c | 20 +++++++++++++++++---
 drivers/net/ice/base/ice_ddp.h |  4 ++--
 drivers/net/ice/ice_ethdev.c   | 24 +++++++++++++++---------
 drivers/net/ice/ice_ethdev.h   |  1 +
 5 files changed, 50 insertions(+), 14 deletions(-)

<snip>
@@ -2030,19 +2032,18 @@ static int
 parse_bool(const char *key, const char *value, void *args)
 {
 	int *i =3D (int *)args;
-	char *end;
-	int num;
=20
-	num =3D strtoul(value, &end, 10);
-
-	if (num !=3D 0 && num !=3D 1) {
-		PMD_DRV_LOG(WARNING, "invalid value:\"%s\" for key:\"=
;%s\", "
-			"value must be 0 or 1",
+	if (value =3D=3D NULL || value[0] =3D=3D '\0') {
+		PMD_DRV_LOG(WARNING, "key:\"%s\", requires a value, which=
 must be 0 or 1", key);
+		return -1;
+	}
+	if (value[1] !=3D '\0' || (value[0] !=3D '0' && value[0] !=3D '1'=
)) {
+		PMD_DRV_LOG(WARNING, "invalid value:\"%s\" for key:\"=
;%s\", value must be 0 or 1",
 			value, key);
 		return -1;
 	}
=20
-	*i =3D num;
+	*i =3D value[0] - '0';

I think = that= instead of using char arithmetic, it would be better to:

*i =3D !(value[0] =3D=3D '0')

 	return 0;
 }
=20
@@ -2307,6 +2308,10 @@ static int ice_parse_devargs(struct rte_eth_dev *dev=
)
 	if (ret)
 		goto bail;
=20
+	ret =3D rte_kvargs_process(kvlist, ICE_DDP_LOAD_SCHED_ARG,
+				 &parse_bool, &ad->devargs.ddp_load_sched);
+	if (ret)
+		goto bail;
 bail:
 	rte_kvargs_free(kvlist);
 	return ret;
@@ -7185,6 +7190,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ice,
 			      ICE_SAFE_MODE_SUPPORT_ARG "=3D<0|1>"
 			      ICE_DEFAULT_MAC_DISABLE "=3D<0|1>"
 			      ICE_DDP_FILENAME_ARG "=3D</path/to/file>"
+			      ICE_DDP_LOAD_SCHED_ARG "=3D<0|1>"
 			      ICE_RX_LOW_LATENCY_ARG "=3D<0|1>");
=20
 RTE_LOG_REGISTER_SUFFIX(ice_logtype_init, init, NOTICE);
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 076cf595e8..2794a76096 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -564,6 +564,7 @@ struct ice_devargs {
 	uint8_t proto_xtr[ICE_MAX_QUEUE_NUM];
 	uint8_t pin_idx;
 	uint8_t pps_out_ena;
+	uint8_t ddp_load_sched;
 	int xtr_field_offs;
 	uint8_t xtr_flag_offs[PROTO_XTR_MAX];
 	/* Name of the field. */
--=20
Regards,
Vladimir
--------------5e15S4HH1xw0uKXo5S0vO7b0--