skb destructor enhancement idea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello linux-net,

It seems like there's a need for a consistent method of reliably getting a callback
when an skb is destructed. So far, it seems like this functionality has just been
sort of hacked into the skb for each module that needs it (sock, netfilter).

Rather than hack in another callback for our own purposes and changing code
everywhere to make sure it gets called, we're thinking we should create a generic
system that replaces sk_buff.destructor with a pointer to some sort of 'destructor'
structure. This structure could be allocated out of a free pool and contain a stack
of pointers to people who want callbacks, allowing for an ordered and consistent
chain of events on destruction (hopefully without too much additional overhead).

We could then load our network module (doing some packet intercepting stuff between
dev and the protocols) and easily set up for callbacks on destruction packets we
deem interesting.

Anyway, we're playing with the idea... Seems like this could also be a move in the
right direction for driver writers who could benefit by managing their own memory
somewhat (though we don't have enough experience with drivers or specifics of skb
allocation to know for sure who else this could benefit).

Comments? Does this violate some 'larger vision' for the stack that we're not
seeing?


-- 
-Will  :: AD6XL :: http://tyranny.egregious.net/~will/
 Orton :: finger will@tyranny.egregious.net for GPG public key
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux