lkml.org 
[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND net-next 1/2] br_netfilter: add struct netns_brnf
On Thu, Jun 06, 2019 at 05:19:39PM +0200, Christian Brauner wrote:
> On Thu, Jun 06, 2019 at 08:14:40AM -0700, Stephen Hemminger wrote:
> > On Thu, 6 Jun 2019 13:41:41 +0200
> > Christian Brauner <christian@brauner.io> wrote:
> >
> > > +struct netns_brnf {
> > > +#ifdef CONFIG_SYSCTL
> > > + struct ctl_table_header *ctl_hdr;
> > > +#endif
> > > +
> > > + /* default value is 1 */
> > > + int call_iptables;
> > > + int call_ip6tables;
> > > + int call_arptables;
> > > +
> > > + /* default value is 0 */
> > > + int filter_vlan_tagged;
> > > + int filter_pppoe_tagged;
> > > + int pass_vlan_indev;
> > > +};
> >
> > Do you really need to waste four bytes for each
> > flag value. If you use a u8 that would work just as well.
>
> I think we had discussed something like this but the problem why we
> can't do this stems from how the sysctl-table stuff is implemented.
> I distinctly remember that it couldn't be done with a flag due to that.

Could you define a pernet_operations object? I mean, define the id and size
fields, then pass it to register_pernet_subsys() for registration.
Similar to what we do in net/ipv4/netfilter/ipt_CLUSTER.c, see
clusterip_net_ops and clusterip_pernet() for instance.

\
 
 \ /
  Last update: 2019-06-06 18:31    [W:0.060 / U:1.396 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site