From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id C06A128F3 for ; Wed, 23 May 2018 14:10:17 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id a8-v6so8297300wmg.5 for ; Wed, 23 May 2018 05:10:17 -0700 (PDT) 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; bh=VSU62f+XROCIbWHPMluhFJixZp1q/hbV82VVFcZod+Q=; b=Bxj8XqdvmNrPbkMSHA/on3oSJch15d9rCWRbnNHCv5Rp+1QHfLBQ6zYZ/L3jGj+AdB oNr73cqt/B6FLZV0i37qEM/kqceU9M6Xv7v2a47zg6Fgzc6iQPzYiAu9v1xG0FvtdWU7 eDzTZtQ3HRIjHc3ikUmjtzIpCLNX6wuBR346nyT4lljB2au35Ue3e45L0JsfMEW1Gf6j G8SVuQ/DeRdIh0hEfME3Fhre1qK067yQYTN/ZutPI8vnX4Wdg7I/vZtNWI6PLxhPDx3V xWxER9ztib4q5DflCt+tk4oSQp8wDnOynGerU++TdcatEz/KjLVU1tw5aYYn6DWSec3V 0XIA== 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; bh=VSU62f+XROCIbWHPMluhFJixZp1q/hbV82VVFcZod+Q=; b=oaMb79hC5KEqG6uw/6ZU5r0mATZNaZBCzbauuqu10J5ZGIPuOMyga0xsA0wS9pBXxx OgTmxcheE6sDnHBSnHSO6A8XGp8DvTd1KtDGHIELIg5hGAqFekMH6QkOD0Yob1MX348e zrhfWb6e0e+SKsJRvtCwczv1LiPXJox2aWHo5kdbMjzLcFqlviUIkFqPqDDbh9/QDuFn sZPXXUZphLM4OnoYFSV5Lz1ur7mBEmLx0x2gWwr6e9YEP53HIn9bcUG0zrrRFSw8NRyN 8l0lF6Uc+Qh1K+Ucio1q506FfC8nfVDN06bOjHXfMT8baV6AloXq/ZIKO/7qtaz8T9qR d/ew== X-Gm-Message-State: ALKqPwdwFGpe4SOhwyUGDvBCwRwt+mpbvSEYzCLFIgxmr6KmE4BuSto3 7Oiqzq1JZIkcVOGTZ97ts4xbY6Y2 X-Google-Smtp-Source: AB8JxZo8oc6Zupt/ph+Ib7N9cimsna1U6UHooTYpBXcCRLjAWZrM99Tzhpp/cJic9FJsSmUhENZriw== X-Received: by 2002:a1c:71dc:: with SMTP id d89-v6mr3911900wmi.26.1527077417395; Wed, 23 May 2018 05:10:17 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id m134-v6sm2800280wmg.13.2018.05.23.05.10.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:16 -0700 (PDT) From: luca.boccassi@gmail.com To: Shahaf Shuler Cc: Adrien Mazarguil , dpdk stable Date: Wed, 23 May 2018 13:09:12 +0100 Message-Id: <20180523121010.8385-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180516101323.2234-2-luca.boccassi@gmail.com> References: <20180516101323.2234-2-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx5: fix flow director drop rule deletion crash' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Wed, 23 May 2018 12:10:17 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/25/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 6d97987003e3934445bce722060502251415b0df Mon Sep 17 00:00:00 2001 From: Shahaf Shuler Date: Tue, 15 May 2018 09:26:35 +0300 Subject: [PATCH] net/mlx5: fix flow director drop rule deletion crash [ upstream commit 8fe576ad17a6f091c100dc1c61c11c5fb857f864 ] Drop flow rules are created on the ETH queue even though the parser layer matches the flow rule layer (L3/L4) Fixes: 6f2f4948b236 ("net/mlx5: fix flow director rule deletion crash") Signed-off-by: Shahaf Shuler Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_flow.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index b40c3cac7..f48b68945 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2854,13 +2854,13 @@ mlx5_fdir_filter_delete(struct rte_eth_dev *dev, if (parser.drop) { struct ibv_flow_spec_action_drop *drop; - drop = (void *)((uintptr_t)parser.queue[parser.layer].ibv_attr + - parser.queue[parser.layer].offset); + drop = (void *)((uintptr_t)parser.queue[HASH_RXQ_ETH].ibv_attr + + parser.queue[HASH_RXQ_ETH].offset); *drop = (struct ibv_flow_spec_action_drop){ .type = IBV_FLOW_SPEC_ACTION_DROP, .size = sizeof(struct ibv_flow_spec_action_drop), }; - parser.queue[parser.layer].ibv_attr->num_of_specs++; + parser.queue[HASH_RXQ_ETH].ibv_attr->num_of_specs++; } TAILQ_FOREACH(flow, &priv->flows, next) { struct ibv_flow_attr *attr; @@ -2870,11 +2870,14 @@ mlx5_fdir_filter_delete(struct rte_eth_dev *dev, struct ibv_spec_header *flow_h; void *flow_spec; unsigned int specs_n; + unsigned int queue_id = parser.drop ? HASH_RXQ_ETH : + parser.layer; - attr = parser.queue[parser.layer].ibv_attr; - flow_attr = flow->frxq[parser.layer].ibv_attr; + attr = parser.queue[queue_id].ibv_attr; + flow_attr = flow->frxq[queue_id].ibv_attr; /* Compare first the attributes. */ - if (memcmp(attr, flow_attr, sizeof(struct ibv_flow_attr))) + if (!flow_attr || + memcmp(attr, flow_attr, sizeof(struct ibv_flow_attr))) continue; if (attr->num_of_specs == 0) continue; -- 2.14.2