1. 11 11月, 2017 2 次提交
  2. 10 11月, 2017 3 次提交
  3. 09 11月, 2017 9 次提交
    • G
      net/mlx5e: CHECKSUM_COMPLETE offload for VLAN/QinQ packets · f938daee
      Gal Pressman 提交于
      When the VLAN tag is present in the packet buffer (i.e VLAN stripping disabled, QinQ)
      the driver will currently report CHECKSUM_UNNECESSARY.
      Instead of using CHECKSUM_COMPLETE offload for packets with first
      ethertype of IPv4/6, use it for packets with last ethertype of IPv4/6 to
      cover the former cases as well.
      
      The checksum field present in the CQE is calculated from the IP header
      until the end of the packet. When the first ethertype is different than
      IPv4/6 (for ex. 802.1Q VLAN) a checksum of the VLAN header/s should be
      added. The small header/s checksum calculation will allow us to use
      CHECKSUM_COMPLETE instead of CHECKSUM_UNNECESSARY.
      
      Testing bandwidth of one and 8 TCP streams to a single RQ,
      LRO and VLAN stripping offloads disabled:
      CPU: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
      NIC: Mellanox Technologies MT27710 Family [ConnectX-4 Lx]
      
      Before:
      +--------------+--------------------+---------------------+----------------------+
      | Traffic type | 1 Stream BW [Mbps] | 8 Streams BW [Mbps] |   Checksum offload   |
      +--------------+--------------------+---------------------+----------------------+
      | Untagged     |          28,247.35 |           24,716.88 | CHECKSUM_COMPLETE    |
      | VLAN         |          27,516.69 |           23,752.26 | CHECKSUM_UNNECESSARY |
      | QinQ         |           6,961.30 |           20,667.04 | CHECKSUM_UNNECESSARY |
      +--------------+--------------------+---------------------+----------------------+
      
      Now:
      +--------------+--------------------+---------------------+-------------------+
      | Traffic type | 1 Stream BW [Mbps] | 8 Streams BW [Mbps] | Checksum offload  |
      +--------------+--------------------+---------------------+-------------------+
      | Untagged     |          28,521.28 |           24,926.32 | CHECKSUM_COMPLETE |
      | VLAN         |          27,389.37 |           23,715.34 | CHECKSUM_COMPLETE |
      | QinQ         |           6,901.77 |           20,845.73 | CHECKSUM_COMPLETE |
      +--------------+--------------------+---------------------+-------------------+
      
      No performance degradation observed.
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      f938daee
    • G
      net/mlx5e: Add VLAN offloads statistics · f24686e8
      Gal Pressman 提交于
      The following counters are now exposed through ethtool -S:
      rx[i]_removed_vlan_packets (per channel)
      rx_removed_vlan_packets
      tx[i]_added_vlan_packets (per channel)
      tx_added_vlan_packets
      
      rx_removed_vlan_packets: The number of packets that had their
      outer VLAN header stripped to the CQE by the hardware.
      tx_added_vlan_packets: The number of packets that had their
      outer VLAN header inserted by the hardware.
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      f24686e8
    • G
      net/mlx5e: Add 802.1ad VLAN insertion support · 4382c7b9
      Gal Pressman 提交于
      Report VLAN insertion support for S-tagged packets and add support by
      choosing the correct VLAN type in the WQE.
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      4382c7b9
    • G
      net/mlx5e: Add 802.1ad VLAN filter steering rules · 7d92d580
      Gal Pressman 提交于
      When a user chooses to use 802.1ad VLAN the proper steering rules will
      be added to the VLAN flow table (matching the specific S-tag VID).
      Due to current hardware limitation, when using 802.1ad, we must disable
      C-tag VLAN stripping on the RQs.
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      7d92d580
    • G
      net/mlx5e: Declare bitmap using kernel macro · 03eda954
      Gal Pressman 提交于
      Replace explicit declaration of bitmap with DECLARE_BITMAP kernel macro.
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      03eda954
    • G
      net/mlx5e: Add rollback on add VLAN failure · 355368d5
      Gal Pressman 提交于
      When add VLAN rule fails the active vlan bit should be cleared.
      
      Fixes: afb736e9 ("net/mlx5: Ethernet resource handling files")
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      355368d5
    • G
      net/mlx5e: Rename VLAN related variables and functions · 2b52a283
      Gal Pressman 提交于
      Rename VLAN related symbols to better reflect the fact that they
      are associated to C-tag VLAN.
      Signed-off-by: NGal Pressman <galp@mellanox.com>
      Reviewed-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      2b52a283
    • A
      net: usb: asix: fill null-ptr-deref in asix_suspend · 8f562462
      Andrey Konovalov 提交于
      When asix_suspend() is called dev->driver_priv might not have been
      assigned a value, so we need to check that it's not NULL.
      
      Similar issue is present in asix_resume(), this patch fixes it as well.
      
      Found by syzkaller.
      
      kasan: CONFIG_KASAN_INLINE enabled
      kasan: GPF could be caused by NULL-ptr deref or user memory access
      general protection fault: 0000 [#1] PREEMPT SMP KASAN
      Modules linked in:
      CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc4-43422-geccacdd69a8c #400
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
      Workqueue: usb_hub_wq hub_event
      task: ffff88006bb36300 task.stack: ffff88006bba8000
      RIP: 0010:asix_suspend+0x76/0xc0 drivers/net/usb/asix_devices.c:629
      RSP: 0018:ffff88006bbae718 EFLAGS: 00010202
      RAX: dffffc0000000000 RBX: ffff880061ba3b80 RCX: 1ffff1000c34d644
      RDX: 0000000000000001 RSI: 0000000000000402 RDI: 0000000000000008
      RBP: ffff88006bbae738 R08: 1ffff1000d775cad R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800630a8b40
      R13: 0000000000000000 R14: 0000000000000402 R15: ffff880061ba3b80
      FS:  0000000000000000(0000) GS:ffff88006c600000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007ff33cf89000 CR3: 0000000061c0a000 CR4: 00000000000006f0
      Call Trace:
       usb_suspend_interface drivers/usb/core/driver.c:1209
       usb_suspend_both+0x27f/0x7e0 drivers/usb/core/driver.c:1314
       usb_runtime_suspend+0x41/0x120 drivers/usb/core/driver.c:1852
       __rpm_callback+0x339/0xb60 drivers/base/power/runtime.c:334
       rpm_callback+0x106/0x220 drivers/base/power/runtime.c:461
       rpm_suspend+0x465/0x1980 drivers/base/power/runtime.c:596
       __pm_runtime_suspend+0x11e/0x230 drivers/base/power/runtime.c:1009
       pm_runtime_put_sync_autosuspend ./include/linux/pm_runtime.h:251
       usb_new_device+0xa37/0x1020 drivers/usb/core/hub.c:2487
       hub_port_connect drivers/usb/core/hub.c:4903
       hub_port_connect_change drivers/usb/core/hub.c:5009
       port_event drivers/usb/core/hub.c:5115
       hub_event+0x194d/0x3740 drivers/usb/core/hub.c:5195
       process_one_work+0xc7f/0x1db0 kernel/workqueue.c:2119
       worker_thread+0x221/0x1850 kernel/workqueue.c:2253
       kthread+0x3a1/0x470 kernel/kthread.c:231
       ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431
      Code: 8d 7c 24 20 48 89 fa 48 c1 ea 03 80 3c 02 00 75 5b 48 b8 00 00
      00 00 00 fc ff df 4d 8b 6c 24 20 49 8d 7d 08 48 89 fa 48 c1 ea 03 <80>
      3c 02 00 75 34 4d 8b 6d 08 4d 85 ed 74 0b e8 26 2b 51 fd 4c
      RIP: asix_suspend+0x76/0xc0 RSP: ffff88006bbae718
      ---[ end trace dfc4f5649284342c ]---
      Signed-off-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f562462
    • D
      Revert "net: usb: asix: fill null-ptr-deref in asix_suspend" · 1a8e6b48
      David S. Miller 提交于
      This reverts commit baedf68a.
      
      There is an updated version of this fix which covers
      the problem more thoroughly.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a8e6b48
  4. 08 11月, 2017 26 次提交