[netdevice] Add maximum packet length as a net device property

Currently this length is set at device allocation time, and is never
changed.
This commit is contained in:
Michael Brown
2008-10-16 05:11:47 +01:00
parent 64e5ca0582
commit 832668105e
4 changed files with 12 additions and 4 deletions
+4
View File
@@ -8,6 +8,9 @@
#include <gpxe/infiniband.h>
/** IPoIB packet length */
#define IPOIB_PKT_LEN 2048
/** IPoIB MAC address length */
#define IPOIB_ALEN 20
@@ -68,6 +71,7 @@ static inline struct net_device * alloc_ipoibdev ( size_t priv_size ) {
netdev = alloc_netdev ( priv_size );
if ( netdev ) {
netdev->ll_protocol = &ipoib_protocol;
netdev->max_pkt_len = IPOIB_PKT_LEN;
}
return netdev;
}