aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorBreno Leitao <[email protected]>2024-06-26 17:35:02 +0000
committerJakub Kicinski <[email protected]>2024-06-27 23:55:34 +0000
commit94833addfaba89d12e5dbd82e350a692c00648ab (patch)
tree9fcd0195e1b25e4ca5f74663e5ac534f5debb45d /drivers/net/ethernet/intel/ice/ice_main.c
parentRevert "net: micro-optimize skb_datagram_iter" (diff)
downloadkernel-94833addfaba89d12e5dbd82e350a692c00648ab.tar.gz
kernel-94833addfaba89d12e5dbd82e350a692c00648ab.zip
net: thunderx: Unembed netdev structure
Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_devices from struct lmac by converting them into pointers, and allocating them dynamically. Use the leverage alloc_netdev() to allocate the net_device object at bgx_lmac_enable(). The free of the device occurs at bgx_lmac_disable(). Do not free_netdevice() if bgx_lmac_enable() fails after lmac->netdev is allocated, since bgx_lmac_disable() is called if bgx_lmac_enable() fails, and lmac->netdev will be freed there (similarly to lmac->dmacs). Link: https://lore.kernel.org/all/[email protected]/ [1] Signed-off-by: Breno Leitao <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
0 files changed, 0 insertions, 0 deletions