lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Jul 2007 09:10:41 +0100
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	vinay ravuri <vinaynyc@...oo.com>
Cc:	netdev@...r.kernel.org
Subject: Re: Socket Buffers and Memory Managment

On Wed, 18 Jul 2007 23:51:03 -0700 (PDT)
vinay ravuri <vinaynyc@...oo.com> wrote:

> How about the following approach:
> 
> I allocate an skb of 0 bytes and replace data element
> of skb struct (i.e. skb.data = addr_given_by_hw) when
> the h/w interrupts me with a packet.  I register for a
> destructor for this skb and when the kernel is ready
> to free the skb, I make sure that my free is invoked -
> Ofcourse this is assuming that their is a facility in
> linux socket buffers to be able to do destructors.  Is
> this approach a viable, if so, are any gottcha's?
> 
> -Vinay

You need to use frag list for that since upper layers expect to
be able to use that data area for normal use, ie bridging/routing, etc.
Also access to data area would be non-cached so you want to make
sure it is only accessed once.

But how will you handle a slow receiver where all the skb's end up
staying queued. Won't you exhaust your packet memory.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ