From: Sabrina Dubroca <sd@queasysnail.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, sbrivio@redhat.com
Subject: Re: [PATCH net] ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu
Date: Mon, 12 Mar 2018 17:05:28 +0100 [thread overview]
Message-ID: <20180312160528.GA30326@bistromath.localdomain> (raw)
In-Reply-To: <20180309.160619.741646019216536916.davem@davemloft.net>
2018-03-09, 16:06:19 -0500, David Miller wrote:
> From: Sabrina Dubroca <sd@queasysnail.net>
> Date: Fri, 9 Mar 2018 17:43:21 +0100
>
> > diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> > index f80524396c06..77d0a78cf7d2 100644
> > --- a/include/net/ip_fib.h
> > +++ b/include/net/ip_fib.h
> > @@ -59,6 +59,7 @@ struct fib_nh_exception {
> > int fnhe_genid;
> > __be32 fnhe_daddr;
> > u32 fnhe_pmtu;
> > + bool fnhe_mtu_locked;
> > __be32 fnhe_gw;
> > unsigned long fnhe_expires;
> > struct rtable __rcu *fnhe_rth_input;
> > diff --git a/include/net/route.h b/include/net/route.h
> > index 1eb9ce470e25..729bb5e61e9a 100644
> > --- a/include/net/route.h
> > +++ b/include/net/route.h
> > @@ -64,6 +64,7 @@ struct rtable {
> >
> > /* Miscellaneous cached information */
> > u32 rt_pmtu;
> > + bool rt_mtu_locked;
> >
> > u32 rt_table_id;
> >
>
> Please use a flag bit for this, we've worked hard to shrink these
> datastructures as much as possible.
Oops, sorry.
> I think if you just choose an unused RTCF_* bit (f.e. 0x02000000) for
> the state, you can use that because values propagate into the
> rtable->rt_flags, and do not propagate out. So you should be able to
> use it in this way privately inside the kernel.
What about a bitfield?
- u32 rt_pmtu;
+ u32 rt_mtu_locked:1,
+ rt_pmtu:31;
Since it's going to be private to the kernel, I'd rather not use a
value that's in uapi, especially considering that they're almost all
used (unless we start recycling).
--
Sabrina
next prev parent reply other threads:[~2018-03-12 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 16:43 [PATCH net] ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu Sabrina Dubroca
2018-03-09 21:06 ` David Miller
2018-03-12 16:05 ` Sabrina Dubroca [this message]
2018-03-12 16:27 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180312160528.GA30326@bistromath.localdomain \
--to=sd@queasysnail.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).