From 6fc670e3b167d4e412e44f6fb909df0ad7ff0421 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Mon, 24 May 2010 05:12:05 -0400 Subject: [PATCH] Some operations and some info about TX. --- 15net/net | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/15net/net b/15net/net index 86d7e3f..0a3d403 100644 --- a/15net/net +++ b/15net/net @@ -29,6 +29,64 @@ * skb\\_reserve - only allowed for empty buffer, reserves headroom * skb\\_orphan - release it from its socket holder +# Network Device + +* include linux/netdevice.h +* struct net\\_device + - char name[] + - features + - stats + - netdev\\_ops + - ethtool\\_ops + - header\\_ops + - flags + - mtu + - type + - hard\\_header\\_len + +# Network Device Setup + +* alloc\\_netdev(szpriv, name, setup) +* setup function +* include linux/etherdevice.h +* ether\\_setup +* alloc\\_etherdev +* register\\_netdev +* unregister\\_netdev +* free\\_netdev + +# Network Device Operations + +* struct net\\_device\\_ops +* ndo\\_init +* ndo\\_open + - should call netif\\_start\\_queue +* ndo\\_stop + - should call netif\\_stop\\_queue + +# Network Device Address + +* struct net\\_device + - dev\\_addr +* random\\_ether\\_addr +* struct net\\_device\\_ops + - ndo\\_set\\_mac\\_address +* eth\\_mac\\_addr + +# Transmission + +* ndo\\_start\\_xmit +* called with a held lock + +# Limits on transmission + +* When TX buffers are full, xmit may call netif\\_stop\\_queue +* Should arrange to get netif\\_wake\\_queue called after TX buffers are free + again + +# Transmission timeout + +# NAPI # Changes in net device -- 2.20.1