Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp988551pxb; Fri, 1 Oct 2021 00:23:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuNXM1AHiYfA7kFFFpm2ODDdT9f2W6yVvgE65I/2LJiCS0UutCgm5/bLQ2/+Qb1WiO7Kda X-Received: by 2002:a17:906:1f8f:: with SMTP id t15mr4554546ejr.402.1633073011126; Fri, 01 Oct 2021 00:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633073011; cv=none; d=google.com; s=arc-20160816; b=FcOERaHHJ58fjk5uepWMvL7pY2f6fKjsTM9TP03rvyHg59zqusWedbyqKfiyTRuDb6 vAbHhncKqeCGYHMCXRlkZ6luwZWO67upq6Mz0Ic3X2iy8G4IrdPZdIbN2rDtmW3rl0yA pyxif3EAJqWMbIxUrRJKL5RXhWzEazuU3qVnJ5ec8L3gCfiSAA3IHf+WRT8+WgQSVM5h MTO0WUXjtkMAK6r36ZKzqq7Vdie0j3YwExyM+N2mpqWxDj2uUMCHVaP74WMzHKTJ3JdS 8WXCNv453ubZQrXAEBSxQ0FQKlx88XBvrRGMP5C4E51D79Vg5l4z1ERvURWhI9Asddc/ TSYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:reply-to:dkim-signature; bh=oGVJ8Db4ndTtDl7THEZBAMsW6oUl3MtjYtP7sF7htnw=; b=sPjD0bSRYno68v/Ap9uGTH/UmZSuyGOSeyRIxWjtwrGrk/bOzGEMGb05vCXAyB9Tog gbiQPQ9K1xFh7SiWHYfqBORtYp1gljyBT0nW3okGnLE+lL1jK/xHuZ1gdu559T23by4x 1noisdef2AhuAfXCe9BG0mipfF2L7ihqqQw70fFmOkU9WCQDwwv0H5jIaPV5n+wVvSTx XCxAi3/HttGk4+2+CZ2ht+I8/5y4o2re1tDsDGCmfhYngfDdQ0vjha6GxlFIV+AtpTCd 6rn4J9X/ix3RGwoM2P89KJuGQHuJI+KoKOKy3H0oQLJAXZI/PxLHHjrmoRyvAdU7YWQH kcIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@6wind.com header.s=google header.b=XhtNwD3C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=6wind.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h24si6889919ejt.408.2021.10.01.00.23.06; Fri, 01 Oct 2021 00:23:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@6wind.com header.s=google header.b=XhtNwD3C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=6wind.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231406AbhJAHXU (ORCPT + 99 others); Fri, 1 Oct 2021 03:23:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbhJAHXR (ORCPT ); Fri, 1 Oct 2021 03:23:17 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE32DC061778 for ; Fri, 1 Oct 2021 00:21:32 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 205-20020a1c01d6000000b0030cd17ffcf8so10402888wmb.3 for ; Fri, 01 Oct 2021 00:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=reply-to:subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oGVJ8Db4ndTtDl7THEZBAMsW6oUl3MtjYtP7sF7htnw=; b=XhtNwD3CwZuB0so8qwSUi+w305O0vhcUtNwcUYaBQriykLrYDjaMP5695ULxPRlisY epSgHhe9YSu19Au/80pveinEBHPRRJ1FBgXZYBD+UHYv9AY5S5eI4ItwEajQKqVQMPvW /D0M6bAAks0GJm9Z8JZXyGgS5akUN0Iy/vSTQ2sEQqoCbSSM3ToRG1Em/dAUyPqsvNyO k4nm0aiTvM7ZSLoL0x58UQ5jsotSxmF/asOZOZH2gqAf2vd05XEq+9K9tBcjQofe/16N fjhalOmweZt8sNPY5mB4J+sg5K1TAzD+VDO7yMOpW/HhXGVn0Eml4thRm2hX1s7fTkLa wdJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=oGVJ8Db4ndTtDl7THEZBAMsW6oUl3MtjYtP7sF7htnw=; b=PLEldGhfP+Pu1hW7Gk151ybSPI4UwLdESyOA9dFdmGYukOqKIUfElWa+P887BStIyN FqTjJSIuws/SWQR6UksueavKDiC5Ucwa3uDvCRBFoYkEQ9dO3/E6QLuaD/gf1z49IuXY rfgEoN1as5LRlBINV8kTO2bDXiaAJorJHxw1phEZal0IgirT4uXjTZRvVXjYGPYMLVOO XybYmI79fQH5cijMJbRC5r/l8FTgocNNbY0FJ6xtqbuNQ69w3y8KjpW4awHgDsbjWYtM eSKAmoOaEvR/WWr+C8ufxxasW9KT4DYwkRe8gchp01BWoh6svBOKVNjSgFwyhzNSiuFH Crow== X-Gm-Message-State: AOAM5337pq789HE4g0EAxJJ9GBWexqzFXsCsvwamQHwUV3IlYhz3L4NL w6DrzYnTh/woFS4QTumEwaksT2AG+OyzRg== X-Received: by 2002:a1c:7e53:: with SMTP id z80mr2952224wmc.152.1633072891177; Fri, 01 Oct 2021 00:21:31 -0700 (PDT) Received: from ?IPv6:2a01:e0a:410:bb00:8942:595a:24f3:3f9e? ([2a01:e0a:410:bb00:8942:595a:24f3:3f9e]) by smtp.gmail.com with ESMTPSA id n15sm5095346wrg.58.2021.10.01.00.21.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Oct 2021 00:21:30 -0700 (PDT) Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH net-next v6] net: openvswitch: IPv6: Add IPv6 extension header support To: Cpp Code , Jakub Kicinski Cc: netdev@vger.kernel.org, pshelar@ovn.org, "David S. Miller" , ovs dev , linux-kernel@vger.kernel.org References: <20210928194727.1635106-1-cpp.code.lv@gmail.com> <20210928174853.06fe8e66@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210929061909.59c94eff@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Nicolas Dichtel Organization: 6WIND Message-ID: Date: Fri, 1 Oct 2021 09:21:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 30/09/2021 à 18:11, Cpp Code a écrit : > On Wed, Sep 29, 2021 at 6:19 AM Jakub Kicinski wrote: >> >> On Wed, 29 Sep 2021 08:19:05 +0200 Nicolas Dichtel wrote: >>>> /* Insert a kernel only KEY_ATTR */ >>>> #define OVS_KEY_ATTR_TUNNEL_INFO __OVS_KEY_ATTR_MAX >>>> #undef OVS_KEY_ATTR_MAX >>>> #define OVS_KEY_ATTR_MAX __OVS_KEY_ATTR_MAX >>> Following the other thread [1], this will break if a new app runs over an old >>> kernel. >> >> Good point. >> >>> Why not simply expose this attribute to userspace and throw an error if a >>> userspace app uses it? >> >> Does it matter if it's exposed or not? Either way the parsing policy >> for attrs coming from user space should have a reject for the value. >> (I say that not having looked at the code, so maybe I shouldn't...) > > To remove some confusion, there are some architectural nuances if we > want to extend code without large refactor. > The ovs_key_attr is defined only in kernel side. Userspace side is > generated from this file. As well the code can be built without kernel > modules. > The code inside OVS repository and net-next is not identical, but I > try to keep some consistency. I didn't get why OVS_KEY_ATTR_TUNNEL_INFO cannot be exposed to userspace. > > JFYI This is the file responsible for generating userspace part: > https://github.com/openvswitch/ovs/blob/master/build-aux/extract-odp-netlink-h > This is the how corresponding file for ovs_key_attr looks inside OVS: > https://github.com/openvswitch/ovs/blob/master/datapath/linux/compat/include/linux/openvswitch.h > one can see there are more values than in net-next version. There are still some '#ifdef __KERNEL__'. The standard 'make headers_install' filters them. Why not using this standard mechanism? In this file, there are two attributes (OVS_KEY_ATTR_PACKET_TYPE and OVS_KEY_ATTR_ND_EXTENSIONS) that doesn't exist in the kernel. This will also breaks if an old app runs over a new kernel. I don't see how it is possible to keep the compat between {old|new} {kernel|app}. Regards, Nicolas