]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[netdevice] Do not force a poll on net_tx()
authorMichael Brown <mcb30@ipxe.org>
Wed, 24 Oct 2012 20:26:51 +0000 (13:26 -0700)
committerMichael Brown <mcb30@ipxe.org>
Wed, 24 Oct 2012 21:04:41 +0000 (14:04 -0700)
Including a netdev_poll() within net_tx() can cause the net_step()
loop to end up processing hundreds or thousands of packets within a
single step, since each received packet being processed may trigger a
response which, in turn causes a poll for further received packets.

Network devices must now ensure that the TX ring is at least as large
as the RX ring, in order to avoid running out of TX descriptors.  This
should not cause any problems; unlike the RX ring, there is no
substantial memory cost incurred by increasing the TX ring size.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/netdevice.c

index 5a4d8635b2e32be2fe8e8e2d60cb30349c633f0e..bea067521565ed8a3967f1077f9be0820078cc29 100644 (file)
@@ -672,13 +672,6 @@ int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
        struct ll_protocol *ll_protocol = netdev->ll_protocol;
        int rc;
 
-       /* Force a poll on the netdevice to (potentially) clear any
-        * backed-up TX completions.  This is needed on some network
-        * devices to avoid excessive losses due to small TX ring
-        * sizes.
-        */
-       netdev_poll ( netdev );
-
        /* Add link-layer header */
        if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, ll_source,
                                        net_protocol->net_proto ) ) != 0 ) {