From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 7B21F4F98 for ; Mon, 6 Aug 2018 16:26:00 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id u12-v6so12576966wrr.4 for ; Mon, 06 Aug 2018 07:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=FcnZcNeLTFjOfGVVsLaVcoJnaC/HklJnZJRgqUae1LE=; b=YxY1R9QEfkMoixeVjLKJQoAR2gUgKJ40INkNJr5TR7zz/5JjbbBnOKgvXR/hobUTHh +xzga40RJkFa66cMOvXinvqsQkXzj76MceFzruJfXNIr6xGD5ShKhlAsEIeBoVG9DkIx +awxWKZZcE2tq0gWMLqK1nBe1lq3/KTL5FsYwuWKJO22GqZ9tpmV7fnKOtW5XjtdTkIl 8NLABVY4/y7xWoLpU3gKSXzE9vMiwSVuzYEaf9IYhc6H3G2e6C3F5Up/uo+RjaEy+DD9 OlSckiAl7pxlJruhwKNP1OH+x5cWUtnD8L9966I6GVHHquev5QBVoKwLGFcqbNbMG0CC G5Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=FcnZcNeLTFjOfGVVsLaVcoJnaC/HklJnZJRgqUae1LE=; b=kw3BaZh4wlHI+LjEJvzQ9aB/rsh3RKEQq8/xESTrCq0FaenK+bqvJHSj6lrBzZ97do 5KB6XSZpwpHjZfn8BVmghQtJOXUDgUGV0suOSYXKtrOi1WEUXC0bG+ThCnrQ0p5iy71B JjZYhVYIKLMH+nOBuhI/Ub3fulEY9fChwgVpckhYcFd10Hd1Rdpmz7YNBhDs3xIb/6/Y wE7TKBJGsbFYITL7NbAAdxiHsotaLmPoxfnAzOV+SsOoQv24zBCEpMmdJtklpLFs/d5t pgWbTHcxuq5pYi4HKlGhfBOJjfQz+cRiBaokN1TXvAHgf4JJf1l8Ak5zYRTlDGu1jQxg bmIg== X-Gm-Message-State: AOUpUlG5HaxBz0Axw7msfxoO0npGpZyp7cucVPbaXxmS3AKdQciWtQ0o mSDODV1EMK/OsxHtNFY9X58lHA== X-Google-Smtp-Source: AAOMgpf86559TIWJrHxjKeinHZ/q8UHd9feo04eE2asubET0ufZkMq7IGGyOzyMYTnRz37o4eyNl4w== X-Received: by 2002:adf:ffc7:: with SMTP id x7-v6mr10148378wrs.137.1533565560231; Mon, 06 Aug 2018 07:26:00 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 1-v6sm5749292wmf.47.2018.08.06.07.25.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 07:25:59 -0700 (PDT) Date: Mon, 6 Aug 2018 16:25:42 +0200 From: Adrien Mazarguil To: Shahaf Shuler , Yongseok Koh Cc: dev@dpdk.org Message-ID: <20180806142454.31907-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] net/mlx5: fix artificial L4 limitation on switch flow rules X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 14:26:00 -0000 Partial bit-masks are in fact supported on TCP/UDP source/destination ports. Remove unnecessary check. Fixes: 2bfc777e07 ("net/mlx5: add L2-L4 pattern items to switch flow rules") Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_nl_flow.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/net/mlx5/mlx5_nl_flow.c b/drivers/net/mlx5/mlx5_nl_flow.c index a1c8c340b..beb03c911 100644 --- a/drivers/net/mlx5/mlx5_nl_flow.c +++ b/drivers/net/mlx5/mlx5_nl_flow.c @@ -800,16 +800,6 @@ mlx5_nl_flow_transpose(void *buf, } spec.tcp = item->spec; if ((mask.tcp->hdr.src_port && - mask.tcp->hdr.src_port != RTE_BE16(0xffff)) || - (mask.tcp->hdr.dst_port && - mask.tcp->hdr.dst_port != RTE_BE16(0xffff))) - return rte_flow_error_set - (error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM_MASK, - mask.tcp, - "no support for partial masks on" - " \"hdr.src_port\" and \"hdr.dst_port\"" - " fields"); - if ((mask.tcp->hdr.src_port && (!mnl_attr_put_u16_check(buf, size, TCA_FLOWER_KEY_TCP_SRC, spec.tcp->hdr.src_port) || @@ -847,16 +837,6 @@ mlx5_nl_flow_transpose(void *buf, } spec.udp = item->spec; if ((mask.udp->hdr.src_port && - mask.udp->hdr.src_port != RTE_BE16(0xffff)) || - (mask.udp->hdr.dst_port && - mask.udp->hdr.dst_port != RTE_BE16(0xffff))) - return rte_flow_error_set - (error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM_MASK, - mask.udp, - "no support for partial masks on" - " \"hdr.src_port\" and \"hdr.dst_port\"" - " fields"); - if ((mask.udp->hdr.src_port && (!mnl_attr_put_u16_check(buf, size, TCA_FLOWER_KEY_UDP_SRC, spec.udp->hdr.src_port) || -- 2.11.0