Skip to contentSkip to conversation

Modules with list

DISCUSSION Adam J. Richter 1 participant 1 message Nov 27, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 7 lines
Quoted 3 lines

TCP for example, sets the destructor function for the skb. It can be called an arbitrary time later. Netfilter modules do a similar thing, for similar reasons. You'd better grab a reference to *something*.

	The ->remove() function of a network device driver will

not return until it has freed all receive skb's that it allocated and all transmit skb's that were passed to its transmit function.

I'm not talking about a device driver, but modularizing the IPv4 stack.

	I don't see skb->destructor being set in net/ipv4 (although I

see it in other net/ subdirectories). Anyhow, I don't see why ipv4 would need to increment or decrement a module reference count every time a packet is sent or received. It should suffice to do so when a file descriptor is opened or closed and when a network connection is created or completely forgotten (if that does not necessarily happen before the close system call returns).

Adam J. Richter     __     ______________   575 Oroville Road
[email protected]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America

"Free Software For The Rest Of Us."