From patchwork Fri Dec 11 01:58:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Vazquez X-Patchwork-Id: 342638 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=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 C1727C0018C for ; Fri, 11 Dec 2020 01:59:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A1F523E23 for ; Fri, 11 Dec 2020 01:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394994AbgLKB70 (ORCPT ); Thu, 10 Dec 2020 20:59:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391180AbgLKB7L (ORCPT ); Thu, 10 Dec 2020 20:59:11 -0500 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68D20C0613D6 for ; Thu, 10 Dec 2020 17:58:31 -0800 (PST) Received: by mail-pg1-x549.google.com with SMTP id f6so5445473pgh.3 for ; Thu, 10 Dec 2020 17:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=aDAJY+8VIyQrulSE2QmK19TS3uRloTNCtUe012HVBlY=; b=WY0wPAkEvRHvd0V95IlCbjSJdmpuWYQiBudlmdQoBVhngtSq6VOXDHi7se/3cQ0lAH L1x0OCQnhimFFGx1IuKBQaela/tfqY+ZhyFxvDmKnxKvX/Q7pvOY+QKeKr8tk7hXlnGW MpFnWponVBcwuzxQ34lHdTY6E2hFY60CJVVR/p7/MauubF3jFubAfKFOcZVo4SWFmtKF RA1cHNV3qfvr3RfEexC8d5wBXKUdwVZ2OG2C8KP+PGHTQRzFeoCnJhCbtrigFhXpWivT jA8FtbYA6BAc4KbvSl/UB/dXoSLhCQ853Tlc9g5L5wZgy2Os+YK6TLoH9QOdLONRpkOK JtAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=aDAJY+8VIyQrulSE2QmK19TS3uRloTNCtUe012HVBlY=; b=pALKPPMmJ9dTs5XsG3Mqfbb7Q+CBLQfMkUgKHb9QOtv9tyTjY1CjFT5Kp0l2DVK5w6 qD+f+AxC6EHcsFl3FKn0VLUfrr2ndtiZFlBAYZ7ccOk3aX7cbwxFHV0E5UrSTsvryFtB /nwn4xpnPkNIdOVK/GNFKkdiM8wHKIBJUW0HH/Nl4sTMINpdiCvbTI1jXbU4Nl+P45tq eoCGOhtSgBXOLGg4zTlTNhpOT6Oe4oNtndqrFDCGM6OAtb4rP9VuYH2C0pu2yqY1DpZp U8y22wD6rg2HGHieFBceL/wpw69lODdH6uxcq4oezYNltA9lXlADSjExM8jNSclU0nJw jiLA== X-Gm-Message-State: AOAM533pBv36hH3ORv9Xh7vLrgIazlk+kidmWwGOaxotaG0vaNNwbKPr UZMrtEt6bQLBHbL2rjEEBNL/QUUIpgjz X-Google-Smtp-Source: ABdhPJyE+T1lUsVnjG3z+ekBg5fk/dWQGlg2Lt+8NFAN9tJ8AgJmz3L0ypm/3zvMOBc7quLCVZeFu64KWlKL Sender: "brianvv via sendgmr" X-Received: from brianvv.c.googlers.com ([fda3:e722:ac3:10:7f:e700:c0a8:348]) (user=brianvv job=sendgmr) by 2002:a62:7e09:0:b029:19e:9fdd:80a3 with SMTP id z9-20020a627e090000b029019e9fdd80a3mr8312032pfc.24.1607651910852; Thu, 10 Dec 2020 17:58:30 -0800 (PST) Date: Fri, 11 Dec 2020 01:58:20 +0000 In-Reply-To: <20201211015823.1079574-1-brianvv@google.com> Message-Id: <20201211015823.1079574-2-brianvv@google.com> Mime-Version: 1.0 References: <20201211015823.1079574-1-brianvv@google.com> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog Subject: [PATCH net-next 1/4] net: use indirect call helpers for dst_input From: Brian Vazquez To: Brian Vazquez , Brian Vazquez , Eric Dumazet , "David S . Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: brianvv This patch avoids the indirect call for the common case: ip_local_deliver and ip6_input Signed-off-by: brianvv Reported-by: kernel test robot --- include/net/dst.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/net/dst.h b/include/net/dst.h index 10f0a8399867..98cf6e8c06c4 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -18,6 +18,7 @@ #include #include #include +#include struct sk_buff; @@ -441,10 +442,13 @@ static inline int dst_output(struct net *net, struct sock *sk, struct sk_buff *s return skb_dst(skb)->output(net, sk, skb); } +INDIRECT_CALLABLE_DECLARE(int ip6_input(struct sk_buff *)); +INDIRECT_CALLABLE_DECLARE(int ip_local_deliver(struct sk_buff *)); /* Input packet from network to transport. */ static inline int dst_input(struct sk_buff *skb) { - return skb_dst(skb)->input(skb); + return INDIRECT_CALL_INET(skb_dst(skb)->input, + ip6_input, ip_local_deliver, skb); } static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) From patchwork Fri Dec 11 01:58:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Vazquez X-Patchwork-Id: 342639 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=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL 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 8F5AFC4361B for ; Fri, 11 Dec 2020 01:59:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C24823D9A for ; Fri, 11 Dec 2020 01:59:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395005AbgLKB70 (ORCPT ); Thu, 10 Dec 2020 20:59:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730749AbgLKB7N (ORCPT ); Thu, 10 Dec 2020 20:59:13 -0500 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18320C061794 for ; Thu, 10 Dec 2020 17:58:33 -0800 (PST) Received: by mail-pg1-x549.google.com with SMTP id j30so5418824pgj.17 for ; Thu, 10 Dec 2020 17:58:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=JZuBMUjdVVVxh6WnK4CWaG8XFlwg5qneM5nzLNIVeag=; b=ko6IbsPShEqsmfAfsfV9qvC127/jPkMqeofdfguKVDhv4nl4PDHYX0VMp3YLRGQHpd M9FIEZPyHzEjhCzMvJS1Q3kmPNYL88oBazzPo+UWk5Bj9slbUNmN+z7RIEwVb7od+GtU sW1+wy9m4H3MrISFx6vRt3pCu3UUUrpSQsw1Cv3EOAXbhNBzj+hFbcT72q90susNYJuM 2g3YmJtYWRQnDygT5FJIG5GfVA7FvANcKmFVmI1MtfOzZ2Rv2CsQLe7zpQ3sMnV+zzs+ j7rSlK/ixBtETx6kq03jHXYo2XnRMuM4/XE1PAsbJ1WtZBuErSpMuVfVKX3cUoY1yn0T JHyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=JZuBMUjdVVVxh6WnK4CWaG8XFlwg5qneM5nzLNIVeag=; b=tfKLl5hUA+qeiTYQ8duqjmzky23HZE4XT05qoqfq1YYRvln3GPgdVFIE+z6wEvDakI Upn2Qub0GVqvgsv/CZI6wuzCxj2uGtX6G2r45dz6blSv5KSGLGwhODZ3zasZv7kuz49l nOS3OAb8WMDhYsqYZAYzMdZNgbwNgvbnWp4jbJIE+2Mu7cv3IyTm7YGRrkYedhy6V+Qq Ub2KuvXX2UE7IsnrX/SC09QD2p2zI4YuBewuW6nnWzu3ZvtgQ3ZKgKCTSP+OansHyag5 rTUHW6QqGgMjzuWicbypYt949S+PkNriqYSJgRG2WtESOHLVs77xjWpVDlb6e5V3yP8G aesQ== X-Gm-Message-State: AOAM533FbLxH2DOKYytINRXEmp6On6Mfhr6lN3w4nYRo4kIqWA6G10AE Cgi+ZHgOR/4n8EyuRPb5OPXUU4fRqe56 X-Google-Smtp-Source: ABdhPJx/ZdLB8Kbh0dsoZNXoyjhao5SR68H1LrrwYVUeY7aVjpBjpUw3heJ5jdAZ1rEM4Qyww7Y4lrqeEZ5q Sender: "brianvv via sendgmr" X-Received: from brianvv.c.googlers.com ([fda3:e722:ac3:10:7f:e700:c0a8:348]) (user=brianvv job=sendgmr) by 2002:a17:90b:50a:: with SMTP id r10mr10755699pjz.103.1607651912600; Thu, 10 Dec 2020 17:58:32 -0800 (PST) Date: Fri, 11 Dec 2020 01:58:21 +0000 In-Reply-To: <20201211015823.1079574-1-brianvv@google.com> Message-Id: <20201211015823.1079574-3-brianvv@google.com> Mime-Version: 1.0 References: <20201211015823.1079574-1-brianvv@google.com> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog Subject: [PATCH net-next 2/4] net: use indirect call helpers for dst_output From: Brian Vazquez To: Brian Vazquez , Brian Vazquez , Eric Dumazet , "David S . Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: brianvv This patch avoids the indirect call for the common case: ip6_output and ip_output Signed-off-by: brianvv Reported-by: kernel test robot --- include/net/dst.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/net/dst.h b/include/net/dst.h index 98cf6e8c06c4..3932e9931f08 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -436,10 +436,16 @@ static inline void dst_set_expires(struct dst_entry *dst, int timeout) dst->expires = expires; } +INDIRECT_CALLABLE_DECLARE(int ip6_output(struct net *, struct sock *, + struct sk_buff *)); +INDIRECT_CALLABLE_DECLARE(int ip_output(struct net *, struct sock *, + struct sk_buff *)); /* Output packet to network from transport. */ static inline int dst_output(struct net *net, struct sock *sk, struct sk_buff *skb) { - return skb_dst(skb)->output(net, sk, skb); + return INDIRECT_CALL_INET(skb_dst(skb)->output, + ip6_output, ip_output, + net, sk, skb); } INDIRECT_CALLABLE_DECLARE(int ip6_input(struct sk_buff *)); From patchwork Fri Dec 11 01:58:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Vazquez X-Patchwork-Id: 342637 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=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL 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 E12C6C4167B for ; Fri, 11 Dec 2020 02:01:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B351423EF5 for ; Fri, 11 Dec 2020 02:01:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395007AbgLKCAD (ORCPT ); Thu, 10 Dec 2020 21:00:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391602AbgLKB7u (ORCPT ); Thu, 10 Dec 2020 20:59:50 -0500 Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1670AC0617A6 for ; Thu, 10 Dec 2020 17:58:35 -0800 (PST) Received: by mail-qt1-x84a.google.com with SMTP id f11so5357602qth.23 for ; Thu, 10 Dec 2020 17:58:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=thwvCtn6LNG/FDpSFGyZ6Wmg72wk3C6bCvqdBXCPvKo=; b=a8/DNSDqSFYuM4vlu1Nh8GoAoU/a0wAqBG4bORngP+gURnE0AIhr6hxeKYy6LArvlv ngaB6UXYn8N24qxxq/ph04+wGnd9v1eLX+q+K8p2B2WDfXPexQ5H2ZmUmov+o2DfryuW 0WWg1W7ZjOEiJDkjl2gCn/iZk98tXAGcAZet5pHYZrFa9+PT0XA4e6Eu2Ecl9trOJ12G NpypZ/VaR82IQg8Mg1NlyoW4qaKry964GMsxWjwpDXslPje6NNyeCnMIEjwHSyCJlOD4 eNAN6xxSAPl1078mCOnMpBLF3/T00FMtkQJsx6Kho6h9249YPNfu+k2D9P/cxccqzJVj y15w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=thwvCtn6LNG/FDpSFGyZ6Wmg72wk3C6bCvqdBXCPvKo=; b=RmAA5YsAdK316s2KH1+ucWtsxQIupeUpJ/N5x/dF5RRJbRhMwHWbU3dIJQtrwOR11D UFadA7iWdx1UYW4by4s5FMYl04rZWv8rInhsTZCP+O3Kyern8BJFUCSHMgxrxqi4yWcz G4W8bPkDA9Oo3R0rSS6c1etVdCWFiN/Yp21cOIG+b5XdpaTQVB61EGCbsHDTVWmz8gPA yiUT1Tao863pLCrk5U78/qQhpjn5hToucMWkXrO0gOldmFybz61hIyXi+jou6Gh5cOMk 0iH3XmGfiUKMVxDvAKylT7zY+kpDxLgFagLTLsGvKCBMiFYaRutP5UHdwkfEdtzm3D7m 7Dpw== X-Gm-Message-State: AOAM532UWefJW1+ZWfbi4QJaYTAoRYtYMveNd0FLyA75cnZTKYOcTmT4 gejlNi7P31wH2EF4rbQGsCkNQSZ944uF X-Google-Smtp-Source: ABdhPJx7gsbztHObw/y4GRJUsg39iVn+hJbBAH5jUIDp67itH5xGkV2prSgrsFigpVawrfizaleNQH+GKtaq Sender: "brianvv via sendgmr" X-Received: from brianvv.c.googlers.com ([fda3:e722:ac3:10:7f:e700:c0a8:348]) (user=brianvv job=sendgmr) by 2002:a0c:f20f:: with SMTP id h15mr12835454qvk.54.1607651914229; Thu, 10 Dec 2020 17:58:34 -0800 (PST) Date: Fri, 11 Dec 2020 01:58:22 +0000 In-Reply-To: <20201211015823.1079574-1-brianvv@google.com> Message-Id: <20201211015823.1079574-4-brianvv@google.com> Mime-Version: 1.0 References: <20201211015823.1079574-1-brianvv@google.com> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog Subject: [PATCH net-next 3/4] net: use indirect call helpers for dst_mtu From: Brian Vazquez To: Brian Vazquez , Brian Vazquez , Eric Dumazet , "David S . Miller" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: brianvv This patch avoids the indirect call for the common case: ip6_mtu and ipv4_mtu Signed-off-by: brianvv --- include/net/dst.h | 4 +++- net/ipv4/route.c | 6 ++++-- net/ipv6/route.c | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index 3932e9931f08..9f474a79ed7d 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -194,9 +194,11 @@ dst_feature(const struct dst_entry *dst, u32 feature) return dst_metric(dst, RTAX_FEATURES) & feature; } +INDIRECT_CALLABLE_DECLARE(unsigned int ip6_mtu(const struct dst_entry *)); +INDIRECT_CALLABLE_DECLARE(unsigned int ipv4_mtu(const struct dst_entry *)); static inline u32 dst_mtu(const struct dst_entry *dst) { - return dst->ops->mtu(dst); + return INDIRECT_CALL_INET(dst->ops->mtu, ip6_mtu, ipv4_mtu, dst); } /* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */ diff --git a/net/ipv4/route.c b/net/ipv4/route.c index e26652ff7059..4fac91f8bd6c 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -135,7 +135,8 @@ static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT; static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie); static unsigned int ipv4_default_advmss(const struct dst_entry *dst); -static unsigned int ipv4_mtu(const struct dst_entry *dst); +INDIRECT_CALLABLE_SCOPE +unsigned int ipv4_mtu(const struct dst_entry *dst); static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); static void ipv4_link_failure(struct sk_buff *skb); static void ip_rt_update_pmtu(struct dst_entry *dst, struct sock *sk, @@ -1311,7 +1312,7 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst) return min(advmss, IPV4_MAX_PMTU - header_size); } -static unsigned int ipv4_mtu(const struct dst_entry *dst) +INDIRECT_CALLABLE_SCOPE unsigned int ipv4_mtu(const struct dst_entry *dst) { const struct rtable *rt = (const struct rtable *)dst; unsigned int mtu = rt->rt_pmtu; @@ -1333,6 +1334,7 @@ static unsigned int ipv4_mtu(const struct dst_entry *dst) return mtu - lwtunnel_headroom(dst->lwtstate, mtu); } +EXPORT_SYMBOL(ipv4_mtu); static void ip_del_fnhe(struct fib_nh_common *nhc, __be32 daddr) { diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 188e114b29b4..22caee290b6c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -83,7 +83,8 @@ enum rt6_nud_state { static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie); static unsigned int ip6_default_advmss(const struct dst_entry *dst); -static unsigned int ip6_mtu(const struct dst_entry *dst); +INDIRECT_CALLABLE_SCOPE +unsigned int ip6_mtu(const struct dst_entry *dst); static struct dst_entry *ip6_negative_advice(struct dst_entry *); static void ip6_dst_destroy(struct dst_entry *); static void ip6_dst_ifdown(struct dst_entry *, @@ -3089,7 +3090,7 @@ static unsigned int ip6_default_advmss(const struct dst_entry *dst) return mtu; } -static unsigned int ip6_mtu(const struct dst_entry *dst) +INDIRECT_CALLABLE_SCOPE unsigned int ip6_mtu(const struct dst_entry *dst) { struct inet6_dev *idev; unsigned int mtu; @@ -3111,6 +3112,7 @@ static unsigned int ip6_mtu(const struct dst_entry *dst) return mtu - lwtunnel_headroom(dst->lwtstate, mtu); } +EXPORT_SYMBOL(ip6_mtu); /* MTU selection: * 1. mtu on route is locked - use it