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 401C6A055A for ; Thu, 27 Feb 2020 10:35:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 391E21C01; Thu, 27 Feb 2020 10:35:32 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by dpdk.org (Postfix) with ESMTP id B31231BFF9 for ; Thu, 27 Feb 2020 10:35:29 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id c13so2384419wrq.10 for ; Thu, 27 Feb 2020 01:35:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=apiC/BlUFNU7tWB4appGWghf4stZstH0soneEcaOCxo=; b=axqKv5Zf+yNsYiy3npuw74RLOKURfKxmRpS+PkVzBo1ECeh9QL2iJsT6XawW8V3Lru AANn4SHusDmskCzkzvUg6ZSfyv3f71HRTuErO+TlOdeR4p0m1Byt9BPRsWW1TTdFQiKN 0Ni3U+nQMc/cBhlzDGr5ymBGCkUOQcOY5yjhU0wXkXLMVCb7/YWu1eeVJApt4Htv2iXr CrkP0ABxfboxM6CTGl3R1hkB8kuleKagD3NgLfsF13cf+P6/kO7FFNz5kJO1Nnfq+rvs 8+c4cOfdhTHZfid9MJqsJ/BZ4JcMB7sv28Ux1WLEqk/+SyCUkn4PHQCVZxFqvloy4037 Kr/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=apiC/BlUFNU7tWB4appGWghf4stZstH0soneEcaOCxo=; b=TANtVAn1Vfyky76NYKRR8rn2h1fMDgWj0veYpBuC77DWBDYc/bnRQBbeTwEfc6gXKw sFe/w6oYpxRjk3oCK52zPSD0L7KKtGRzVyNlROFwPdTDkKi8psFVE7Rb7oeCrBYZDd/4 BxH71UTL4CRhvOXDWbjomXEM2YldcGCdiDxK4cAh3OV5+3dxU7HlmCYYTpBYqSRe8kJH RP7HhLIya9aaFLpLNtqsXWrOL22TTrVFIzRRzQ16zckCBVsCJEzguDXxZkVVp9e8YjRg YvAd895U8aR66moEqAa69ccNSavhq8c7wmTGx1o+YRLlUMZX+h33q+1PrmebJo9h6sSA ieSA== X-Gm-Message-State: APjAAAWXN6cRVQswFvI/7oTc0fHZiHykKZgGSkOh6jr2Snpw7ThIlJW7 Nkb7gkoEXpi/Y0taxrGKOZI= X-Google-Smtp-Source: APXvYqy/fmumiETV7LPUAxpGJzyxcjsKHurrcgQhqD4z4bcsjkVQMRuLboP53aYzAcgJLI2D4A30Mg== X-Received: by 2002:adf:dfc7:: with SMTP id q7mr3638164wrn.45.1582796129441; Thu, 27 Feb 2020 01:35:29 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id w19sm6475295wmc.22.2020.02.27.01.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 01:35:28 -0800 (PST) From: luca.boccassi@gmail.com To: Luca Boccassi Cc: dpdk stable Date: Thu, 27 Feb 2020 09:33:52 +0000 Message-Id: <20200227093402.17690-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200227093402.17690-1-luca.boccassi@gmail.com> References: <20200217174546.25334-54-luca.boccassi@gmail.com> <20200227093402.17690-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'Revert "net/mlx5: fix layer type in header modify action"' has been queued to stable release 19.11.1 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" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/29/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From e6271258db3f512835bad2cfd5ae104556995bcc Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 26 Feb 2020 20:04:38 +0000 Subject: [PATCH] Revert "net/mlx5: fix layer type in header modify action" This reverts commit 063e7d176d1b39241b780b33a79ce47515e3a730. --- drivers/net/mlx5/mlx5_flow_dv.c | 68 ++++++--------------------------- 1 file changed, 11 insertions(+), 57 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 6d2e1318ba..aa65300d9c 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -82,55 +82,19 @@ union flow_dv_attr { * Pointer to item specification. * @param[out] attr * Pointer to flow attributes structure. - * @param[in] tunnel_decap - * Whether action is after tunnel decapsulation. */ static void -flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr, - bool tunnel_decap) +flow_dv_attr_init(const struct rte_flow_item *item, union flow_dv_attr *attr) { for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) { - uint8_t next_protocol = 0xff; - switch (item->type) { - case RTE_FLOW_ITEM_TYPE_GRE: - case RTE_FLOW_ITEM_TYPE_NVGRE: - case RTE_FLOW_ITEM_TYPE_VXLAN: - case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: - case RTE_FLOW_ITEM_TYPE_GENEVE: - case RTE_FLOW_ITEM_TYPE_MPLS: - if (tunnel_decap) - attr->attr = 0; - break; case RTE_FLOW_ITEM_TYPE_IPV4: if (!attr->ipv6) attr->ipv4 = 1; - if (item->mask != NULL && - ((const struct rte_flow_item_ipv4 *) - item->mask)->hdr.next_proto_id) - next_protocol = - ((const struct rte_flow_item_ipv4 *) - (item->spec))->hdr.next_proto_id & - ((const struct rte_flow_item_ipv4 *) - (item->mask))->hdr.next_proto_id; - if ((next_protocol == IPPROTO_IPIP || - next_protocol == IPPROTO_IPV6) && tunnel_decap) - attr->attr = 0; break; case RTE_FLOW_ITEM_TYPE_IPV6: if (!attr->ipv4) attr->ipv6 = 1; - if (item->mask != NULL && - ((const struct rte_flow_item_ipv6 *) - item->mask)->hdr.proto) - next_protocol = - ((const struct rte_flow_item_ipv6 *) - (item->spec))->hdr.proto & - ((const struct rte_flow_item_ipv6 *) - (item->mask))->hdr.proto; - if ((next_protocol == IPPROTO_IPIP || - next_protocol == IPPROTO_IPV6) && tunnel_decap) - attr->attr = 0; break; case RTE_FLOW_ITEM_TYPE_UDP: if (!attr->tcp) @@ -635,8 +599,6 @@ flow_dv_convert_action_modify_vlan_vid * Pointer to rte_flow_item objects list. * @param[in] attr * Pointer to flow attributes structure. - * @param[in] tunnel_decap - * Whether action is after tunnel decapsulation. * @param[out] error * Pointer to the error structure. * @@ -648,7 +610,7 @@ flow_dv_convert_action_modify_tp (struct mlx5_flow_dv_modify_hdr_resource *resource, const struct rte_flow_action *action, const struct rte_flow_item *items, - union flow_dv_attr *attr, bool tunnel_decap, + union flow_dv_attr *attr, struct rte_flow_error *error) { const struct rte_flow_action_set_tp *conf = @@ -661,7 +623,7 @@ flow_dv_convert_action_modify_tp struct field_modify_info *field; if (!attr->valid) - flow_dv_attr_init(items, attr, tunnel_decap); + flow_dv_attr_init(items, attr); if (attr->udp) { memset(&udp, 0, sizeof(udp)); memset(&udp_mask, 0, sizeof(udp_mask)); @@ -711,8 +673,6 @@ flow_dv_convert_action_modify_tp * Pointer to rte_flow_item objects list. * @param[in] attr * Pointer to flow attributes structure. - * @param[in] tunnel_decap - * Whether action is after tunnel decapsulation. * @param[out] error * Pointer to the error structure. * @@ -724,7 +684,7 @@ flow_dv_convert_action_modify_ttl (struct mlx5_flow_dv_modify_hdr_resource *resource, const struct rte_flow_action *action, const struct rte_flow_item *items, - union flow_dv_attr *attr, bool tunnel_decap, + union flow_dv_attr *attr, struct rte_flow_error *error) { const struct rte_flow_action_set_ttl *conf = @@ -737,7 +697,7 @@ flow_dv_convert_action_modify_ttl struct field_modify_info *field; if (!attr->valid) - flow_dv_attr_init(items, attr, tunnel_decap); + flow_dv_attr_init(items, attr); if (attr->ipv4) { memset(&ipv4, 0, sizeof(ipv4)); memset(&ipv4_mask, 0, sizeof(ipv4_mask)); @@ -773,8 +733,6 @@ flow_dv_convert_action_modify_ttl * Pointer to rte_flow_item objects list. * @param[in] attr * Pointer to flow attributes structure. - * @param[in] tunnel_decap - * Whether action is after tunnel decapsulation. * @param[out] error * Pointer to the error structure. * @@ -785,7 +743,7 @@ static int flow_dv_convert_action_modify_dec_ttl (struct mlx5_flow_dv_modify_hdr_resource *resource, const struct rte_flow_item *items, - union flow_dv_attr *attr, bool tunnel_decap, + union flow_dv_attr *attr, struct rte_flow_error *error) { struct rte_flow_item item; @@ -796,7 +754,7 @@ flow_dv_convert_action_modify_dec_ttl struct field_modify_info *field; if (!attr->valid) - flow_dv_attr_init(items, attr, tunnel_decap); + flow_dv_attr_init(items, attr); if (attr->ipv4) { memset(&ipv4, 0, sizeof(ipv4)); memset(&ipv4_mask, 0, sizeof(ipv4_mask)); @@ -7196,8 +7154,7 @@ cnt_err: case RTE_FLOW_ACTION_TYPE_SET_TP_DST: if (flow_dv_convert_action_modify_tp (mhdr_res, actions, items, - &flow_attr, !!(action_flags & - MLX5_FLOW_ACTION_DECAP), error)) + &flow_attr, error)) return -rte_errno; action_flags |= actions->type == RTE_FLOW_ACTION_TYPE_SET_TP_SRC ? @@ -7206,17 +7163,14 @@ cnt_err: break; case RTE_FLOW_ACTION_TYPE_DEC_TTL: if (flow_dv_convert_action_modify_dec_ttl - (mhdr_res, items, &flow_attr, - !!(action_flags & - MLX5_FLOW_ACTION_DECAP), error)) + (mhdr_res, items, &flow_attr, error)) return -rte_errno; action_flags |= MLX5_FLOW_ACTION_DEC_TTL; break; case RTE_FLOW_ACTION_TYPE_SET_TTL: if (flow_dv_convert_action_modify_ttl - (mhdr_res, actions, items, &flow_attr, - !!(action_flags & - MLX5_FLOW_ACTION_DECAP), error)) + (mhdr_res, actions, items, + &flow_attr, error)) return -rte_errno; action_flags |= MLX5_FLOW_ACTION_SET_TTL; break; -- 2.20.1