Thread (128 messages) 128 messages, 16 authors, 2006-08-25

[RFC][PATCH 7/9] UML eth driver conversion

From: Peter Zijlstra <hidden>
Date: 2006-08-08 19:35:38
Also in: linux-mm, lkml

Update the driver to make use of the netdev_alloc_skb() API and the
NETIF_F_MEMALLOC feature.

Signed-off-by: Peter Zijlstra <redacted>
Signed-off-by: Daniel Phillips <redacted>

---
 arch/um/drivers/net_kern.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/um/drivers/net_kern.c
===================================================================
--- linux-2.6.orig/arch/um/drivers/net_kern.c
+++ linux-2.6/arch/um/drivers/net_kern.c
@@ -43,7 +43,7 @@ static int uml_net_rx(struct net_device 
 	struct sk_buff *skb;
 
 	/* If we can't allocate memory, try again next round. */
-	skb = dev_alloc_skb(dev->mtu);
+	skb = netdev_alloc_skb(dev, dev->mtu);
 	if (skb == NULL) {
 		lp->stats.rx_dropped++;
 		return 0;
@@ -377,6 +377,7 @@ static int eth_configure(int n, void *in
 	dev->ethtool_ops = &uml_net_ethtool_ops;
 	dev->watchdog_timeo = (HZ >> 1);
 	dev->irq = UM_ETH_IRQ;
+	dev->features |= NETIF_F_MEMALLOC;
 
 	rtnl_lock();
 	err = register_netdevice(dev);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help