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-next>] [day] [month] [year] [list]
Date:	Fri, 10 Jan 2014 20:05:39 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	John Fastabend <john.r.fastabend@...el.com>,
	"David S. Miller" <davem@...emloft.net>
CC:	Neil Horman <nhorman@...driver.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	netdev <netdev@...r.kernel.org>
Subject: Layer 2 acceleration vs GSO

What happens when an skb to be sent through ndo_dfwd_start_xmit()
requires software GSO?

dev_hard_start_xmit() will segment it and then submit each segment, and
then:

> gso:
> 	do {
[...]
> 		if (accel_priv)
> 			rc = ops->ndo_dfwd_start_xmit(nskb, dev, accel_priv);
> 		else
> 			rc = ops->ndo_start_xmit(nskb, dev);
> 		trace_net_dev_xmit(nskb, rc, dev, skb_len);
[...]
> 		txq_trans_update(txq);

Oops, txq is NULL.  And once we add the obvious condition to that,

> 		if (unlikely(netif_xmit_stopped(txq) && skb->next))
> 			return NETDEV_TX_BUSY;

How can we tell if the hardware transmit queue filled up?

It seems like this feature currently relies on the driver returning
NETDEV_TX_BUSY when the TX queue is already full, like ixgbe does.  But
that is exactly what drivers are *not* supposed to do.

Ben.

> 	} while (skb->next);

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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