netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dynamically allocated dst_ops
@ 2008-10-30  4:22 Alexey Dobriyan
  2008-10-30  5:36 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2008-10-30  4:22 UTC (permalink / raw)
  To: netdev, containers

They are bogus and should be implanted into struct net directly.
In garbage collector hook, just use container_of() (once) to get struct net.
->dst_net is useless after that.

I'm going to use this trick for xfrm.

And if someone has ideas on how to overcome header difficulties, please,
submit a patch.

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

* dynamically allocated dst_ops
@ 2008-10-30  4:26 Alexey Dobriyan
  2008-10-31 13:34 ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2008-10-30  4:26 UTC (permalink / raw)
  To: netdev, containers; +Cc: benjamin.thery, dlezcano

They are bogus and should be implanted into struct net directly.
In garbage collector hook, just use container_of() (once) to get struct net.
->dst_net is useless after that.

I'm going to use this trick for xfrm.

And if someone has ideas on how to overcome header difficulties, please,
submit a patch.

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

* Re: dynamically allocated dst_ops
  2008-10-30  4:22 Alexey Dobriyan
@ 2008-10-30  5:36 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-10-30  5:36 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev, containers

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Thu, 30 Oct 2008 07:22:41 +0300

> They are bogus and should be implanted into struct net directly.
> In garbage collector hook, just use container_of() (once) to get struct net.
> ->dst_net is useless after that.
> 
> I'm going to use this trick for xfrm.

This sounds good to me :)

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

* Re: dynamically allocated dst_ops
  2008-10-30  4:26 dynamically allocated dst_ops Alexey Dobriyan
@ 2008-10-31 13:34 ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2008-10-31 13:34 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: netdev, containers, benjamin.thery

Alexey Dobriyan wrote:
> They are bogus and should be implanted into struct net directly.

Why they are bogus ?

> In garbage collector hook, just use container_of() (once) to get struct net.
> ->dst_net is useless after that.

Yep, that looks like a better solution.

> I'm going to use this trick for xfrm.
> 
> And if someone has ideas on how to overcome header difficulties, please,
> submit a patch.


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

end of thread, other threads:[~2008-10-31 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30  4:26 dynamically allocated dst_ops Alexey Dobriyan
2008-10-31 13:34 ` Daniel Lezcano
  -- strict thread matches above, loose matches on Subject: below --
2008-10-30  4:22 Alexey Dobriyan
2008-10-30  5:36 ` 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).