From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A770A0526 for ; Fri, 6 Nov 2020 12:35:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5270B69A4; Fri, 6 Nov 2020 12:35:06 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D18995F13; Fri, 6 Nov 2020 12:35:01 +0100 (CET) IronPort-SDR: kl6fKCtv8ZNaC+f8SE9QOuVQjEjNAf8xFRLiH+RrMj6ZnybLFO+MwY1qSSbLwXz9QaKENKXMYn d5ibgTkqAqjQ== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="157314814" X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="157314814" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 03:34:59 -0800 IronPort-SDR: BfvdI53TvQVm72lKk2w4rvTm/Q8UIlukahzaHvkGfe8zxuu4PwOX3CTsYRtfWfaJr/3DigSTgP QkUzw+J60qRw== X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="539810279" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.228.45]) ([10.213.228.45]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 03:34:57 -0800 To: Bing Zhao , viacheslavo@nvidia.com, matan@nvidia.com Cc: dev@dpdk.org, orika@nvidia.com, rasland@nvidia.com, stable@dpdk.org References: <1604382154-336373-1-git-send-email-bingz@nvidia.com> From: Ferruh Yigit Message-ID: Date: Fri, 6 Nov 2020 11:34:54 +0000 MIME-Version: 1.0 In-Reply-To: <1604382154-336373-1-git-send-email-bingz@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix eCPRI previous layer checking X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" On 11/3/2020 5:42 AM, Bing Zhao wrote: > Based on the specification, eCPRI can only follow ETH (VLAN) layer > or UDP layer. When creating a flow with eCPRI item, this should be > checked and invalid layout of the layers should be rejected. > > Fixes: c7eca23657b7 ("net/mlx5: add flow validation of eCPRI header") > > Cc: stable@dpdk.org > > Signed-off-by: Bing Zhao > Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow.c | 29 ++++++++++++++++++----------- > 1 file changed, 18 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index a6e60af..11dba3b 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -2896,17 +2896,23 @@ struct mlx5_flow_tunnel_info { > MLX5_FLOW_LAYER_OUTER_VLAN); > struct rte_flow_item_ecpri mask_lo; > > + if (!(last_item & outer_l2_vlan) && > + last_item != MLX5_FLOW_LAYER_OUTER_L4_UDP) > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, item, > + "eCPRI can only follow L2/VLAN layer" > + " or UDP layer."); > if ((last_item & outer_l2_vlan) && ether_type && > ether_type != RTE_ETHER_TYPE_ECPRI) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, item, > - "eCPRI cannot follow L2/VLAN layer " > - "which ether type is not 0xAEFE."); > + "eCPRI cannot follow L2/VLAN layer" > + " which ether type is not 0xAEFE."); > if (item_flags & MLX5_FLOW_LAYER_TUNNEL) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ITEM, item, > - "eCPRI with tunnel is not supported " > - "right now."); > + "eCPRI with tunnel is not supported" > + " right now."); Why these changes done, it only moves space from end of first line to beginning of the second line? Overall I think no need to break the log strings, keeping them intact helps users search the error message in the code. I assume the break is because of the 80 chars limit but for log strings we don't have that limit, unless it is too long (lets say 120 chars as thumb of rule, there is no official convention) I think better to not break. What do you think remove the whitespace changes out of this commit and make another patch to merge the log strings?