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 50EA245849 for ; Thu, 22 Aug 2024 18:14:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4154842F07; Thu, 22 Aug 2024 18:14:49 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 1F78542E52; Thu, 22 Aug 2024 18:14:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724343287; x=1755879287; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=QHPM1r+u3uN6jgTAaWq+Qn8vTdRHCN8vud+4XKkjLXA=; b=eJFtv6rXom5hD/tYihb9AM7UD7sPAfIOvPsnegCN2iO3k0mbPBvgLEij tcBYDB5ppiu4wKq4nBuCcwbi8EuYD2iWaUQWQma423LiH9ilmbGak2X1R Vwl9xhZmtNXRh2ezPtIXlOWF1GSeFPwCXMcDqROsdvYut5Res8/YfbyKQ +I6Jxa0p1jMnt6tT9ojYbf+7vEOXoVETt082GrYRgvLqBgL1sXAkeWsHH iv25l2n1vyfJOg7DLg87dPClQWPQWHe4pFDunSvENNQ3UAmL9OKfXK99s 2KGDEv3bjdAd+HDdfQgon1KF2DrFIj25KaCKOL6KEFL2rhZ/hD4nkCIpj g==; X-CSE-ConnectionGUID: HeFIY7C7SlSvrrX7b1h6Kw== X-CSE-MsgGUID: oPM6VVl5RKqeOsJ7WYqmzA== X-IronPort-AV: E=McAfee;i="6700,10204,11172"; a="40237165" X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="40237165" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2024 09:14:43 -0700 X-CSE-ConnectionGUID: 9kpCcIcvRpq69uA7/RgAXA== X-CSE-MsgGUID: oRbEPJ2oRBaJn1BE9WM2oA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="66425203" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Aug 2024 09:14:43 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 22 Aug 2024 09:14:41 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 22 Aug 2024 09:14:41 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 22 Aug 2024 09:14:41 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) 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.2507.39; Thu, 22 Aug 2024 09:14:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oOpzk8cmKyacB1moQubj4QXn/+l44nvShkAd5htgGiba0lnNhe/M9SpgPg2lenjdEeuJ0G4eTP12MP24hAjAXtwDWpFqdqAbfFRNOUx2E8R+CgL6Nr4TX8ifeKuw7FmoeaKhMzNqnzNkLALa8zv7TAKehcQjy8sj6vF0dbDVRKhpDvM5q0SHkkJkVEoRVxWR3HLtN98NkmllZAZjxXt99EvcR1nfzaB4DBkxgk6n5zqDQw9E8QvVO/g6txpq7owLYDkSNlRuuxQntYH79ZsprOTQYQQ09rwJGnL4TNTBIHumKyE8ujsGQrp0rAmWTmjbo/IG/u6EGOLIYEeaZNVUlg== 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=lyKtdT48mnc4+HZB7KlkzcJO63vJ/Vy05Zzbb1eyceg=; b=Zs1DPVHBNVMrvbJQVpKP+BFEr3VWy7LvM6KoRvCcGhg2lkh0yojGO7Vz0rMfy04HmSsXg6Th1PAAP8efJYEDy0XTGtHZRpx4Ee1DkkxNJK3Mq4IOfNxtn6/JdxEMqinjRpW4HRKdN3pvJ848e86d64cyiOCqr+rEfA9sr25Cu4Kd2qq2LpQRd2Rv5IkDzFOeSxdE37w4QgMjmj2f2uhWtNCr10IZBnJEz/hnzlQ/WLONnpdcbC+ZaV35iDtY6A5LB1IWEPzU0O/k2/AYQ8HMDQfIER4JvFNVy71VcR/LQajGKVoOgtnUliqjWDdhTFSMNeFxseMeOfmijDTr+sx+2w== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CH3PR11MB7820.namprd11.prod.outlook.com (2603:10b6:610:120::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Thu, 22 Aug 2024 16:14:33 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%2]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 16:14:33 +0000 Date: Thu, 22 Aug 2024 17:14:29 +0100 From: Bruce Richardson To: Praveen Shetty CC: , Subject: Re: [PATCH v1] net/cpfl: fix invalid action types Message-ID: References: <20240730114540.1048785-1-praveen.shetty@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240730114540.1048785-1-praveen.shetty@intel.com> X-ClientProxiedBy: DUZP191CA0013.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::10) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CH3PR11MB7820:EE_ X-MS-Office365-Filtering-Correlation-Id: 0fc8400e-6be8-4660-485b-08dcc2c58293 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IdIUyMi9C/2nwXU/QTQt+WESd7DmPFq57rwS9MrupjtyGwUmz2R9AerJl/Lt?= =?us-ascii?Q?amH7aAkgz3MSkfk+cuzpLzeLCjonU9L2pwrPxN9E1m4Y1flH/yANDyZWrjHf?= =?us-ascii?Q?GwimpZwGt9uM7NU6rfgO7XxVzOm4TGMkVbaA9hw0YO3ObEJBieYbtQKpK05+?= =?us-ascii?Q?ksgfOZDsKrqOlxuprFSYk4udu+Z0g5iJLvMnyIkG40HFTy30LDR1B0FFAxGc?= =?us-ascii?Q?p53hl/P8bJbEGPkNcayyEzWDDlVnvTOyQi797w8Vy7jREHRTjLZ8Z6+E35N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4jdOKInquyaSeO+nFpggoDFWXxfYboCj/Q407NQXAPR?= =?us-ascii?Q?Abt+Msq9WOpFqInHpLgq+QraHyicBjhIA3kHhm3kFepWlrscy5kEzi+LG7Cc?= =?us-ascii?Q?LkH9XRw80V4Kp6tk2k7ht/eYM4/Z6/cbPWuuUHZILcI6cpNw5j6Jz+B0RJKv?= =?us-ascii?Q?UX3XJFsm5+bH+HD1Hlax8wUYm3Fyk5nJ4oyWO1FuCZKY5Q=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?XE9W18X39IlB0swd4lHrUvfqAfdZjGFO9Qruad8HrnOcNU99UjNThfo+ZDdN?= =?us-ascii?Q?zxWsQ7h33szzdUELHNkOFE5OwzOkf2aUGAG+diIyYBJHRRrFG3qfBUi1MroN?= =?us-ascii?Q?Zoak9wHLvcfyIRW00fSW5hp2nTEIWIh1FLxJtSWrIWeplC2d6NfLSCfxApgH?= =?us-ascii?Q?bF2UT+U5djyY81CIO2T0OpFMRhdpHke3MYKWVkOFLzcUvuujysVeO9gPNgZA?= =?us-ascii?Q?DMuW08SKN7qQUebr9aHHcHQvBgHtTYK0gI/Ra5SSR5/AvT0HBXj71WLS31gT?= =?us-ascii?Q?gcTvhvg5FXn/V9dr30wuqSg0/NTGSF00cs+VPK8pUj+e2S9emUSrlZaGipxO?= =?us-ascii?Q?SB7WOWAx+07qiT7z+Umjs6DGfJe5Xft/UNhvPNZb/k/aRrI4jmFvKoNKNZJj?= =?us-ascii?Q?nH6z7bl8RF05S/34gWRl65CZCohWjwyWaD32h0Go8N+jG2sv5h3f+la/soJv?= =?us-ascii?Q?fXxe5hi77a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cEB8jgTzN?= =?us-ascii?Q?QcIFnm+8hqcMnEjxQRSJnIKwO5WoiI6qVupayey+P/aHON65I+FoI9y3JV1l?= =?us-ascii?Q?kfxDHnsmErLzIsqDjuMJmewEPRnbXsToixArQKaCY3kNarl5U/qqajUT3V8T?= =?us-ascii?Q?pVNMw9hzmPmH75EOwZfcwXMim0Keniv0HMv/mtIynPnEQPPYxg34h0FUsEws?= =?us-ascii?Q?rCSnutPor2G+BI1LgkmeqidDCTWRdXw72F5NyN3R5ToCCyJd/IhPNIVUs0Yz?= =?us-ascii?Q?gg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0fc8400e-6be8-4660-485b-08dcc2c58293 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 16:14:33.7516 (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: vD/gGwtqTRXFkVPyIJr+nCt8lrY68HyOrdBZxqOnkUqv8j0suxrZ6GqHQ5sBHYTGM7Wn1W/+0GhGI8uS4ljOfteGffK0/oSICZKdArYceto= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7820 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, Jul 30, 2024 at 11:45:40AM +0000, Praveen Shetty wrote: > In case of CPFL PMD, port_representor action is used for > the local vport and represented_port action is used for > the remote port(remote port in this case is either the idpf > pf or the vf port that is being represeted by the cpfl pmd). > Any mismatch in either of the cases PMD will throw > an error. Just FYI, you don't need to wrap lines in the commit body at 60 characters. 72 is a more normal log width to use. Comment inline below. Will fix on apply. /Bruce > > Fixes: 441e777b85f1 ("net/cpfl: support represented port action") > Cc: stable@dpdk.org > > Signed-off-by: Praveen Shetty > --- > drivers/net/cpfl/cpfl_flow_engine_fxp.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/net/cpfl/cpfl_flow_engine_fxp.c b/drivers/net/cpfl/cpfl_flow_engine_fxp.c > index b9e825ef57..e760acd722 100644 > --- a/drivers/net/cpfl/cpfl_flow_engine_fxp.c > +++ b/drivers/net/cpfl/cpfl_flow_engine_fxp.c > @@ -292,6 +292,17 @@ cpfl_fxp_parse_action(struct cpfl_itf *itf, > > is_vsi = (action_type == RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR || > dst_itf->type == CPFL_ITF_TYPE_REPRESENTOR); > + /* Added checks to throw an error for the invalid action types. */ > + if (action_type == RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR && > + dst_itf->type == CPFL_ITF_TYPE_REPRESENTOR) { This indentation here is problematic, because by indenting by one tab, the continuation of the condition lines up with the actual body of the if statement. Two formats are allowed in DPDK to resolve this - either line up using spaces with the opening brace, or use two tabs to double-indent. The rule for which to use is to follow the convention already used in the file you are changing. > + PMD_DRV_LOG(ERR, "Cannot use port_representor action for the represented_port"); > + goto err; > + } > + if (action_type == RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT && > + dst_itf->type == CPFL_ITF_TYPE_VPORT) { > + PMD_DRV_LOG(ERR, "Cannot use represented_port action for the local vport"); > + goto err; > + } > if (is_vsi) > dev_id = cpfl_get_vsi_id(dst_itf); > else > -- > 2.34.1 >