netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3] net: #ifdef inet_bind_bucket::ib_net
@ 2008-11-13 23:21 Alexey Dobriyan
  2008-11-14  4:36 ` Eric Dumazet
  0 siblings, 1 reply; 12+ messages in thread
From: Alexey Dobriyan @ 2008-11-13 23:21 UTC (permalink / raw)
  To: dada1; +Cc: davem, netdev

> > Something is wrong with read_pnet() as nobody suggested to mass use it
> > or send a patch doing it.
>
> I did. My plan is to zap all superflous #ifdef CONFIG_NET_NS if possible.

That's not mass usage.

Mass usage is, say, s/dev_net/read_pnet/.

Do you want to do this too?

> How do you want to implement a C function that can write to ib->ib_net ?

I've sent ib_net_set().

> Take the time to read the patch, please.

You too.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH v3] net: #ifdef inet_bind_bucket::ib_net
@ 2008-11-13 22:53 Alexey Dobriyan
  2008-11-13 23:03 ` David Miller
  2008-11-13 23:09 ` Eric Dumazet
  0 siblings, 2 replies; 12+ messages in thread
From: Alexey Dobriyan @ 2008-11-13 22:53 UTC (permalink / raw)
  To: davem; +Cc: dada1, netdev

On Wed, Nov 12, 2008 at 04:24:23AM -0800, David Miller wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
> Date: Wed, 12 Nov 2008 15:24:48 +0300
>
> > +static inline void ib_net_set(struct inet_bind_bucket *ib, struct net *net)
> > +{
> > +#ifdef CONFIG_NET_NS
> > +   ib->ib_net = net;
> > +#endif
> > +}
> > +
>
> It's basically read_pnet() hidden behind another name.
> And you'll add new "aliases" for read_pnet() over and over
> again.
>
> That makes no sense to me.

It also make no sense to expose write_pnet() for one(!) user and
simultaneously hide read_pnet() under ib_net() as committed patches do.

Something is wrong with read_pnet() as nobody suggested to mass use it
or send a patch doing it.


        #ifdef CONFIG_NET_NS
                ib->ib_net = net;
        #endif

It's _obvious_ from this code that it's a C assignment or nop. It's also
obvious depending on what config option.

        write_pnet(&ib->ib_net, net);

What is & operator doing here? Is it important? '&' is syntaxic noise.

And netns assignments are exactly this: assigment or a nop.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH] net: introduce read_pnet() and write_pnet() functions
@ 2008-11-11  0:44 David Miller
  2008-11-11 11:08 ` [PATCH] net: #ifdef inet_bind_bucket::ib_net Alexey Dobriyan
  0 siblings, 1 reply; 12+ messages in thread
From: David Miller @ 2008-11-11  0:44 UTC (permalink / raw)
  To: adobriyan; +Cc: dada1, netdev, kaber


Eric, I'm going to let you and Alexey work out how to implement
this :-)

So for now I'll mark your patch as 'deferred' on patchwork.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-11-14  6:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13 23:21 [PATCH v3] net: #ifdef inet_bind_bucket::ib_net Alexey Dobriyan
2008-11-14  4:36 ` Eric Dumazet
2008-11-14  4:40   ` David Miller
2008-11-14  4:54     ` Eric Dumazet
2008-11-14  6:14       ` Alexey Dobriyan
2008-11-14  6:21         ` Eric Dumazet
2008-11-14  6:41           ` Alexey Dobriyan
  -- strict thread matches above, loose matches on Subject: below --
2008-11-13 22:53 Alexey Dobriyan
2008-11-13 23:03 ` David Miller
2008-11-13 23:09 ` Eric Dumazet
2008-11-11  0:44 [PATCH] net: introduce read_pnet() and write_pnet() functions David Miller
2008-11-11 11:08 ` [PATCH] net: #ifdef inet_bind_bucket::ib_net Alexey Dobriyan
2008-11-11 11:19   ` [PATCH v2] " Alexey Dobriyan
2008-11-12  0:45     ` David Miller
2008-11-12 10:44       ` Alexey Dobriyan
2008-11-12 10:50         ` Eric Dumazet
2008-11-12 12:24           ` [PATCH v3] " Alexey Dobriyan
2008-11-12 12:24             ` David Miller

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).