From patchwork Tue Aug 4 01:54:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hepeng X-Patchwork-Id: 1340633 X-Patchwork-Delegate: i.maximets@samsung.com 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.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bytedance-com.20150623.gappssmtp.com header.i=@bytedance-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=nGaBrZO8; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BLHrZ2x1kz9sSG for ; Tue, 4 Aug 2020 11:55:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B19D386B78; Tue, 4 Aug 2020 01:55:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P5DA9tw4fIbE; Tue, 4 Aug 2020 01:55:05 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 3691686A7C; Tue, 4 Aug 2020 01:55:05 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0415FC0051; Tue, 4 Aug 2020 01:55:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 01CB0C004C for ; Tue, 4 Aug 2020 01:55:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DEB2985166 for ; Tue, 4 Aug 2020 01:55:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IRa7yLD6pJIw for ; Tue, 4 Aug 2020 01:55:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8A55F84E5F for ; Tue, 4 Aug 2020 01:55:01 +0000 (UTC) Received: by mail-pl1-f174.google.com with SMTP id k13so14187265plk.13 for ; Mon, 03 Aug 2020 18:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PEmKKJbb1L9Vd6ErpXCZ7imhKJtd9a/evPoQi/K2IOo=; b=nGaBrZO8xIXbzRf5SS3+I89vum2wDgha2MfXX5hFmvDvbzW+1H2Yb0VCsu7JSKX3md NcupN5+iOk3szRDod95m+H3ekDR8inP4L1a3b1sOWrlfpAaWi2544D3qs+/ojna8faNt LPyRxnLD2zlfsq9BpISZOe/wpQRbQUF1ZGcLdCwICqwJc2ZoHdbygYXz/mdXKH39pYpW szcWXm50LbQLCIXtfZhOP8eUeJy6eOeZjCRhgDtD/vZwqDm8cZIYnfjOSCsMn9kWxZc1 SSz0lD5+5FpmhhAOPvgqVUvKYA+fRHZCVwsdK27aiPfW1ybJUuLRYB2zLeTXw4zlhLv/ R2cQ== 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:mime-version:content-transfer-encoding; bh=PEmKKJbb1L9Vd6ErpXCZ7imhKJtd9a/evPoQi/K2IOo=; b=LSYFNTtiDVku3ie/HRI3SxiGbaRmd/qsCv75i9HAMJiv4RIFUyrgloAbRDs2LmL4Pv DIgAz9855uJdAp/l1a+G/z02EIMVLvypGqjRw+kZH5kgGPaAqD+pscNLKtCBlB7pbj8/ snCD7qd6jiEHairn9C1Gfd8filQmlBLvTFp07h5ZU+lpWxSZBi6POAR9iZOpa0HbUrON 711Uyj8WWhkAlsX+9lnU+tlWzV8LrP/zdhF5kzgHIfNsTvLb9OYApU9DOy6TJGUrnJ/w 6y78h6VXS94eBlJNBF5deN0+WucPniDrYRTVlXqxy8CsoOYRGQOV2cLW6zV8F5jjtYqP 9LIg== X-Gm-Message-State: AOAM532E//fo4er2OSs0HxYoJ4dsq7+TqPY9FDUMN2kX1bztGuPThI2W yN98g5YA7m0sQQiFBt4AkpCPl/PZb8s= X-Google-Smtp-Source: ABdhPJwXz1kHnRsvo3R5cKTXtH7GtVFwGAd1dHpyoZzaKUraLIpvDikTSeuG2huYoiUw9FAvcfID3Q== X-Received: by 2002:a17:90b:252:: with SMTP id fz18mr2058676pjb.48.1596506100550; Mon, 03 Aug 2020 18:55:00 -0700 (PDT) Received: from localhost ([61.120.150.72]) by smtp.gmail.com with ESMTPSA id j5sm21617501pfg.80.2020.08.03.18.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 18:54:59 -0700 (PDT) From: "hepeng.0320" To: dev@openvswitch.org Date: Tue, 4 Aug 2020 09:54:56 +0800 Message-Id: <20200804015456.4047-1-hepeng.0320@bytedance.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Cc: i.maximets@ovn.org Subject: [ovs-dev] [ovs-dev v2] odp-util: clearing padding in the nd_extension 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: Peng He Silimar to the patch 67eb8110171f ("odp-util: Fix passing uninitialized bytes in OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV*.") when change from flow into the netlink format, the tail padding of nd_extension should be cleared. this fixes the following warning logs: 2020-07-28T05:54:33.298Z|00001|15081|ofproto_dpif_upcall(pmd-c71/id:14)|WARN|Conflicting ukey for flows: ufid:763c7d3b-4d0c-4bff-aafc-fdfb6089c2ba skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(6),packet_type(ns=0,id=0),eth(src=fa:16:3e:75:b3:a9,dst=33:33:ff:00:00:01),eth_type(0x86dd),ipv6(src=fdbd:dc02:ff:1:1:225:72:102,dst=ff02::1:ff00:1,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=135,code=0),nd(target=fdbd:dc02:ff:1:1::1,sll=fa:16:3e:75:b3:a9,tll=00:00:00:00:00:00),nd_ext(nd_reserved=0x0,nd_options_type=1) ufid:763c7d3b-4d0c-4bff-aafc-fdfb6089c2ba skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc_id(0),dp_hash(0),in_port(6),packet_type(ns=0,id=0),eth(src=fa:16:3e:75:b3:a9,dst=33:33:ff:00:00:01),eth_type(0x86dd),ipv6(src=fdbd:dc02:ff:1:1:225:72:102,dst=ff02::1:ff00:1,label=0,proto=58,tclass=0,hlimit=255,frag=no),icmpv6(type=135,code=0),nd(target=fdbd:dc02:ff:1:1::1,sll=fa:16:3e:75:b3:a9,tll=00:00:00:00:00:00),nd_ext(nd_reserved=0x0,nd_options_type=1) 2020-07-28T05:54:33.298Z|00002|15081|ofproto_dpif_upcall(pmd-c71/id:14)|WARN|upcall_cb failure: ukey installation fails Fixes: 9b2b84973db7 ("Support for match & set ICMPv6 reserved and options type fields") Signed-off-by: Peng He --- lib/odp-util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index e54a78b43..5989381e9 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -6357,7 +6357,9 @@ odp_flow_key_from_flow__(const struct odp_flow_key_parms *parms, struct ovs_key_nd_extensions *nd_ext_key; if (data->igmp_group_ip4 != 0 || data->tcp_flags != 0) { - nd_ext_key = nl_msg_put_unspec_uninit(buf, + /* 'struct ovs_key_nd_extensions' has padding, + * clear it. */ + nd_ext_key = nl_msg_put_unspec_zero(buf, OVS_KEY_ATTR_ND_EXTENSIONS, sizeof *nd_ext_key); nd_ext_key->nd_reserved = data->igmp_group_ip4;