[netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocol
IPoIB has a link-layer broadcast address that varies according to the partition key. We currently go through several contortions to pretend that the link-layer address is a fixed constant; by making the broadcast address a property of the network device rather than the link-layer protocol it will be possible to simplify IPoIB's broadcast handling.
This commit is contained in:
@@ -10,28 +10,8 @@
|
||||
FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gpxe/netdevice.h>
|
||||
#include <gpxe/if_ether.h>
|
||||
|
||||
extern struct ll_protocol ethernet_protocol;
|
||||
|
||||
extern const char * eth_ntoa ( const void *ll_addr );
|
||||
|
||||
/**
|
||||
* Allocate Ethernet device
|
||||
*
|
||||
* @v priv_size Size of driver private data
|
||||
* @ret netdev Network device, or NULL
|
||||
*/
|
||||
static inline struct net_device * alloc_etherdev ( size_t priv_size ) {
|
||||
struct net_device *netdev;
|
||||
|
||||
netdev = alloc_netdev ( priv_size );
|
||||
if ( netdev ) {
|
||||
netdev->ll_protocol = ðernet_protocol;
|
||||
netdev->max_pkt_len = ETH_FRAME_LEN;
|
||||
}
|
||||
return netdev;
|
||||
}
|
||||
extern struct net_device * alloc_etherdev ( size_t priv_size );
|
||||
|
||||
#endif /* _GPXE_ETHERNET_H */
|
||||
|
||||
Reference in New Issue
Block a user