1. 09 4月, 2019 1 次提交
  2. 12 3月, 2019 1 次提交
  3. 28 2月, 2019 2 次提交
  4. 22 2月, 2019 4 次提交
  5. 13 2月, 2019 1 次提交
  6. 07 2月, 2019 1 次提交
  7. 18 1月, 2019 1 次提交
  8. 24 11月, 2018 3 次提交
    • P
      rocker, dsa, ethsw: Don't filter VLAN events on bridge itself · ab4a1686
      Petr Machata 提交于
      Due to an explicit check in rocker_world_port_obj_vlan_add(),
      dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects
      that are added to a device that is not a front-panel port device are
      ignored. Therefore this check is immaterial.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab4a1686
    • P
      switchdev: Replace port obj add/del SDO with a notification · d17d9f5e
      Petr Machata 提交于
      Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of
      this field from all clients, which were migrated to use switchdev
      notification in the previous patches.
      
      Add a new function switchdev_port_obj_notify() that sends the switchdev
      notifications SWITCHDEV_PORT_OBJ_ADD and _DEL.
      
      Update switchdev_port_obj_del_now() to dispatch to this new function.
      Drop __switchdev_port_obj_add() and update switchdev_port_obj_add()
      likewise.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d17d9f5e
    • P
      rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL · c6fa35b2
      Petr Machata 提交于
      Following patches will change the way of distributing port object
      changes from a switchdev operation to a switchdev notifier. The
      switchdev code currently recursively descends through layers of lower
      devices, eventually calling the op on a front-panel port device. The
      notifier will instead be sent referencing the bridge port device, which
      may be a stacking device that's one of front-panel ports uppers, or a
      completely unrelated device.
      
      rocker currently doesn't support any uppers other than bridge. Thus the
      only case that a stacked device could be validly referenced by port
      object notifications are bridge notifications for VLAN objects added to
      the bridge itself. But the driver explicitly rejects such notifications
      in rocker_world_port_obj_vlan_add(). It is therefore safe to assume that
      the only interesting case is that the notification is on a front-panel
      port netdevice.
      
      Subscribe to the blocking notifier chain. In the handler, filter out
      notifications on any foreign netdevices. Dispatch the new notifiers to
      rocker_port_obj_add() resp. _del() to maintain the behavior that the
      switchdev operation based code currently has.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6fa35b2
  9. 20 10月, 2018 1 次提交
  10. 18 10月, 2018 1 次提交
  11. 01 6月, 2018 1 次提交
  12. 11 5月, 2018 1 次提交
    • P
      rocker: Postpone filtering of !added_by_user FDB · ec9efb52
      Petr Machata 提交于
      Breaking out of the switch in rocker_switchdev_event() still ends up
      scheduling work, except an ill-defined one. This leads to an OOPS cited
      below. Fix by postponing the check until rocker_switchdev_event_work().
      
      [   23.148476] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
      [   23.148810] PGD 0 P4D 0
      [   23.148982] Oops: 0000 [#1] PREEMPT SMP PTI
      [   23.149190] Modules linked in: bridge stp llc iptable_nat nf_nat_ipv4 nf_nat e1000 rocker
      [   23.149768] CPU: 0 PID: 239 Comm: kworker/u2:4 Not tainted 4.17.0-rc3-net_next_queue-custom #6
      [   23.150298] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014
      [   23.150868] Workqueue: rocker rocker_switchdev_event_work [rocker]
      [   23.151258] RIP: 0010:ofdpa_port_fdb+0x7b/0x230 [rocker]
      [   23.151597] RSP: 0018:ffffc900004b3e18 EFLAGS: 00010246
      [   23.151952] RAX: 00000000fffbc68c RBX: 0000000000000000 RCX: 0000000000000000
      [   23.152363] RDX: 0000000000000010 RSI: ffff88003b4471e0 RDI: 00000000ffffffff
      [   23.152768] RBP: ffff88003b4471c0 R08: ffff88003b4471e0 R09: ffff88003b4471c0
      [   23.153141] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880036caf000
      [   23.153515] R13: 0000000000000000 R14: 0000000000000000 R15: ffff88003bc00000
      [   23.153919] FS:  0000000000000000(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
      [   23.154444] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   23.154806] CR2: 0000000000000000 CR3: 0000000036eb6000 CR4: 00000000000006f0
      [   23.155194] Call Trace:
      [   23.155472]  rocker_switchdev_event_work+0x9b/0xd0 [rocker]
      [   23.155850]  ? __schedule+0x231/0x700
      [   23.156175]  process_one_work+0x1cf/0x3e0
      [   23.156490]  worker_thread+0x26/0x3d0
      [   23.156795]  ? trace_event_raw_event_workqueue_execute_start+0x80/0x80
      [   23.157181]  kthread+0x10e/0x130
      [   23.157485]  ? kthread_create_worker_on_cpu+0x40/0x40
      [   23.157824]  ret_from_fork+0x35/0x40
      [   23.158174] Code: 00 00 c1 e8 02 4c 8d 45 20 bf ff ff ff ff 83 e0 01 4c 89 65 20 88 45 14 48 8b 05 21 da 1f e2 4c 89 c6 4c 89 44 24 10 48 89 45 18 <41> 8b 45 00 89 45 28 41 0f b7 45 04 66 89 45 2c 0f b7 44 24 04
      [   23.159346] RIP: ofdpa_port_fdb+0x7b/0x230 [rocker] RSP: ffffc900004b3e18
      [   23.159742] CR2: 0000000000000000
      [   23.160088] ---[ end trace f9b16d4cb6df0629 ]---
      
      Fixes: 816a3bed ("switchdev: Add fdb.added_by_user to switchdev notifications")
      Suggested-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec9efb52
  13. 04 5月, 2018 1 次提交
  14. 01 2月, 2018 1 次提交
  15. 04 8月, 2017 2 次提交
    • I
      rocker: Ignore address families other than IPv4 · d371ac1e
      Ido Schimmel 提交于
      As in previous patch, ignore IPv6 notifications since the driver doesn't
      support these.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d371ac1e
    • I
      net: core: Make the FIB notification chain generic · 04b1d4e5
      Ido Schimmel 提交于
      The FIB notification chain is currently soley used by IPv4 code.
      However, we're going to introduce IPv6 FIB offload support, which
      requires these notification as well.
      
      As explained in commit c3852ef7 ("ipv4: fib: Replay events when
      registering FIB notifier"), upon registration to the chain, the callee
      receives a full dump of the FIB tables and rules by traversing all the
      net namespaces. The integrity of the dump is ensured by a per-namespace
      sequence counter that is incremented whenever a change to the tables or
      rules occurs.
      
      In order to allow more address families to use the chain, each family is
      expected to register its fib_notifier_ops in its pernet init. These
      operations allow the common code to read the family's sequence counter
      as well as dump its tables and rules in the given net namespace.
      
      Additionally, a 'family' parameter is added to sent notifications, so
      that listeners could distinguish between the different families.
      
      Implement the common code that allows listeners to register to the chain
      and for address families to register their fib_notifier_ops. Subsequent
      patches will implement these operations in IPv6.
      
      In the future, ipmr and ip6mr will be extended to provide these
      notifications as well.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04b1d4e5
  16. 09 6月, 2017 5 次提交
  17. 17 3月, 2017 1 次提交
  18. 07 3月, 2017 1 次提交
  19. 31 1月, 2017 1 次提交
  20. 04 12月, 2016 4 次提交
  21. 30 10月, 2016 1 次提交
  22. 27 10月, 2016 1 次提交
  23. 18 10月, 2016 2 次提交
    • D
      rocker: Flip to the new dev walk API · cf2d6740
      David Ahern 提交于
      Convert rocker to the new dev walk API. This is just a code conversion;
      no functional change is intended.
      
      v2
      - removed typecast of data
      Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf2d6740
    • J
      ethernet: use core min/max MTU checking · 44770e11
      Jarod Wilson 提交于
      et131x: min_mtu 64, max_mtu 9216
      
      altera_tse: min_mtu 64, max_mtu 1500
      
      amd8111e: min_mtu 60, max_mtu 9000
      
      bnad: min_mtu 46, max_mtu 9000
      
      macb: min_mtu 68, max_mtu 1500 or 10240 depending on hardware capability
      
      xgmac: min_mtu 46, max_mtu 9000
      
      cxgb2: min_mtu 68, max_mtu 9582 (pm3393) or 9600 (vsc7326)
      
      enic: min_mtu 68, max_mtu 9000
      
      gianfar: min_mtu 50, max_mu 9586
      
      hns_enet: min_mtu 68, max_mtu 9578 (v1) or 9706 (v2)
      
      ksz884x: min_mtu 60, max_mtu 1894
      
      myri10ge: min_mtu 68, max_mtu 9000
      
      natsemi: min_mtu 64, max_mtu 2024
      
      nfp: min_mtu 68, max_mtu hardware-specific
      
      forcedeth: min_mtu 64, max_mtu 1500 or 9100, depending on hardware
      
      pch_gbe: min_mtu 46, max_mtu 10300
      
      pasemi_mac: min_mtu 64, max_mtu 9000
      
      qcaspi: min_mtu 46, max_mtu 1500
      - remove qcaspi_netdev_change_mtu as it is now redundant
      
      rocker: min_mtu 68, max_mtu 9000
      
      sxgbe: min_mtu 68, max_mtu 9000
      
      stmmac: min_mtu 46, max_mtu depends on hardware
      
      tehuti: min_mtu 60, max_mtu 16384
      - driver had no max mtu checking, but product docs say 16k jumbo packets
        are supported by the hardware
      
      netcp: min_mtu 68, max_mtu 9486
      - remove netcp_ndo_change_mtu as it is now redundant
      
      via-velocity: min_mtu 64, max_mtu 9000
      
      octeon: min_mtu 46, max_mtu 65370
      
      CC: netdev@vger.kernel.org
      CC: Mark Einon <mark.einon@gmail.com>
      CC: Vince Bridgers <vbridger@opensource.altera.com>
      CC: Rasesh Mody <rasesh.mody@qlogic.com>
      CC: Nicolas Ferre <nicolas.ferre@atmel.com>
      CC: Santosh Raspatur <santosh@chelsio.com>
      CC: Hariprasad S <hariprasad@chelsio.com>
      CC:  Christian Benvenuti <benve@cisco.com>
      CC: Sujith Sankar <ssujith@cisco.com>
      CC: Govindarajulu Varadarajan <_govind@gmx.com>
      CC: Neel Patel <neepatel@cisco.com>
      CC: Claudiu Manoil <claudiu.manoil@freescale.com>
      CC: Yisen Zhuang <yisen.zhuang@huawei.com>
      CC: Salil Mehta <salil.mehta@huawei.com>
      CC: Hyong-Youb Kim <hykim@myri.com>
      CC: Jakub Kicinski <jakub.kicinski@netronome.com>
      CC: Olof Johansson <olof@lixom.net>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Byungho An <bh74.an@samsung.com>
      CC: Girish K S <ks.giri@samsung.com>
      CC: Vipul Pandya <vipul.pandya@samsung.com>
      CC: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      CC: Alexandre Torgue <alexandre.torgue@st.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Wingman Kwok <w-kwok2@ti.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Francois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44770e11
  24. 28 9月, 2016 1 次提交
  25. 27 8月, 2016 1 次提交
    • I
      bridge: switchdev: Add forward mark support for stacked devices · 6bc506b4
      Ido Schimmel 提交于
      switchdev_port_fwd_mark_set() is used to set the 'offload_fwd_mark' of
      port netdevs so that packets being flooded by the device won't be
      flooded twice.
      
      It works by assigning a unique identifier (the ifindex of the first
      bridge port) to bridge ports sharing the same parent ID. This prevents
      packets from being flooded twice by the same switch, but will flood
      packets through bridge ports belonging to a different switch.
      
      This method is problematic when stacked devices are taken into account,
      such as VLANs. In such cases, a physical port netdev can have upper
      devices being members in two different bridges, thus requiring two
      different 'offload_fwd_mark's to be configured on the port netdev, which
      is impossible.
      
      The main problem is that packet and netdev marking is performed at the
      physical netdev level, whereas flooding occurs between bridge ports,
      which are not necessarily port netdevs.
      
      Instead, packet and netdev marking should really be done in the bridge
      driver with the switch driver only telling it which packets it already
      forwarded. The bridge driver will mark such packets using the mark
      assigned to the ingress bridge port and will prevent the packet from
      being forwarded through any bridge port sharing the same mark (i.e.
      having the same parent ID).
      
      Remove the current switchdev 'offload_fwd_mark' implementation and
      instead implement the proposed method. In addition, make rocker - the
      sole user of the mark - use the proposed method.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6bc506b4