Thread (46 messages) 46 messages, 4 authors, 2005-01-26

Re: [RFC 2.6.10 5/22] xfrm: Attempt to offload bundled xfrm_states for outbound xfrms

From: David Dillow <dave@thedillows.org>
Date: 2005-01-22 05:53:01

On Fri, 2005-01-21 at 15:20 -0800, David S. Miller wrote: 
On Thu, 30 Dec 2004 03:48:35 -0500
David Dillow [off-list ref] wrote:
quoted
+static void xfrm_accel_bundle(struct dst_entry *dst)
+{
+	struct xfrm_bundle_list bundle, *xbl, *tmp;
+	struct net_device *dev = dst->dev;
+	INIT_LIST_HEAD(&bundle.node);
+
+	if (dev && netif_running(dev) && (dev->features & NETIF_F_IPSEC)) {
netif_running() is only steady while the RTNL semaphore is held,
which is not necessarily true when xfrm_lookup() is invoked.
I've been reworking this area already to add the ability for the user to
control which devices/states combinations can be offloaded, so this code
will change. What do you think about just having the driver be
responsible for ignoring offload requests when they don't make sense,
like when the device is down, or in sleep mode?

BTW, xfrm_lookup() also calls stale_bundle(), which also relies on
netif_running(), among other tests.
-- 
David Dillow [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help