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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080411.105413.34923074.davem@davemloft.net>
Date:	Fri, 11 Apr 2008 10:54:13 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	kaber@...sh.net
Cc:	viro@...IV.linux.org.uk, Brian_Oostenbrink@...-sierra.com,
	linux-net@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: Re-queueing of skb in vlan_skb_recv

From: Patrick McHardy <kaber@...sh.net>
Date: Fri, 11 Apr 2008 15:02:06 +0200

> Al Viro wrote:
> > On Fri, Apr 11, 2008 at 02:46:35PM +0200, Patrick McHardy wrote:
> >> Brian Oostenbrink wrote:
> >>> In vlan_skb_recv, packets are generally stripped of their vlan header,
> >>> and then re-queued via netif_rx().  Is there a reason for re-queuing
> >>> these instead of calling netif_receive_skb() directly?  On our system
> >>> (an embedded linux router), this re-queuing has a significant
> >>> performance penalty.
> >> Its done to save stack space. There's currently a discussion
> >> about making loopback use netif_receive_skb in case enough
> >> stack is still available. Once that patch gets merged I'll
> >> change VLAN in a similar way.
> > 
> > Another possibility would be to allow ->func() of packet_type to return an
> > skb for reprocessing...
> 
> That should work fine for VLAN, but not for loopback since its
> called on the TX path. I think I prefer Eric's suggested way
> because it doesn't require to change all the other existing
> packet_type users.

I think Al's idea is the most elegant proposed so far and we could do
something similar on the TX side as well.

Yes, it means diddling with a lot of call sites, but we do that all
the time and it's heaps better then these "check the stack space
remaining" hacks being proposed.
--
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