From patchwork Mon Dec 28 09:24:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: taoyunxiang X-Patchwork-Id: 1421009 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D4Qfp1g7Xz9sWL for ; Tue, 29 Dec 2020 05:14:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A032A87518; Mon, 28 Dec 2020 18:14:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J+tnrLYK70ri; Mon, 28 Dec 2020 18:14:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id C12A58757D; Mon, 28 Dec 2020 18:12:15 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8331CC200A; Mon, 28 Dec 2020 18:12:15 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 21ED2C0891 for ; Mon, 28 Dec 2020 09:26:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1B16D2046B for ; Mon, 28 Dec 2020 09:26:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ro+N4qUYnpEO for ; Mon, 28 Dec 2020 09:26:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from cmccmta1.chinamobile.com (cmccmta1.chinamobile.com [221.176.66.79]) by silver.osuosl.org (Postfix) with ESMTP id 9F27A2045F for ; Mon, 28 Dec 2020 09:26:32 +0000 (UTC) Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app03-12003 (RichMail) with SMTP id 2ee35fe9a4a056a-bee71; Mon, 28 Dec 2020 17:25:53 +0800 (CST) X-RM-TRANSID: 2ee35fe9a4a056a-bee71 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from yun.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25fe9a48a90b-7b8c5; Mon, 28 Dec 2020 17:25:52 +0800 (CST) X-RM-TRANSID: 2ee25fe9a48a90b-7b8c5 From: Tao YunXiang To: ovs-dev@openvswitch.org Date: Mon, 28 Dec 2020 01:24:59 -0800 Message-Id: <20201228092520.11807-42-taoyunxiang@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201228092520.11807-1-taoyunxiang@cmss.chinamobile.com> References: <8> <20201228092520.11807-1-taoyunxiang@cmss.chinamobile.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 28 Dec 2020 18:10:34 +0000 Cc: Rongyin Subject: [ovs-dev] [PATCH 41/62] netdev-offload-dpdk: validate mask check for disable megaflow X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Rongyin Code Source From: Self Code Description: Validate mask check for disable megaflow Jira: #[Optional] 市场项目编号(名称):[Optional] --- lib/netdev-offload-dpdk.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 4c0a5be..ad6302b 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -1789,11 +1789,12 @@ netdev_offload_dpdk_validate_flow(const struct match *match) goto err; } */ - + /* work around if (masks->metadata || masks->skb_priority || masks->pkt_mark || masks->dp_hash) { goto err; } + */ /* recirc id must be zero. */ /* support recirc now so mark this checker @@ -1810,12 +1811,15 @@ netdev_offload_dpdk_validate_flow(const struct match *match) return -1; } + /* support conntrack now so mark this checker if (masks->ct_state || masks->ct_nw_proto || masks->ct_zone || masks->ct_mark || !ovs_u128_is_zero(masks->ct_label)) { goto err; } + */ + /* not support conj action */ if (masks->conj_id || masks->actset_output) { goto err; } @@ -1825,19 +1829,10 @@ netdev_offload_dpdk_validate_flow(const struct match *match) goto err; } - /* Unsupported L3. */ - if (masks->ipv6_label || masks->ct_nw_src || masks->ct_nw_dst || - !is_all_zeros(&masks->ipv6_src, sizeof masks->ipv6_src) || - !is_all_zeros(&masks->ipv6_dst, sizeof masks->ipv6_dst) || - !is_all_zeros(&masks->ct_ipv6_src, sizeof masks->ct_ipv6_src) || - !is_all_zeros(&masks->ct_ipv6_dst, sizeof masks->ct_ipv6_dst) || - !is_all_zeros(&masks->nd_target, sizeof masks->nd_target) || - !is_all_zeros(&masks->nsh, sizeof masks->nsh) || - !is_all_zeros(&masks->arp_sha, sizeof masks->arp_sha) || - !is_all_zeros(&masks->arp_tha, sizeof masks->arp_tha)) { + if (!is_all_zeros(&masks->nd_target, sizeof masks->nd_target) || + !is_all_zeros(&masks->nsh, sizeof masks->nsh) ){ goto err; } - /* If fragmented, then don't HW accelerate - for now. */ /* move this checker to parse_flow_match if (match_zero_wc.flow.nw_frag) {