1. 29 11月, 2018 7 次提交
  2. 28 11月, 2018 14 次提交
  3. 26 11月, 2018 1 次提交
  4. 25 11月, 2018 2 次提交
  5. 24 11月, 2018 16 次提交
    • A
      net: gemini: Fix copy/paste error · 07093b76
      Andreas Fiedler 提交于
      The TX stats should be started with the tx_stats_syncp,
      there seems to be a copy/paste error in the driver.
      Signed-off-by: NAndreas Fiedler <andreas.fiedler@gmx.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07093b76
    • L
      net: thunderx: set tso_hdrs pointer to NULL in nicvf_free_snd_queue · ef2a7cf1
      Lorenzo Bianconi 提交于
      Reset snd_queue tso_hdrs pointer to NULL in nicvf_free_snd_queue routine
      since it is used to check if tso dma descriptor queue has been previously
      allocated. The issue can be triggered with the following reproducer:
      
      $ip link set dev enP2p1s0v0 xdpdrv obj xdp_dummy.o
      $ip link set dev enP2p1s0v0 xdpdrv off
      
      [  341.467649] WARNING: CPU: 74 PID: 2158 at mm/vmalloc.c:1511 __vunmap+0x98/0xe0
      [  341.515010] Hardware name: GIGABYTE H270-T70/MT70-HD0, BIOS T49 02/02/2018
      [  341.521874] pstate: 60400005 (nZCv daif +PAN -UAO)
      [  341.526654] pc : __vunmap+0x98/0xe0
      [  341.530132] lr : __vunmap+0x98/0xe0
      [  341.533609] sp : ffff00001c5db860
      [  341.536913] x29: ffff00001c5db860 x28: 0000000000020000
      [  341.542214] x27: ffff810feb5090b0 x26: ffff000017e57000
      [  341.547515] x25: 0000000000000000 x24: 00000000fbd00000
      [  341.552816] x23: 0000000000000000 x22: ffff810feb5090b0
      [  341.558117] x21: 0000000000000000 x20: 0000000000000000
      [  341.563418] x19: ffff000017e57000 x18: 0000000000000000
      [  341.568719] x17: 0000000000000000 x16: 0000000000000000
      [  341.574020] x15: 0000000000000010 x14: ffffffffffffffff
      [  341.579321] x13: ffff00008985eb27 x12: ffff00000985eb2f
      [  341.584622] x11: ffff0000096b3000 x10: ffff00001c5db510
      [  341.589923] x9 : 00000000ffffffd0 x8 : ffff0000086868e8
      [  341.595224] x7 : 3430303030303030 x6 : 00000000000006ef
      [  341.600525] x5 : 00000000003fffff x4 : 0000000000000000
      [  341.605825] x3 : 0000000000000000 x2 : ffffffffffffffff
      [  341.611126] x1 : ffff0000096b3728 x0 : 0000000000000038
      [  341.616428] Call trace:
      [  341.618866]  __vunmap+0x98/0xe0
      [  341.621997]  vunmap+0x3c/0x50
      [  341.624961]  arch_dma_free+0x68/0xa0
      [  341.628534]  dma_direct_free+0x50/0x80
      [  341.632285]  nicvf_free_resources+0x160/0x2d8 [nicvf]
      [  341.637327]  nicvf_config_data_transfer+0x174/0x5e8 [nicvf]
      [  341.642890]  nicvf_stop+0x298/0x340 [nicvf]
      [  341.647066]  __dev_close_many+0x9c/0x108
      [  341.650977]  dev_close_many+0xa4/0x158
      [  341.654720]  rollback_registered_many+0x140/0x530
      [  341.659414]  rollback_registered+0x54/0x80
      [  341.663499]  unregister_netdevice_queue+0x9c/0xe8
      [  341.668192]  unregister_netdev+0x28/0x38
      [  341.672106]  nicvf_remove+0xa4/0xa8 [nicvf]
      [  341.676280]  nicvf_shutdown+0x20/0x30 [nicvf]
      [  341.680630]  pci_device_shutdown+0x44/0x88
      [  341.684720]  device_shutdown+0x144/0x250
      [  341.688640]  kernel_restart_prepare+0x44/0x50
      [  341.692986]  kernel_restart+0x20/0x68
      [  341.696638]  __se_sys_reboot+0x210/0x238
      [  341.700550]  __arm64_sys_reboot+0x24/0x30
      [  341.704555]  el0_svc_handler+0x94/0x110
      [  341.708382]  el0_svc+0x8/0xc
      [  341.711252] ---[ end trace 3f4019c8439959c9 ]---
      [  341.715874] page:ffff7e0003ef4000 count:0 mapcount:0 mapping:0000000000000000 index:0x4
      [  341.723872] flags: 0x1fffe000000000()
      [  341.727527] raw: 001fffe000000000 ffff7e0003f1a008 ffff7e0003ef4048 0000000000000000
      [  341.735263] raw: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
      [  341.742994] page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
      
      where xdp_dummy.c is a simple bpf program that forwards the incoming
      frames to the network stack (available here:
      https://github.com/altoor/xdp_walkthrough_examples/blob/master/sample_1/xdp_dummy.c)
      
      Fixes: 05c773f5 ("net: thunderx: Add basic XDP support")
      Fixes: 4863dea3 ("net: Adding support for Cavium ThunderX network controller")
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef2a7cf1
    • 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
      ocelot: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL · 0e332c85
      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.
      
      Dispatch the new events to ocelot_port_obj_add() resp. _del() to
      maintain the same behavior that the switchdev operation based code
      currently has. Pass through switchdev_handle_port_obj_add() / _del() to
      handle the recursive descend, because Ocelot supports LAG uppers.
      
      Register to the new switchdev blocking notifier chain to get the new
      events when they start getting distributed.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e332c85
    • P
      mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL · 52a227b3
      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.
      
      To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking
      notifier chain. Dispatch to mlxsw_sp_port_obj_add() resp. _del() to
      maintain the behavior that the switchdev operation based code currently
      has. Defer to switchdev_handle_port_obj_add() / _del() to handle the
      recursive descend, because mlxsw supports a number of upper types.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52a227b3
    • 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
    • H
      r8169: replace macro TX_FRAGS_READY_FOR with a function · 76085c9e
      Heiner Kallweit 提交于
      Replace macro TX_FRAGS_READY_FOR with function rtl_tx_slots_avail
      to make code cleaner and type-safe.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76085c9e
    • H
      r8169: use napi_consume_skb where possible · 5317d5c6
      Heiner Kallweit 提交于
      Use napi_consume_skb() where possible to profit from
      bulk free infrastructure.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5317d5c6
    • H
      r8169: simplify detecting chip versions with same XID · 45f1996f
      Heiner Kallweit 提交于
      For the GMII chip versions we set the version number which was set
      already. This can be simplified.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45f1996f
    • H
      r8169: remove default chip versions · b4cc2dcc
      Heiner Kallweit 提交于
      Even the chip versions within a family have so many differences that
      using a default chip version doesn't really make sense. Instead
      of leaving a best case flaky network connectivity, bail out and
      report the unknown chip version.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4cc2dcc
    • H
      r8169: remove ancient GCC bug workaround in a second place · 734c1409
      Heiner Kallweit 提交于
      Remove ancient GCC bug workaround in a second place and factor out
      rtl_8169_get_txd_opts1.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      734c1409
    • L
      net: hns3: Add "qos buffer" config info query function · 7d9d7f88
      liuzhongzhu 提交于
      This patch prints qos buffer config information.
      
      debugfs command:
      echo dump qos buf cfg > cmd
      
      Sample Command:
      root@(none)# echo dump qos buf cfg > cmd
      hns3 0000:7d:00.0: dump qos buf cfg
      hns3 0000:7d:00.0: tx_packet_buf_tc_0: 0x1aa
      hns3 0000:7d:00.0: tx_packet_buf_tc_1: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_2: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_3: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_4: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_5: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_6: 0x0
      hns3 0000:7d:00.0: tx_packet_buf_tc_7: 0x0
      hns3 0000:7d:00.0:
      hns3 0000:7d:00.0: rx_packet_buf_tc_0: 0x130
      hns3 0000:7d:00.0: rx_packet_buf_tc_1: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_2: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_3: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_4: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_5: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_6: 0x0
      hns3 0000:7d:00.0: rx_packet_buf_tc_7: 0x0
      hns3 0000:7d:00.0: rx_share_buf: 0x1e0e
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d9d7f88
    • L
      net: hns3: Add "qos prio map" info query function · 6fc22440
      liuzhongzhu 提交于
      This patch prints qos priority map information.
      
      debugfs command:
      echo dump qos pri map > cmd
      
      Sample Command:
      root@(none)# echo dump qos pri map > cmd
      hns3 0000:7d:00.0: dump qos pri map
      hns3 0000:7d:00.0: vlan_to_pri: 0x0
      hns3 0000:7d:00.0: pri_0_to_tc: 0x0
      hns3 0000:7d:00.0: pri_1_to_tc: 0x0
      hns3 0000:7d:00.0: pri_2_to_tc: 0x0
      hns3 0000:7d:00.0: pri_3_to_tc: 0x0
      hns3 0000:7d:00.0: pri_4_to_tc: 0x0
      hns3 0000:7d:00.0: pri_5_to_tc: 0x0
      hns3 0000:7d:00.0: pri_6_to_tc: 0x0
      hns3 0000:7d:00.0: pri_7_to_tc: 0x0
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fc22440
    • L
      net: hns3: Add "qos pause" config info query function · d958919d
      liuzhongzhu 提交于
      This patch prints qos pause config information.
      
      debugfs command:
      echo dump qos pause cfg > cmd
      
      Sample Command:
      root@(none)# echo dump qos pause cfg > cmd
      hns3 0000:7d:00.0: dump qos pause cfg
      hns3 0000:7d:00.0: pause_trans_gap: 0xff
      hns3 0000:7d:00.0: pause_trans_time: 0xffff
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d958919d
    • L
      net: hns3: Add "tm config" info query function · 96227f4c
      liuzhongzhu 提交于
      This patch prints Transmit Module's Traffic sched
      related config information.
      
      debugfs command:
      echo dump tm > cmd
      
      Sample output:
      root@(none)# echo dump tm > cmd
      hns3 0000:7d:00.0: dump tm
      hns3 0000:7d:00.0: PG_TO_PRI gp_id: 0
      hns3 0000:7d:00.0: PG_TO_PRI map: 0x1
      hns3 0000:7d:00.0: QS_TO_PRI qs_id: 0
      hns3 0000:7d:00.0: QS_TO_PRI priority: 0
      hns3 0000:7d:00.0: QS_TO_PRI link_vld: 1
      hns3 0000:7d:00.0: NQ_TO_QS nq_id: 0
      hns3 0000:7d:00.0: NQ_TO_QS qset_id: 1024
      hns3 0000:7d:00.0: PG pg_id: 0
      hns3 0000:7d:00.0: PG dwrr: 100
      hns3 0000:7d:00.0: QS qs_id: 0
      hns3 0000:7d:00.0: QS dwrr: 100
      hns3 0000:7d:00.0: PRI pri_id: 0
      hns3 0000:7d:00.0: PRI dwrr: 100
      hns3 0000:7d:00.0: PRI_C pri_id: 0
      hns3 0000:7d:00.0: PRI_C pri_shapping: 0x2850000
      hns3 0000:7d:00.0: PRI_P pri_id: 0
      hns3 0000:7d:00.0: PRI_P pri_shapping: 0x2850796
      hns3 0000:7d:00.0: PG_C pg_id: 0
      hns3 0000:7d:00.0: PG_C pg_shapping: 0x2850000
      hns3 0000:7d:00.0: PG_P pg_id: 0
      hns3 0000:7d:00.0: PG_P pg_shapping: 0x2850496
      hns3 0000:7d:00.0: PORT port_shapping: 0x2850296
      hns3 0000:7d:00.0: PG_SCH pg_id: 0
      hns3 0000:7d:00.0: PRI_SCH pg_id: 0
      hns3 0000:7d:00.0: QS_SCH pg_id: 0
      hns3 0000:7d:00.0: BP_TO_QSET pg_id: 0
      hns3 0000:7d:00.0: BP_TO_QSET pg_shapping: 0x0
      hns3 0000:7d:00.0: BP_TO_QSET qs_bit_map: 0x0
      root@(none)#
      Signed-off-by: Nliuzhongzhu <liuzhongzhu@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96227f4c