Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16559C432C0 for ; Wed, 20 Nov 2019 17:17:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE7FB208CE for ; Wed, 20 Nov 2019 17:17:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="H7iJfIVG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729707AbfKTRRW (ORCPT ); Wed, 20 Nov 2019 12:17:22 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43302 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727671AbfKTRRU (ORCPT ); Wed, 20 Nov 2019 12:17:20 -0500 Received: by mail-pg1-f195.google.com with SMTP id b1so25947pgq.10 for ; Wed, 20 Nov 2019 09:17:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=5PexT+/ipxiQAcT6cILQ4wqSXMxHeHrXKtJBoJO5N/Y=; b=H7iJfIVGlBWjAOWxioUwGTqGTAiavtkFC5fCNsdmCFHVxpbhj7r6ijz2ojBx2oMPDH +h0IHRMQacg4RcRWum/0es1beA1Z/CGMLcNz9n6jl+i4UfW1sdvhyD41nOtyy7WRinEf NHX8rIagl/6VZzUsxPK5npDwGl9KJoHF1eQin867srifuIDDH2Iw+sPeUnuVTcyZnxox w6LYA8zfXXeqM+Q2zg+m3skf686iSWJMDpUNuknNKEqg0hi3GxEPNL/oRZBapfboaypW DEZnfQp8Rtn4WevV9YNuTtM77PfEPDNTN5N8aBi5zqH2m6r29I9thM0fs2WN663niapT 7bcA== 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:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=5PexT+/ipxiQAcT6cILQ4wqSXMxHeHrXKtJBoJO5N/Y=; b=BzsHx9a6PqybDQIIrFoPZnZCOtnSqxdveWmY3smPELUz+d2DfpZns6SRk9n1y3mroM 49ecCmuff24mbHTFRYX1P51S/8LlOcpvbGIqy3XD51FFFZAEXnebd1/6eBq/bLh11B3L s2B2S0qju+5M8VyjSgeqj+QxUiJ3oV0/9xC+YxM77UoZMrJ0e+zJFaPE3Qgj+O0i7omn ti4+h+dJad9mrbi3U8W22MXnFGtxtNUVfty8NYfKQrcVFPQfx2/RlggAJyZL+RKSa/Lf SkNCv7UHHWYPt5MNHxQcKOQ99RDGb3z9epwOcDQcwIt79qWHm/7c1E2hOmvB97END8rw pMOA== X-Gm-Message-State: APjAAAWbXRZXi7msIGgnLQNBy4YAMNonlLMw1mo46CdtznPy0zYkmrJ1 AIsgk4V0CzF0zEtZVr79GS7i1A== X-Google-Smtp-Source: APXvYqz7KFcaXXGL/A4GmIQe3xYZFbp9h0x7N1Tmq/pG+hz6ohK+2sUesTWLRDctwtafOWkEi/Is6Q== X-Received: by 2002:a65:6803:: with SMTP id l3mr4417590pgt.293.1574270239938; Wed, 20 Nov 2019 09:17:19 -0800 (PST) Received: from cakuba.netronome.com (c-73-202-202-92.hsd1.ca.comcast.net. [73.202.202.92]) by smtp.gmail.com with ESMTPSA id r13sm32357727pfg.3.2019.11.20.09.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 09:17:19 -0800 (PST) Date: Wed, 20 Nov 2019 09:17:04 -0800 From: Jakub Kicinski To: Xin Long Cc: network dev , davem , Simon Horman , "dsahern@gmail.com" Subject: Re: [PATCH net-next 1/4] net: sched: add vxlan option support to act_tunnel_key Message-ID: <20191120091704.2d10ab90@cakuba.netronome.com> In-Reply-To: References: <20191119161241.5b010232@cakuba.netronome.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 20 Nov 2019 13:08:39 +0800, Xin Long wrote: > > > static const struct nla_policy > > > @@ -64,6 +66,11 @@ geneve_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX + 1] = { > > > .len = 128 }, > > > }; > > > > > > +static const struct nla_policy > > > +vxlan_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX + 1] = { > > > > [TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC] = > > { .strict_type_start = TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC + 1, } > > > > > + [TCA_TUNNEL_KEY_ENC_OPT_VXLAN_GBP] = { .type = NLA_U32 }, > > > +}; > > > + > But vxlan_opt_policy is a new policy, and it will be parsed by > nla_parse_nested() > where NL_VALIDATE_STRICT has been used. > > .strict_type_start is used for setting NL_VALIDATE_STRICT for some new > option appending on an old policy. > > So I think .strict_type_start is not needed here. Hm, that's what I thought but then we were asked to add it in act_mpls.c. I should've checked the code. Anyway, we should probably clean up act_mpls.c and act_ct.c so people don't copy it unnecessarily.