From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 DBAB6C2D0C3 for ; Sun, 22 Dec 2019 02:51:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACD99206EC for ; Sun, 22 Dec 2019 02:51:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y2xpPFpI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726824AbfLVCvu (ORCPT ); Sat, 21 Dec 2019 21:51:50 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:34725 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbfLVCvu (ORCPT ); Sat, 21 Dec 2019 21:51:50 -0500 Received: by mail-pf1-f177.google.com with SMTP id i6so521151pfc.1 for ; Sat, 21 Dec 2019 18:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tb/7nHDXSyTHRbn6bLUXJNyfhfW+mNakMOm97p9YJEI=; b=Y2xpPFpI891O9kBWdqpstSMgH/2Tw+n8oxwpi/B2pQSYCy50syNngv6StAB5k8xDe8 Ba0OGGeQYg8+cKR7YND4ug/iudZGWz6Mb9hsCOhkneEz8bOa9NErJLLM6P/oCXeAAaJ0 OMEeITOFu5d6q9K5Ng5Ilul33tTGqeT263shoRroXJijPSQ+OYZb+VOaS4eH0LTQhxqd eOA6nWj6tYChw8buLYcUoFXrb/0fSLveLTM991uIG7Gt6LbwVkAbHHRfdcirrPQEYTwO 0V6/QYAs2NIvChcAtru0mCDkmoKt2pevUhvjQL3szO+rvcydQhpHhqcCZMcI0u4Y9t4f YGFA== 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=Tb/7nHDXSyTHRbn6bLUXJNyfhfW+mNakMOm97p9YJEI=; b=SJkIIDjo1eQ1EyesOpcLnJhFt6fnERyifMCx8CXXlFcyaZ1tpCqSllzqiucQq3u1Fy MqrMCCP3zSFRWv/ge+y2ziaZcw3HnjRAnSo4HE1X///QRS56GuDuqHdIJnMh9AUDGPmK QC+ihUeNqnpkNG3GqWttja+FAHo6ce0GoMEvW/Gk6QvqLGYM4qI4vwlXnNhqu9nD2zfe Z7GHfJASkPhYdfsRwTNtl1HSbvEwp/u6rA3kFwVIv0uluHtVKSYDXRltvz2zQZZbQk+Z Hy3PGctThP4HBQxErIalilLegRjMls6hamMjLpRnrNhQtPrnuhGcJr6l4MJnXlq2Tibs ptJg== X-Gm-Message-State: APjAAAXKAN5C7A6awn5a2yt5EoJXomcsc89RD/xIz7R4B6vaPg44JwQt 4fUzfoB2URhekH2H17OpdaOLfrJLLcw= X-Google-Smtp-Source: APXvYqx5A1aOB1rE+h8/cnGsSdF2XYiJeTFcQjQakLttJv0xcuSnVwsys+/z0QmJFNiHSUs6dPBFjg== X-Received: by 2002:a62:14cc:: with SMTP id 195mr18628933pfu.160.1576983109635; Sat, 21 Dec 2019 18:51:49 -0800 (PST) Received: from dhcp-12-139.nay.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id k9sm1866775pjo.19.2019.12.21.18.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2019 18:51:49 -0800 (PST) From: Hangbin Liu To: netdev@vger.kernel.org Cc: Julian Anastasov , Marcelo Ricardo Leitner , David Ahern , Eric Dumazet , Guillaume Nault , David Miller , Pablo Neira , Stephen Hemminger , Alexey Kodanev , Hangbin Liu Subject: [PATCHv5 net 4/8] net/dst: add new function skb_dst_update_pmtu_no_confirm Date: Sun, 22 Dec 2019 10:51:12 +0800 Message-Id: <20191222025116.2897-5-liuhangbin@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20191222025116.2897-1-liuhangbin@gmail.com> References: <20191220032525.26909-1-liuhangbin@gmail.com> <20191222025116.2897-1-liuhangbin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add a new function skb_dst_update_pmtu_no_confirm() for callers who need update pmtu but should not do neighbor confirm. v5: No change. v4: No change. v3: Do not remove dst_confirm_neigh, but add a new bool parameter in dst_ops.update_pmtu to control whether we should do neighbor confirm. Also split the big patch to small ones for each area. v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu. Reviewed-by: Guillaume Nault Acked-by: David Ahern Signed-off-by: Hangbin Liu --- include/net/dst.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/net/dst.h b/include/net/dst.h index 593630e0e076..dc7cc1f1051c 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -519,6 +519,15 @@ static inline void skb_dst_update_pmtu(struct sk_buff *skb, u32 mtu) dst->ops->update_pmtu(dst, NULL, skb, mtu, true); } +/* update dst pmtu but not do neighbor confirm */ +static inline void skb_dst_update_pmtu_no_confirm(struct sk_buff *skb, u32 mtu) +{ + struct dst_entry *dst = skb_dst(skb); + + if (dst && dst->ops->update_pmtu) + dst->ops->update_pmtu(dst, NULL, skb, mtu, false); +} + static inline void skb_tunnel_check_pmtu(struct sk_buff *skb, struct dst_entry *encap_dst, int headroom) -- 2.19.2