Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp405855imn; Wed, 3 Aug 2022 08:51:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TS9B42u/NwpR4Id6fI4gelhFKf00qBUX3RUPEHvPWws9v38Yc8t9PAazlMkxDpvWeJbgL X-Received: by 2002:a17:903:190:b0:16f:642:1a72 with SMTP id z16-20020a170903019000b0016f06421a72mr8641297plg.113.1659541911051; Wed, 03 Aug 2022 08:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659541911; cv=none; d=google.com; s=arc-20160816; b=iSYNE4gLIx5yPo0aLX4jehsFz9mSlrnRAB1UfuYaO3WqI8q/jC9NZowIHdHFWyGDp5 k/ZK/R9zZzqP5M5rQYRd7c1REaLj3us/AQKmJsR+fKSzLMvmHO7xIgeOxDlk8hEi1+k6 gAX6eS3usFH6j/dtk+EYlpTVt/9u6QbYdVzyLPAszmvy5tXZRqzjS8DmUdUpzpqFL9zN 0SKl4ZiOV/cIQO9dqGp4yFqpy0qHrNzxFlNfNNQ3xhjGHFQKmfYEptCgVycPTRM6/Kt/ kOfkPcBmEUNnJZycfRQEuuWnLxJ6gKk9rY+OTYvomiromrYWRK6Bn3wUrrNOJOquA3f9 B2Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=bdhu78KmWz47B9oRajPgUyATXCrOrtBtYeRP/9lxVpI=; b=PpDGA7HjWquxYWRHb7a4Lyr62fO8GVnLJMkct1WEcW1Ha9iAedESp9Ob/FW2LzpFnx naztdRRwdQCPAmwoLagsrGBuyd16fjVyh9nGETdEGzeXZCqgJGn3wOv7lWJ0R09hiPsw wn5646tApgwwsLGuew68AJZ1j8D5sYWsfmdqLELFHG3VHKrIv+KAxWv44tL8qLLI9syq qMvCxDmXodWMSRLZnZDOgGYgQzv845X31honrl1bYKUcTGNiUVGuNtI6YcEK8cDobwTy SpELgXlP4JUuxuOSjAi090jwvMMO9xfoETZMEyytQqwQEljFeCV7KEHP2KEq8B+Ce2te BtiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DmnEVZbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a64-20020a639043000000b0041bff78c097si10134395pge.12.2022.08.03.08.51.36; Wed, 03 Aug 2022 08:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DmnEVZbt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237658AbiHCPgy (ORCPT + 99 others); Wed, 3 Aug 2022 11:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236797AbiHCPgw (ORCPT ); Wed, 3 Aug 2022 11:36:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0792F17060; Wed, 3 Aug 2022 08:36:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B0D361719; Wed, 3 Aug 2022 15:36:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 579EBC433D6; Wed, 3 Aug 2022 15:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659541011; bh=i38drUEUdPfEjjptdNAH2klVJmj1WMiJnFB99eG6ALI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DmnEVZbtOdB2RIRN4oTLg/UKo6LTRn+/97mP9xU+YFs04uU0nnpZ7uzzdhNrf12DK 5cTT11ipOxIggWeNV1MTOpktzQe2sgAN9QdBtUZkebaYgoFFziqo/XB0Ek+2RZh7WK UD4FDLL/MNWS5I4eTgMoiKkJ7zIYMvIzJBtVXMU4NAXKOTZ3ris9RZx+GwKZmqxEWo wRnlTVlWbZzpYpECZlWMY5Rl063PF+Jlw0osHfBGgPl5zUt20UHhv2pjTFMeFC51az I/dEXsxKGODCvPIkhWBFxbEttTm0/kCGh42ylKv3GEPTPu5bgDLRGE/u1FdEqYoWZj uBAM6GX3leziQ== Message-ID: Date: Wed, 3 Aug 2022 09:36:49 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v3 net] geneve: fix TOS inheriting for ipv4 Content-Language: en-US To: Matthias May , netdev@vger.kernel.org Cc: davem@davemloft.net, yoshfuji@linux-ipv6.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, nicolas.dichtel@6wind.com, eyal.birger@gmail.com, linux-kernel@vger.kernel.org, jesse@nicira.com, pshelar@nicira.com, tgraf@suug.ch References: <20220802122025.1364123-1-matthias.may@westermo.com> From: David Ahern In-Reply-To: <20220802122025.1364123-1-matthias.may@westermo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/22 6:20 AM, Matthias May wrote: > @@ -822,6 +823,7 @@ static struct rtable *geneve_get_v4_rt(struct sk_buff *skb, > use_cache = false; > } > fl4->flowi4_tos = RT_TOS(tos); Could make this optional with if (full_tos) > + *full_tos = tos; > > dst_cache = (struct dst_cache *)&info->dst_cache; > if (use_cache) { ... > @@ -1137,6 +1140,7 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb) > { > struct ip_tunnel_info *info = skb_tunnel_info(skb); > struct geneve_dev *geneve = netdev_priv(dev); > + __u8 full_tos; > __be16 sport; > > if (ip_tunnel_info_af(info) == AF_INET) { > @@ -1148,7 +1152,8 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb) > 1, USHRT_MAX, true); > > rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info, > - geneve->cfg.info.key.tp_dst, sport); > + geneve->cfg.info.key.tp_dst, sport, > + &full_tos); > if (IS_ERR(rt)) > return PTR_ERR(rt); > since this one is not used