Procházet zdrojové kódy

Force a netdevice poll in net_tx() before attempting to transmit

packet, to work around the problem whereby small TX rings get backed
up because we haven't yet poll()ed for TX completions.
tags/v0.9.3
Michael Brown před 17 roky
rodič
revize
9ac0377fbb
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 8
    0
      src/net/netdevice.c

+ 8
- 0
src/net/netdevice.c Zobrazit soubor

@@ -424,6 +424,14 @@ struct net_device * find_netdev_by_location ( unsigned int bus_type,
424 424
  */
425 425
 int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
426 426
 	     struct net_protocol *net_protocol, const void *ll_dest ) {
427
+
428
+	/* Force a poll on the netdevice to (potentially) clear any
429
+	 * backed-up TX completions.  This is needed on some network
430
+	 * devices to avoid excessive losses due to small TX ring
431
+	 * sizes.
432
+	 */
433
+	netdev_poll ( netdev );
434
+
427 435
 	return netdev->ll_protocol->tx ( iobuf, netdev, net_protocol, ll_dest );
428 436
 }
429 437
 

Načítá se…
Zrušit
Uložit