Page MenuHomeFreeBSD

mlx5: remove dependency on ifnet specifics of linux/netdevice.h
ClosedPublic

Authored by bz on Mar 30 2021, 4:12 PM.

Details

Summary

Rename the last remaining bits depending on ifnet from linux/netdevice.h
instead of using the compat macros. This helps clearing up
struct netdevice being struct ifnet from linux/netdevice.h.

Sponsored-by: The FreeBSD Foundation
MFC-after: 2 weeks
Reviewed-by: ...
Differential Revision:

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bz requested review of this revision.Mar 30 2021, 4:12 PM
sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
110

Is the call to netdev_notifier_info_to_dev() still OK?

bz retitled this revision from mlx5: remove dependency on linux/netdevice.h to mlx5: remove dependency on ifnet specifics of linux/netdevice.h.Mar 30 2021, 5:47 PM
bz edited the summary of this revision. (Show Details)
sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
110

Good catch. Yes it is. Though we should leave the explicit netdevice.h include for that.
I should also update the description as obviously what I checked for (and did) doesn't match it.

Explicitly include linux/netdevice.h for netdev_notifier_info_to_dev() and
related functions which are no longer "struct net_device is struct ifnet"
dependent and so valid use.

bz marked an inline comment as done.Mar 30 2021, 5:52 PM

Looks good. Wait for Konstantin to approve aswell.

This revision is now accepted and ready to land.Mar 30 2021, 5:57 PM

Looks good. Wait for Konstantin to approve aswell.

Ok, will wait for @kib .