From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id A59552A66 for ; Thu, 3 May 2018 13:06:25 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id 94-v6so15820145wrf.5 for ; Thu, 03 May 2018 04:06:25 -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=5yNukhfG0j9/6qaY7TqGMaDZgz5d4JZ1w45poGu3z58=; b=kjizOmYJDuWPmMkcebmbrT2L4SiHk7ted+PfTioEXZoMmPKP6YcjgYHc3AIOXbkOR0 HKKyDpFHKeFQtovg4nhKL3IvoRvWOf/rWu7m/F2+M0K6G4GtvheDTJK7Q8tWjVSCQ4Pi /x6cD98CBQ6cajWq9a64YDZGi+HOPjm0P/QUrw37pU7N0n6vVi3/ClNARU26MTGFyXy2 V2VICgLEOCNQk+u/j5n5lc1hctIsUtYMUtplOf77qRul4oJN870wjVZZUPUdLHdvxnQT dxjWjG/MaKyhz88tZYzU2uPWlM3qhz2+XtWXtY9+zI81KXmcIkWMJzwJcRgWd1SdgNCD kN5A== 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=5yNukhfG0j9/6qaY7TqGMaDZgz5d4JZ1w45poGu3z58=; b=lbRa6pXnfX+DrunbmB4lmWMhzGkICsxZIIh6GHaVa7FWXh2ClwT7XMloycRiX8p5Bo R0JAsMZsd5FwLvllnGsNRCBdRFmKWCrmYQyfnT+JTFJn7C1rKvqgZofl7u/+1NIr3O3l 9IhDyhu2qgF9Kj4ZPo+CvkeJ40C+zmG/Hy4Fo1HWNC2p5mfN6jV83ClitYLkA/cDvCOt 3RYfwykHhJ8P1aMWdDZ+TTLq7fO8l3M8T+0bL8vAMACXJGt6lNiWHFm36agCc+u1AXdn l1qU+n4u90yX5JJkpluSbk5VE9WaDasP9OrRJTnkorummSfcK0anrXvmSHWJkq5Ml9b5 u6/A== X-Gm-Message-State: ALQs6tA7CPW4ArxRxsA5VBXwP8WPDEA/RhcuBzzz7m51yYmkd2TCEnev 5pK15ajh7eXE8yZMG1QDfYk= X-Google-Smtp-Source: AB8JxZpdhihwutg7zF+WNs16Vq1NNFm34ghRgIdOgsHr/3ec/iGSaP+SIB5H1Gyh0NeQGSuE3r9NSg== X-Received: by 2002:adf:adf0:: with SMTP id w103-v6mr19030820wrc.101.1525345585359; Thu, 03 May 2018 04:06:25 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id y68-v6sm18090989wrb.91.2018.05.03.04.06.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 May 2018 04:06:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Adrien Mazarguil Cc: Nelio Laranjeiro , dpdk stable Date: Thu, 3 May 2018 12:06:08 +0100 Message-Id: <20180503110612.12146-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430145402.23057-42-luca.boccassi@gmail.com> References: <20180430145402.23057-42-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx5: fix flow director 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: Thu, 03 May 2018 11:06:25 -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/04/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 709766e104fcc53a094927cf8f964418893afa25 Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Thu, 26 Apr 2018 18:17:46 +0200 Subject: [PATCH] net/mlx5: fix flow director rule deletion crash [ upstream commit 6f2f4948b23643d279f38d38f988b122f393270f ] Flow director rules matching traffic properties above layer 2 do not target a fixed hash Rx queue (HASH_RXQ_ETH), it actually depends on the highest protocol layer specified by each flow rule. mlx5_fdir_filter_delete() makes this wrong assumption and causes a crash when attempting to destroy flow rules with L3/L4 specifications. Fixes: 4c3e9bcdd52e ("net/mlx5: support flow director") Signed-off-by: Adrien Mazarguil Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_flow.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 8a5565b30..42dde1cbf 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -2860,13 +2860,13 @@ priv_fdir_filter_delete(struct priv *priv, if (parser.drop) { struct ibv_flow_spec_action_drop *drop; - drop = (void *)((uintptr_t)parser.queue[HASH_RXQ_ETH].ibv_attr + - parser.queue[HASH_RXQ_ETH].offset); + drop = (void *)((uintptr_t)parser.queue[parser.layer].ibv_attr + + parser.queue[parser.layer].offset); *drop = (struct ibv_flow_spec_action_drop){ .type = IBV_FLOW_SPEC_ACTION_DROP, .size = sizeof(struct ibv_flow_spec_action_drop), }; - parser.queue[HASH_RXQ_ETH].ibv_attr->num_of_specs++; + parser.queue[parser.layer].ibv_attr->num_of_specs++; } TAILQ_FOREACH(flow, &priv->flows, next) { struct ibv_flow_attr *attr; @@ -2877,8 +2877,8 @@ priv_fdir_filter_delete(struct priv *priv, void *flow_spec; unsigned int specs_n; - attr = parser.queue[HASH_RXQ_ETH].ibv_attr; - flow_attr = flow->frxq[HASH_RXQ_ETH].ibv_attr; + attr = parser.queue[parser.layer].ibv_attr; + flow_attr = flow->frxq[parser.layer].ibv_attr; /* Compare first the attributes. */ if (memcmp(attr, flow_attr, sizeof(struct ibv_flow_attr))) continue; -- 2.14.2