• Roi Dayan's avatar
    net/mlx5e: Properly get the PF number phys port name ndo · 5b33eba9
    Roi Dayan authored
    Currently, we fail to retrieve the PF number in some cases (e.g
    single ported cards, lag capability), this further results in a
    call trace issued by the rtnetlink code, since the error value
    is not -EOPNOTSUPP. Change the implementation to be independent
    from the lag code and function properly on both two ports and
    single ported cards.
    
    Call Trace:
    
    [  194.525057] mlx5_core 0000:82:00.0: mlx5_lag_get_pf_num:605:(pid 837): no lag device, can't get pf num
    [  194.525804] WARNING: CPU: 7 PID: 837 at net/core/rtnetlink.c:3457 rtmsg_ifinfo_build_skb+0x131/0x160
    [  194.529952] CPU: 7 PID: 837 Comm: kworker/7:3 Tainted: G        W  O      5.0.0-rc7+ #3
    [  194.531307] Workqueue: events linkwatch_event
    [  194.531697] RIP: 0010:rtmsg_ifinfo_build_skb+0x131/0x160
    [  194.545007] Call Trace:
    [  194.545406]  rtmsg_ifinfo_event.part.29+0x1b/0xb0
    [  194.545810]  rtmsg_ifinfo+0x51/0x80
    [  194.546209]  netdev_state_change+0xc7/0x110
    [  194.546608]  ? dev_valid_name+0x1b0/0x1b0
    [  194.547010]  ? __local_bh_enable_ip+0xef/0x1d0
    [  194.547411]  ? lockdep_hardirqs_on+0x3ea/0x560
    [  194.547811]  ? linkwatch_do_dev+0x9b/0x100
    [  194.548207]  linkwatch_do_dev+0x9b/0x100
    [  194.548605]  __linkwatch_run_queue+0x244/0x430
    [  194.549014]  ? linkwatch_schedule_work+0x100/0x100
    [  194.549412]  ? lock_acquire+0x10f/0x2d0
    [  194.549816]  linkwatch_event+0x3f/0x50
    [  194.550212]  process_one_work+0x7d3/0x1460
    
    Fixes: c12ecc23 ("net/mlx5e: Move to use common phys port names for vport representors")
    Signed-off-by: default avatarRoi Dayan <roid@mellanox.com>
    Acked-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    5b33eba9
en_rep.c 50.5 KB