[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:
@@ -144,8 +144,6 @@ struct ll_protocol {
|
||||
uint8_t ll_addr_len;
|
||||
/** Link-layer header length */
|
||||
uint8_t ll_header_len;
|
||||
/** Link-layer broadcast address */
|
||||
const uint8_t *ll_broadcast;
|
||||
};
|
||||
|
||||
/** Network device operations */
|
||||
@@ -261,6 +259,8 @@ struct net_device {
|
||||
* For Ethernet, this is the MAC address.
|
||||
*/
|
||||
uint8_t ll_addr[MAX_LL_ADDR_LEN];
|
||||
/** Link-layer broadcast address */
|
||||
const uint8_t *ll_broadcast;
|
||||
|
||||
/** Current device state
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user