Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1286210pxb; Tue, 17 Aug 2021 08:09:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL49zpJFv4XKNJ+iUrSQfuiQ9KMthZgj8AgF21R6K0rYh/lbSs1Jlz1aPMBQSLUq7GZA05 X-Received: by 2002:a5d:83c4:: with SMTP id u4mr3294076ior.21.1629212969358; Tue, 17 Aug 2021 08:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629212969; cv=none; d=google.com; s=arc-20160816; b=pXLQscqeKVRpbGlU5bXTyqXIt09hsJb7BlB/KNzFjvbpEal1/wO6iadF9nGW/10QU/ QWldSZ4PLCkYcimTVV3t6vlNL7sdEs8w+mdgCR1ESoZuk1YWJo4A7Q0bwi2yEP7yq3fX gqP5yAb6EOQez6x7UIHE5Ysl+Nb2dpxoZUG9CJVnxh7dEOKxavPib216ZCqmn5L2N6dF 7EI7616QumjzK+cWmIZVt5yrCWGYNFFOnt2uYVizRSqUarG3DU6tpe3vTZNOdDSgQyPw V6X9woqrN+vyxIPHnv6mYbsb1+8VjEwx0w9IfRRhQmhnRTayMioy1rmztVd8LuKHc7fi s2Sg== 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:from:references :cc:to:subject:dkim-signature; bh=QVfvljS9yxMRLzJtSOULzVoQt76MWkNy0TQqqNBW6Ig=; b=hXXnCAUu9e1fHFHMU9vSyiog8Fa3ywEMcIqwCe7d6WLs3r7wO2bJ8ramKXfUbWbgk8 IVM0KheY3tc4IllRuofgY2X1KUI4xsahZmDc1Q+IWEhhIJhSasa/kWe/uYvIFnrQiEE4 icYqABMceKQnhCVSHSV0mYP/EYVAsQ2YkvMi5mOQh7QdRFmg+wz2ozlBSM53rMZ/oiS6 GuASZc3yqlz6Fks4hOG5dfIiASAF+6/I5TgEMJS/J/+55sAKikLfgKvYW5RL59PlkCSp US7szBfq1FDo43egB/9571AUx+CUarHYVVnrcvEs+nMnDfDM1hjiY3MdPXWUIOFiEjBU Ppww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qhGKl1Nx; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si2642322ila.26.2021.08.17.08.09.11; Tue, 17 Aug 2021 08:09:29 -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=@gmail.com header.s=20161025 header.b=qhGKl1Nx; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237482AbhHQPGO (ORCPT + 99 others); Tue, 17 Aug 2021 11:06:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhHQPGN (ORCPT ); Tue, 17 Aug 2021 11:06:13 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC79C061764; Tue, 17 Aug 2021 08:05:40 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id r16-20020a0568304190b02904f26cead745so25244185otu.10; Tue, 17 Aug 2021 08:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QVfvljS9yxMRLzJtSOULzVoQt76MWkNy0TQqqNBW6Ig=; b=qhGKl1NxybX2OZInj1F15H7pPHUfQ4Dpbv/J38dZIdgu9nN6y5fjjBuZsWVD2SC5fB 5bY+gkep8cKcRx0dwj3xV4232jYrbdKEwQoI98+dsQYIC/3FAawJ7t6s+gceuLHmVPTg YI6GkzMQTS2MfY8TDy9168Zsnxb4xnhHCj1NzSI+tA3MIWQDk5ejigGZavGI4/AgQuLd 1yC6T2uJSHfKTBhO5y6E7JmQEkcl6hatqrZyj344WBxg9mO6TJoyCEngXkHYGiBaTMV3 RdjIGF19V5OdMW+NzFIn4PRHJNZjQ83CI/giVjaHxizaHmfINZgqwQ8+eEHud/1NQY7N Cm8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QVfvljS9yxMRLzJtSOULzVoQt76MWkNy0TQqqNBW6Ig=; b=gF9MG5tsfnDemQLkvUxXDzT8C+M1HMIUY2ugzBr+ztuLNG6xDtmczA+/ZEdPRGyzIv Unj4Xnq74wmUy7GFjixaAGFF8Y+qVAqlygP4D+NRNuDb8YDzSO4iOYlxYnWRvZ1cyN67 j1GawdRtVj2lQN9/xSLEhaEHtB/BVf8fKxCyV8GMiNn0BiqnktwZSEhW0/WMvo5G0Dxs igpjASI0TXkoqlCsrS6U8GPK9rIpY6aUckBgpaP7CjW2TnAb28S+qZIC5ZO9Yix6iEyS bxgh8TmdCvo/dbX2bUUFK5b908j6cu03D1i/+p4lNKwzyhst1ndpwznt9qPuY39Iu8U5 /v3w== X-Gm-Message-State: AOAM532p+W5WPi4GSUBVyhXIgApAsbtw/C9YiI4Ojw7PeA9C3hgoZx82 rh8Pt8hHm6bZ6iDeaEOPRU8= X-Received: by 2002:a05:6830:236d:: with SMTP id r13mr3040332oth.130.1629212739821; Tue, 17 Aug 2021 08:05:39 -0700 (PDT) Received: from Davids-MacBook-Pro.local ([8.6.112.214]) by smtp.googlemail.com with ESMTPSA id u14sm425086oth.73.2021.08.17.08.05.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Aug 2021 08:05:39 -0700 (PDT) Subject: Re: [PATCH net-next v4] ipv6: add IFLA_INET6_RA_MTU to expose mtu value in the RA message To: Rocco Yue , "David S . Miller" , Jakub Kicinski , Hideaki YOSHIFUJI , David Ahern , Matthias Brugger Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, rocco.yue@gmail.com, chao.song@mediatek.com, zhuoliang.zhang@mediatek.com References: <20210817072609.2110-1-rocco.yue@mediatek.com> From: David Ahern Message-ID: Date: Tue, 17 Aug 2021 09:05:36 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210817072609.2110-1-rocco.yue@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/17/21 1:26 AM, Rocco Yue wrote: > @@ -1496,6 +1490,11 @@ static void ndisc_router_discovery(struct sk_buff *skb) > memcpy(&n, ((u8 *)(ndopts.nd_opts_mtu+1))+2, sizeof(mtu)); > mtu = ntohl(n); > > + if (in6_dev->ra_mtu != mtu) { > + in6_dev->ra_mtu = mtu; > + send_ifinfo_notify = true; > + } > + > if (mtu < IPV6_MIN_MTU || mtu > skb->dev->mtu) { > ND_PRINTK(2, warn, "RA: invalid mtu: %d\n", mtu); > } else if (in6_dev->cnf.mtu6 != mtu) { If an RA no longer carries an MTU or if accept_ra_mtu is reset, then in6_dev->ra_mtu should be reset to 0 right? rest of the change looks good to me.