Browse Source

[netdevice] Do not force a poll on net_tx()

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>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
947976da0c
1 changed files with 0 additions and 7 deletions
  1. 0
    7
      src/net/netdevice.c

+ 0
- 7
src/net/netdevice.c View File

672
 	struct ll_protocol *ll_protocol = netdev->ll_protocol;
672
 	struct ll_protocol *ll_protocol = netdev->ll_protocol;
673
 	int rc;
673
 	int rc;
674
 
674
 
675
-	/* Force a poll on the netdevice to (potentially) clear any
676
-	 * backed-up TX completions.  This is needed on some network
677
-	 * devices to avoid excessive losses due to small TX ring
678
-	 * sizes.
679
-	 */
680
-	netdev_poll ( netdev );
681
-
682
 	/* Add link-layer header */
675
 	/* Add link-layer header */
683
 	if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, ll_source,
676
 	if ( ( rc = ll_protocol->push ( netdev, iobuf, ll_dest, ll_source,
684
 					net_protocol->net_proto ) ) != 0 ) {
677
 					net_protocol->net_proto ) ) != 0 ) {

Loading…
Cancel
Save