13 Feb, 2019

3 commits

  • [ Upstream commit 17ab4f61b8cd6f9c38e9d0b935d86d73b5d0d2b5 ]

    The unbalance of master's promiscuity or allmulti will happen after ifdown
    and ifup a slave interface which is in a bridge.

    When we ifdown a slave interface , both the 'dsa_slave_close' and
    'dsa_slave_change_rx_flags' will clear the master's flags. The flags
    of master will be decrease twice.
    In the other hand, if we ifup the slave interface again, since the
    slave's flags were cleared the 'dsa_slave_open' won't set the master's
    flag, only 'dsa_slave_change_rx_flags' that triggered by 'br_add_if'
    will set the master's flags. The flags of master is increase once.

    Only propagating flag changes when a slave interface is up makes
    sure this does not happen. The 'vlan_dev_change_rx_flags' had the
    same problem and was fixed, and changes here follows that fix.

    Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support")
    Signed-off-by: Rundong Ge
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Rundong Ge
     
  • [ Upstream commit 00670cb8a73b10b10d3c40f045c15411715e4465 ]

    This function can't succeed if dp->pl is NULL. It will Oops inside the
    call to return phylink_ethtool_get_eee(dp->pl, e);

    Fixes: 1be52e97ed3e ("dsa: slave: eee: Allow ports to use phylink")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Florian Fainelli
    Reviewed-by: Vivien Didelot
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • [ Upstream commit c8101f7729daee251f4f6505f9d135ec08e1342f ]

    Creating a macvtap on a DSA-backed interface results in the following
    splat when lockdep is enabled:

    [ 19.638080] IPv6: ADDRCONF(NETDEV_CHANGE): lan0: link becomes ready
    [ 23.041198] device lan0 entered promiscuous mode
    [ 23.043445] device eth0 entered promiscuous mode
    [ 23.049255]
    [ 23.049557] ============================================
    [ 23.055021] WARNING: possible recursive locking detected
    [ 23.060490] 5.0.0-rc3-00013-g56c857a1b8d3 #118 Not tainted
    [ 23.066132] --------------------------------------------
    [ 23.071598] ip/2861 is trying to acquire lock:
    [ 23.076171] 00000000f61990cb (_xmit_ETHER){+...}, at: dev_set_rx_mode+0x1c/0x38
    [ 23.083693]
    [ 23.083693] but task is already holding lock:
    [ 23.089696] 00000000ecf0c3b4 (_xmit_ETHER){+...}, at: dev_uc_add+0x24/0x70
    [ 23.096774]
    [ 23.096774] other info that might help us debug this:
    [ 23.103494] Possible unsafe locking scenario:
    [ 23.103494]
    [ 23.109584] CPU0
    [ 23.112093] ----
    [ 23.114601] lock(_xmit_ETHER);
    [ 23.117917] lock(_xmit_ETHER);
    [ 23.121233]
    [ 23.121233] *** DEADLOCK ***
    [ 23.121233]
    [ 23.127325] May be due to missing lock nesting notation
    [ 23.127325]
    [ 23.134315] 2 locks held by ip/2861:
    [ 23.137987] #0: 000000003b766c72 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x338/0x4e0
    [ 23.146231] #1: 00000000ecf0c3b4 (_xmit_ETHER){+...}, at: dev_uc_add+0x24/0x70
    [ 23.153757]
    [ 23.153757] stack backtrace:
    [ 23.158243] CPU: 0 PID: 2861 Comm: ip Not tainted 5.0.0-rc3-00013-g56c857a1b8d3 #118
    [ 23.166212] Hardware name: Globalscale Marvell ESPRESSOBin Board (DT)
    [ 23.172843] Call trace:
    [ 23.175358] dump_backtrace+0x0/0x188
    [ 23.179116] show_stack+0x14/0x20
    [ 23.182524] dump_stack+0xb4/0xec
    [ 23.185928] __lock_acquire+0x123c/0x1860
    [ 23.190048] lock_acquire+0xc8/0x248
    [ 23.193724] _raw_spin_lock_bh+0x40/0x58
    [ 23.197755] dev_set_rx_mode+0x1c/0x38
    [ 23.201607] dev_set_promiscuity+0x3c/0x50
    [ 23.205820] dsa_slave_change_rx_flags+0x5c/0x70
    [ 23.210567] __dev_set_promiscuity+0x148/0x1e0
    [ 23.215136] __dev_set_rx_mode+0x74/0x98
    [ 23.219167] dev_uc_add+0x54/0x70
    [ 23.222575] macvlan_open+0x170/0x1d0
    [ 23.226336] __dev_open+0xe0/0x160
    [ 23.229830] __dev_change_flags+0x16c/0x1b8
    [ 23.234132] dev_change_flags+0x20/0x60
    [ 23.238074] do_setlink+0x2d0/0xc50
    [ 23.241658] __rtnl_newlink+0x5f8/0x6e8
    [ 23.245601] rtnl_newlink+0x50/0x78
    [ 23.249184] rtnetlink_rcv_msg+0x360/0x4e0
    [ 23.253397] netlink_rcv_skb+0xe8/0x130
    [ 23.257338] rtnetlink_rcv+0x14/0x20
    [ 23.261012] netlink_unicast+0x190/0x210
    [ 23.265043] netlink_sendmsg+0x288/0x350
    [ 23.269075] sock_sendmsg+0x18/0x30
    [ 23.272659] ___sys_sendmsg+0x29c/0x2c8
    [ 23.276602] __sys_sendmsg+0x60/0xb8
    [ 23.280276] __arm64_sys_sendmsg+0x1c/0x28
    [ 23.284488] el0_svc_common+0xd8/0x138
    [ 23.288340] el0_svc_handler+0x24/0x80
    [ 23.292192] el0_svc+0x8/0xc

    This looks fairly harmless (no actual deadlock occurs), and is
    fixed in a similar way to c6894dec8ea9 ("bridge: fix lockdep
    addr_list_lock false positive splat") by putting the addr_list_lock
    in its own lockdep class.

    Signed-off-by: Marc Zyngier
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Marc Zyngier
     

28 Aug, 2018

1 commit

  • Commit 52638f71fcff ("dsa: Move gpio reset into switch driver")
    moved the GPIO handling into the switch drivers but forgot
    to remove the GPIO header includes.

    Signed-off-by: Linus Walleij
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Linus Walleij
     

22 Aug, 2018

1 commit

  • After commit 90b73b77d08e, list_head is no longer needed.
    Now we just need to convert the list iteration to array
    iteration for drivers.

    Fixes: 90b73b77d08e ("net: sched: change action API to use array of pointers to actions")
    Cc: Jiri Pirko
    Cc: Vlad Buslov
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

10 Aug, 2018

1 commit


09 Aug, 2018

1 commit

  • For a port to be able to use EEE, both the MAC and the PHY must
    support EEE. A phy can be provided by both a phydev or phylink. Verify
    at least one of these exist, not just phydev.

    Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK support")
    Signed-off-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Andrew Lunn
     

03 Aug, 2018

1 commit


02 Aug, 2018

1 commit


19 Jul, 2018

1 commit

  • We avoid 2 VLAs by using a pre-allocated field in dsa_switch. We also
    try to avoid dynamic allocation whenever possible (when using fewer than
    bits-per-long ports, which is the common case).

    Link: http://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
    Link: http://lkml.kernel.org/r/20180505185145.GB32630@lunn.ch
    Signed-off-by: Salvatore Mesoraca
    [kees: tweak commit subject and message slightly]
    Signed-off-by: Kees Cook
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Salvatore Mesoraca
     

26 Jun, 2018

1 commit

  • Pass the extact struct from a tc qdisc add to the block bind function and,
    in turn, to the setup_tc ndo of binding device via the tc_block_offload
    struct. Pass this back to any block callback registrations to allow
    netlink logging of fails in the bind process.

    Signed-off-by: John Hurley
    Signed-off-by: Jakub Kicinski
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    John Hurley
     

12 Jun, 2018

1 commit


01 Jun, 2018

1 commit

  • A follow-up patch enables emitting VLAN notifications for the bridge CPU
    port in addition to the existing slave port notifications. These
    notifications have orig_dev set to the bridge in question.

    Because there's no specific support for these VLANs, just ignore the
    notifications to maintain the current behavior.

    Signed-off-by: Petr Machata
    Reviewed-by: Vivien Didelot
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Petr Machata
     

22 May, 2018

1 commit

  • S390 bpf_jit.S is removed in net-next and had changes in 'net',
    since that code isn't used any more take the removal.

    TLS data structures split the TX and RX components in 'net-next',
    put the new struct members from the bug fix in 'net' into the RX
    part.

    The 'net-next' tree had some reworking of how the ERSPAN code works in
    the GRE tunneling code, overlapping with a one-line headroom
    calculation fix in 'net'.

    Overlapping changes in __sock_map_ctx_update_elem(), keep the bits
    that read the prog members via READ_ONCE() into local variables
    before using them.

    Signed-off-by: David S. Miller

    David S. Miller
     

20 May, 2018

1 commit


19 May, 2018

1 commit

  • Even if commit 1d27732f411d ("net: dsa: setup and teardown ports") indicated
    that registering a devlink instance for unused ports is not a problem, and this
    is true, this can be confusing nonetheless, so let's not do it.

    Fixes: 1d27732f411d ("net: dsa: setup and teardown ports")
    Reported-by: Jiri Pirko
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

12 May, 2018

3 commits

  • Add support for PHYLINK within the DSA subsystem in order to support more
    complex devices such as pluggable (SFP) and non-pluggable (SFF) modules, 10G
    PHYs, and traditional PHYs. Using PHYLINK allows us to drop some amount of
    complexity we had while probing fixed and non-fixed PHYs using Device Tree.

    Because PHYLINK separates the Ethernet MAC/port configuration into different
    stages, we let switch drivers implement those, and for now, we maintain
    functionality by calling dsa_slave_adjust_link() during
    phylink_mac_link_{up,down} which provides semantically equivalent steps.

    Drivers willing to take advantage of PHYLINK should implement the phylink_mac_*
    operations that DSA wraps.

    We cannot quite remove the adjust_link() callback just yet, because a number of
    drivers rely on that for configuring their "CPU" and "DSA" ports, this is done
    dsa_port_setup_phy_of() and dsa_port_fixed_link_register_of() still.

    Drivers that utilize fixed links for user-facing ports (e.g: bcm_sf2) will need
    to implement phylink_mac_ops from now on to preserve functionality, since PHYLINK
    *does not* create a phy_device instance for fixed links.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • Since we use PHYLIB to manage the per-port link indication, this will
    also be reflected correctly in the network device's carrier state, so we
    can use ethtool_op_get_link() instead.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • In preparation for adding support for PHYLINK within DSA, define a number of
    operations that we will need and that switch drivers can start implementing.
    Proper integration with PHYLINK will follow in subsequent patches.

    We start selecting PHYLINK (which implies PHYLIB) in net/dsa/Kconfig
    such that drivers can be guaranteed that this dependency is properly
    taken care of and can start referencing PHYLINK helper functions without
    requiring stubs or anything.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

11 May, 2018

1 commit

  • Commit 161d82de1ff8 ("net: bridge: Notify about !added_by_user FDB
    entries") causes the below oops when bringing up a slave interface,
    because dsa_port_fdb_add is still scheduled, but with a NULL address.

    To fix this, keep the dsa_slave_switchdev_event function agnostic of the
    notified info structure and handle the added_by_user flag in the
    specific dsa_slave_switchdev_event_work function.

    [ 75.512263] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [ 75.519063] pgd = (ptrval)
    [ 75.520545] [00000000] *pgd=00000000
    [ 75.522839] Internal error: Oops: 17 [#1] ARM
    [ 75.525898] Modules linked in:
    [ 75.527673] CPU: 0 PID: 9 Comm: kworker/u2:1 Not tainted 4.17.0-rc2 #78
    [ 75.532988] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
    [ 75.538153] Workqueue: dsa_ordered dsa_slave_switchdev_event_work
    [ 75.542970] PC is at mv88e6xxx_port_db_load_purge+0x60/0x1b0
    [ 75.547341] LR is at mdiobus_read_nested+0x6c/0x78
    [ 75.550833] pc : [] lr : [] psr: 60070013
    [ 75.555796] sp : 9f54bd78 ip : 9f54bd87 fp : 9f54bddc
    [ 75.559719] r10: 00000000 r9 : 0000000e r8 : 9f6a6010
    [ 75.563643] r7 : 00000000 r6 : 81203048 r5 : 9f6a6010 r4 : 9f6a601c
    [ 75.568867] r3 : 00000000 r2 : 00000000 r1 : 0000000d r0 : 00000000
    [ 75.574094] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 75.579933] Control: 10c53c7d Table: 9de20059 DAC: 00000051
    [ 75.584384] Process kworker/u2:1 (pid: 9, stack limit = 0x(ptrval))
    [ 75.589349] Stack: (0x9f54bd78 to 0x9f54c000)
    [ 75.592406] bd60: 00000000 00000000
    [ 75.599295] bd80: 00000391 9f299d10 9f299d68 8014317c 9f7f0000 8120af00 00006dc2 00000000
    [ 75.606186] bda0: 8120af00 00000000 9f54bdec 1c9f5d92 8014317c 9f6a601c 9f6a6010 00000000
    [ 75.613076] bdc0: 00000000 00000000 9dd1141c 8125a0b4 9f54be0c 9f54bde0 804cd8a8 804cd56c
    [ 75.619966] bde0: 0000000e 80143680 00000001 9dce9c1c 81203048 9dce9c10 00000003 00000000
    [ 75.626858] be00: 9f54be5c 9f54be10 806abcac 804cd864 9f54be54 80143664 8014317c 80143054
    [ 75.633748] be20: ffcaa81d 00000000 812030b0 1c9f5d92 00000000 81203048 9f54beb4 00000003
    [ 75.640639] be40: ffffffff 00000000 9dd1141c 8125a0b4 9f54be84 9f54be60 80138e98 806abb18
    [ 75.647529] be60: 81203048 9ddc4000 9dce9c54 9f72a300 00000000 00000000 9f54be9c 9f54be88
    [ 75.654420] be80: 801390bc 80138e50 00000000 9dce9c54 9f54beac 9f54bea0 806a9524 801390a0
    [ 75.661310] bea0: 9f54bedc 9f54beb0 806a9c7c 806a950c 9f54becc 00000000 00000000 00000000
    [ 75.668201] bec0: 9f540000 1c9f5d92 805fe604 9ddffc00 9f54befc 9f54bee0 806ab228 806a9c38
    [ 75.675092] bee0: 806ab178 9ddffc00 9f4c1900 9f40d200 9f54bf34 9f54bf00 80131e30 806ab184
    [ 75.681983] bf00: 9f40d214 9f54a038 9f40d200 9f40d200 9f4c1918 812119a0 9f40d214 9f54a038
    [ 75.688873] bf20: 9f40d200 9f4c1900 9f54bf7c 9f54bf38 80132124 80131d1c 9f5f2dd8 00000000
    [ 75.695764] bf40: 812119a0 9f54a038 812119a0 81259c5b 9f5f2dd8 9f5f2dc0 9f53dbc0 00000000
    [ 75.702655] bf60: 9f4c1900 801320b4 9f5f2dd8 9f4f7e88 9f54bfac 9f54bf80 80137ad0 801320c0
    [ 75.709544] bf80: 9f54a000 9f53dbc0 801379a0 00000000 00000000 00000000 00000000 00000000
    [ 75.716434] bfa0: 00000000 9f54bfb0 801010e8 801379ac 00000000 00000000 00000000 00000000
    [ 75.723324] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 75.730206] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
    [ 75.737083] Backtrace:
    [ 75.738252] [] (mv88e6xxx_port_db_load_purge) from [] (mv88e6xxx_port_fdb_add+0x50/0x68)
    [ 75.746795] r10:8125a0b4 r9:9dd1141c r8:00000000 r7:00000000 r6:00000000 r5:9f6a6010
    [ 75.753323] r4:9f6a601c
    [ 75.754570] [] (mv88e6xxx_port_fdb_add) from [] (dsa_switch_event+0x1a0/0x660)
    [ 75.762238] r8:00000000 r7:00000003 r6:9dce9c10 r5:81203048 r4:9dce9c1c
    [ 75.767655] [] (dsa_switch_event) from [] (notifier_call_chain+0x54/0x94)
    [ 75.774893] r10:8125a0b4 r9:9dd1141c r8:00000000 r7:ffffffff r6:00000003 r5:9f54beb4
    [ 75.781423] r4:81203048
    [ 75.782672] [] (notifier_call_chain) from [] (raw_notifier_call_chain+0x28/0x30)
    [ 75.790514] r9:00000000 r8:00000000 r7:9f72a300 r6:9dce9c54 r5:9ddc4000 r4:81203048
    [ 75.796982] [] (raw_notifier_call_chain) from [] (dsa_port_notify+0x24/0x38)
    [ 75.804483] [] (dsa_port_notify) from [] (dsa_port_fdb_add+0x50/0x6c)
    [ 75.811371] [] (dsa_port_fdb_add) from [] (dsa_slave_switchdev_event_work+0xb0/0x10c)
    [ 75.819635] r4:9ddffc00
    [ 75.820885] [] (dsa_slave_switchdev_event_work) from [] (process_one_work+0x120/0x3a4)
    [ 75.829241] r6:9f40d200 r5:9f4c1900 r4:9ddffc00 r3:806ab178
    [ 75.833612] [] (process_one_work) from [] (worker_thread+0x70/0x574)
    [ 75.840415] r10:9f4c1900 r9:9f40d200 r8:9f54a038 r7:9f40d214 r6:812119a0 r5:9f4c1918
    [ 75.846945] r4:9f40d200
    [ 75.848191] [] (worker_thread) from [] (kthread+0x130/0x160)
    [ 75.854300] r10:9f4f7e88 r9:9f5f2dd8 r8:801320b4 r7:9f4c1900 r6:00000000 r5:9f53dbc0
    [ 75.860830] r4:9f5f2dc0
    [ 75.862076] [] (kthread) from [] (ret_from_fork+0x14/0x2c)
    [ 75.867999] Exception stack(0x9f54bfb0 to 0x9f54bff8)
    [ 75.871753] bfa0: 00000000 00000000 00000000 00000000
    [ 75.878640] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [ 75.885519] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
    [ 75.890844] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:801379a0
    [ 75.897377] r4:9f53dbc0 r3:9f54a000
    [ 75.899663] Code: e3a02000 e3a03000 e14b26f4 e24bc055 (e5973000)
    [ 75.904575] ---[ end trace fbca818a124dbf0d ]---

    Fixes: 816a3bed9549 ("switchdev: Add fdb.added_by_user to switchdev notifications")
    Signed-off-by: Vivien Didelot
    Reviewed-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Vivien Didelot
     

04 May, 2018

1 commit

  • The following patch enables sending notifications also for events on FDB
    entries that weren't added by the user. Give the drivers the information
    necessary to distinguish between the two origins of FDB entries.

    To maintain the current behavior, have switchdev-implementing drivers
    bail out on notifications about non-user-added FDB entries. In case of
    mlxsw driver, allow a call to mlxsw_sp_span_respin() so that SPAN over
    bridge catches up with the changed FDB.

    Signed-off-by: Petr Machata
    Reviewed-by: Nikolay Aleksandrov
    Acked-by: Ivan Vecera
    Signed-off-by: David S. Miller

    Petr Machata
     

27 Apr, 2018

4 commits


08 Apr, 2018

1 commit

  • The Marvell switches under some conditions will pass a frame to the
    host with the port being the CPU port. Such frames are invalid, and
    should be dropped. Not dropping them can result in a crash when
    incrementing the receive statistics for an invalid port.

    Reported-by: Chris Healy
    Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support")
    Signed-off-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Andrew Lunn
     

23 Mar, 2018

1 commit

  • Fun set of conflict resolutions here...

    For the mac80211 stuff, these were fortunately just parallel
    adds. Trivially resolved.

    In drivers/net/phy/phy.c we had a bug fix in 'net' that moved the
    function phy_disable_interrupts() earlier in the file, whilst in
    'net-next' the phy_error() call from this function was removed.

    In net/ipv4/xfrm4_policy.c, David Ahern's changes to remove the
    'rt_table_id' member of rtable collided with a bug fix in 'net' that
    added a new struct member "rt_mtu_locked" which needs to be copied
    over here.

    The mlxsw driver conflict consisted of net-next separating
    the span code and definitions into separate files, whilst
    a 'net' bug fix made some changes to that moved code.

    The mlx5 infiniband conflict resolution was quite non-trivial,
    the RDMA tree's merge commit was used as a guide here, and
    here are their notes:

    ====================

    Due to bug fixes found by the syzkaller bot and taken into the for-rc
    branch after development for the 4.17 merge window had already started
    being taken into the for-next branch, there were fairly non-trivial
    merge issues that would need to be resolved between the for-rc branch
    and the for-next branch. This merge resolves those conflicts and
    provides a unified base upon which ongoing development for 4.17 can
    be based.

    Conflicts:
    drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f9524
    (IB/mlx5: Fix cleanup order on unload) added to for-rc and
    commit b5ca15ad7e61 (IB/mlx5: Add proper representors support)
    add as part of the devel cycle both needed to modify the
    init/de-init functions used by mlx5. To support the new
    representors, the new functions added by the cleanup patch
    needed to be made non-static, and the init/de-init list
    added by the representors patch needed to be modified to
    match the init/de-init list changes made by the cleanup
    patch.
    Updates:
    drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function
    prototypes added by representors patch to reflect new function
    names as changed by cleanup patch
    drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init
    stage list to match new order from cleanup patch
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

13 Mar, 2018

1 commit

  • During the conversion to dsa_is_user_port(), a condition ended up being
    reversed, which would prevent the creation of any user port when using
    the legacy binding and/or platform data, fix that.

    Fixes: 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere")
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

05 Mar, 2018

1 commit

  • By passing the port, we allow different ports to have different
    statistics. This is useful since some ports have SERDES interfaces
    with their own statistic counters.

    Signed-off-by: Andrew Lunn
    Tested-by: Florian Fainelli
    Reviewed-by: Vivien Didelot
    Signed-off-by: David S. Miller

    Andrew Lunn
     

15 Feb, 2018

2 commits

  • Forward the rx/tx timestamp machinery from the dsa infrastructure to the
    switch driver.

    On the rx side, defer delivery of skbs until we have an rx timestamp.
    This mimicks the behavior of skb_defer_rx_timestamp.

    On the tx side, identify PTP packets, clone them, and pass them to the
    underlying switch driver before we transmit. This mimicks the behavior
    of skb_tx_timestamp.

    Adjusted txstamp API to keep the allocation and freeing of the clone
    in the same central function by Richard Cochran

    Signed-off-by: Brandon Streiff
    Signed-off-by: Richard Cochran
    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Brandon Streiff
     
  • This patch adds support to the dsa slave network device so that
    switch drivers can implement the SIOC[GS]HWTSTAMP ioctls and the
    ethtool timestamp-info interface.

    Signed-off-by: Brandon Streiff
    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Brandon Streiff
     

24 Jan, 2018

1 commit

  • This adds support for enabling the internal PHY for a 'cpu' port.
    It has been tested on GE B850v3, B650v3 and B450v3, which have a
    built-in MV88E6240 switch hardwired to a PCIe based network card.
    On these machines the internal PHY of the i210 network card and
    the Marvell switch are connected to each other and must be enabled
    for properly using the switch. While the i210 PHY will be enabled
    when the network interface is enabled, the switch's port is not
    exposed as network interface. Additionally the mv88e6xxx driver
    resets the chip during probe, so the PHY is disabled without this
    patch.

    Signed-off-by: Sebastian Reichel
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Sebastian Reichel
     

06 Jan, 2018

1 commit

  • Instead of having the different master network device drivers
    potentially used by DSA/Broadcom tags, move the padding necessary for
    the switches to accept short packets where it makes most sense: within
    tag_brcm.c. This avoids multiplying the number of similar commits to
    e.g: bgmac, bcmsysport, etc.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

03 Jan, 2018

1 commit

  • We need to make the dsa_legacy_register() stub return 0 in order for
    dsa_init_module() to successfully register and continue registering the
    ETH_P_XDSA packet handler.

    Fixes: 2a93c1a3651f ("net: dsa: Allow compiling out legacy support")
    Reported-by: Egil Hjelmeland
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

17 Dec, 2017

1 commit


15 Dec, 2017

1 commit

  • In order to let MT7530 switch can recognize well those egress packets
    having both special tag and VLAN tag, the information about the special
    tag should be carried on the existing VLAN tag. On the other hand, it's
    unnecessary for extra handling for ingress packets when VLAN tag is
    present since it is able to put the VLAN tag after the special tag and
    then follow the existing way to parse.

    Signed-off-by: Sean Wang
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Sean Wang
     

14 Dec, 2017

1 commit

  • These duplicate includes have been found with scripts/checkincludes.pl but
    they have been removed manually to avoid removing false positives.

    Signed-off-by: Pravin Shedge
    Acked-by: Pablo Neira Ayuso
    Signed-off-by: David S. Miller

    Pravin Shedge
     

08 Dec, 2017

1 commit

  • Introduce a configuration option: CONFIG_NET_DSA_LEGACY allowing to compile out
    support for the old platform device and Device Tree binding registration.
    Support for these configurations is scheduled to be removed in 4.17.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     

07 Dec, 2017

1 commit

  • tcfm_dev always points to the correct netdev and we already
    hold a refcnt, so no need to use tcfm_ifindex to lookup again.

    If we would support moving target netdev across netns, using
    pointer would be better than ifindex.

    This also fixes dumping obsolete ifindex, now after the
    target device is gone we just dump 0 as ifindex.

    Cc: Jiri Pirko
    Cc: Jamal Hadi Salim
    Signed-off-by: Cong Wang
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Cong Wang
     

06 Dec, 2017

1 commit