From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 4FFB71B884 for ; Tue, 15 May 2018 15:48:57 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id q3-v6so221639wrj.6 for ; Tue, 15 May 2018 06:48:57 -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=rbZlaMFqM2TOnyrq9XVxIw0arA6XCdNcTINI4ZurhL0=; b=G219WtAbg2i9vilKp8K/xlvBnRfdq42fZDe/tyd/gCaU0Uvm6NrVBR+8vDN8oOtA40 qhB/PbyIUCBdlP74GbGZ02fMBVGgLJV+HSctz/xQRChWWVowrzFcCvWR07sifPeHdmPY Za2cqRmZ15QYasxOcCHsu7IX3bqp7G7zchttKjkU5LNRCZieHfabD9y9GKzYjfW2Db9D bEmGV5nZURXhxvyDE8vMYZhhMUycs0vhjXNyeg2uK7vaEyLLa8g34Jl74DlrU/iMpl8c iFTchru8CC5ocQGhPKY4nWk8dTiSfcAV7XUHT5cOIdHjp2yAzY8+O5iNMK6uXFl3yKXo 70oQ== 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=rbZlaMFqM2TOnyrq9XVxIw0arA6XCdNcTINI4ZurhL0=; b=D8wzBb7UOShF63RlETSShiapLEQ0wiOrksfO0GVvH3HGSVpWMn8594A5svRwST9m6T xp8vLEJMrURymZBVDVK396qlPlka9JmmP7CabFUmUsi010eLjhsKNC9odJ/nmkzH4iyp /+TfWgckj08niUzaHksDZUA/eJcaxzhHMm0k/2Sg4OuXsGqmaj1wVzkKxKQwZmGKgGyD rjkk9Tt4tJAaZE+iHiygNP1vKW6j2T6cV7GkYIUKFvQotYhd4+M26OzJDn2h2GhhbXV4 TJ5yHQj0+wHHKE0fUtOsV6oCud5+3DMR43ahWW+BCTq4AX8kMnU01G/3HCVIWLt/qkgh +N1g== X-Gm-Message-State: ALKqPwf0TD1SVtddITib00Tqfc3A5Hmg+TUk6b/M1VlWQ7tXGcQhOPOQ 8urJ/Q9KwXOlUlYlvIorU0j77U7MueI= X-Google-Smtp-Source: AB8JxZq7pXM+1QxESm4ysZnXwhAgb/RJRlCWUMhZFZV8FVfETkJLqlYTv6T5gZka5e9zSnFaio7xvg== X-Received: by 2002:adf:d0cb:: with SMTP id z11-v6mr9709769wrh.281.1526392137039; Tue, 15 May 2018 06:48:57 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id 109-v6sm132078wra.32.2018.05.15.06.48.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:48:56 -0700 (PDT) From: luca.boccassi@gmail.com To: Adrien Mazarguil Cc: dpdk stable Date: Tue, 15 May 2018 14:46:56 +0100 Message-Id: <20180515134731.9337-45-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx4: fix UDP flow rule limitation enforcement' 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: Tue, 15 May 2018 13:48:57 -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/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 7a15b4bbf85842f4e0a68d89b290a89317591d4e Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Fri, 4 May 2018 17:17:44 +0200 Subject: [PATCH] net/mlx4: fix UDP flow rule limitation enforcement [ upstream commit bf959ec58b5d9127f187e98de6d2d0976c111360 ] For some unknown reason, priorities do not have any effect on flow rules that happen to match UDP destination ports. Those are always matched first regardless. This patch is a workaround that enforces this limitation at the PMD level; such flow rules can only be created at the highest priority level for correctness. Fixes: a5171594fc3b ("net/mlx4: expose support for flow rule priorities") Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4_flow.c | 9 +++++++++ drivers/net/mlx4/mlx4_flow.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index d7a02e90c..4b22b0634 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -357,6 +357,9 @@ error: * Additional mlx4-specific constraints on supported fields: * * - No support for partial masks. + * - Due to HW/FW limitation, flow rule priority is not taken into account + * when matching UDP destination ports, doing is therefore only supported + * at the highest priority level (0). * * @param[in, out] flow * Flow rule handle to update. @@ -388,6 +391,11 @@ mlx4_flow_merge_udp(struct rte_flow *flow, msg = "mlx4 does not support matching partial UDP fields"; goto error; } + if (mask && mask->hdr.dst_port && flow->priority) { + msg = "combining UDP destination port matching with a nonzero" + " priority level is not supported"; + goto error; + } if (!flow->ibv_attr) return 0; ++flow->ibv_attr->num_of_specs; @@ -652,6 +660,7 @@ mlx4_flow_prepare(struct priv *priv, NULL, "only ingress is supported"); fill: proc = mlx4_flow_proc_item_list; + flow->priority = attr->priority; /* Go over pattern. */ for (item = pattern; item->type; ++item) { const struct mlx4_flow_proc_item *next = NULL; diff --git a/drivers/net/mlx4/mlx4_flow.h b/drivers/net/mlx4/mlx4_flow.h index 00188a65c..4eba34868 100644 --- a/drivers/net/mlx4/mlx4_flow.h +++ b/drivers/net/mlx4/mlx4_flow.h @@ -42,6 +42,7 @@ struct rte_flow { uint32_t promisc:1; /**< This rule matches everything. */ uint32_t allmulti:1; /**< This rule matches all multicast traffic. */ uint32_t drop:1; /**< This rule drops packets. */ + uint32_t priority; /**< Flow rule priority. */ struct mlx4_rss *rss; /**< Rx target. */ }; -- 2.14.2