1. 02 8月, 2018 2 次提交
  2. 01 8月, 2018 3 次提交
  3. 30 7月, 2018 2 次提交
    • S
      net: report invalid mtu value via netlink extack · 7a4c53be
      Stephen Hemminger 提交于
      If an invalid MTU value is set through rtnetlink return extra error
      information instead of putting message in kernel log. For other cases
      where there is no visible API, keep the error report in the log.
      
      Example:
      	# ip li set dev enp12s0 mtu 10000
      	Error: mtu greater than device maximum.
      
      	# ifconfig enp12s0 mtu 10000
      	SIOCSIFMTU: Invalid argument
      	# dmesg | tail -1
      	[ 2047.795467] enp12s0: mtu greater than device maximum
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a4c53be
    • X
      route: add support for directed broadcast forwarding · 5cbf777c
      Xin Long 提交于
      This patch implements the feature described in rfc1812#section-5.3.5.2
      and rfc2644. It allows the router to forward directed broadcast when
      sysctl bc_forwarding is enabled.
      
      Note that this feature could be done by iptables -j TEE, but it would
      cause some problems:
        - target TEE's gateway param has to be set with a specific address,
          and it's not flexible especially when the route wants forward all
          directed broadcasts.
        - this duplicates the directed broadcasts so this may cause side
          effects to applications.
      
      Besides, to keep consistent with other os router like BSD, it's also
      necessary to implement it in the route rx path.
      
      Note that route cache needs to be flushed when bc_forwarding is
      changed.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5cbf777c
  4. 28 7月, 2018 2 次提交
  5. 27 7月, 2018 1 次提交
    • Z
      can: dev: enable multi-queue for SocketCAN devices · 03870907
      Zhu Yi 提交于
      The existing SocketCAN implementation provides alloc_candev() to
      allocate a CAN device using a single Tx and Rx queue. This can lead to
      priority inversion in case the single Tx queue is already full with low
      priority messages and a high priority message needs to be sent while the
      bus is fully loaded with medium priority messages.
      
      This problem can be solved by using the existing multi-queue support of
      the network subsytem. The commit makes it possible to use multi-queue in
      the CAN subsystem in the same way it is used in the Ethernet subsystem
      by adding an alloc_candev_mqs() call and accompanying macros. With this
      support a CAN device can use multi-queue qdisc (e.g. mqprio) to avoid
      the aforementioned priority inversion.
      
      The exisiting functionality of alloc_candev() is the same as before.
      
      CAN devices need to have prioritized multiple hardware queues or are
      able to abort waiting for arbitration to make sensible use of
      multi-queues.
      Signed-off-by: NZhu Yi <yi.zhu5@cn.bosch.com>
      Signed-off-by: NMark Jonas <mark.jonas@de.bosch.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      03870907
  6. 26 7月, 2018 1 次提交
  7. 25 7月, 2018 1 次提交
  8. 24 7月, 2018 2 次提交
    • F
      net/mlx5: FW tracer, events handling · c71ad41c
      Feras Daoud 提交于
      The tracer has one event, event 0x26, with two subtypes:
      - Subtype 0: Ownership change
      - Subtype 1: Traces available
      
      An ownership change occurs in the following cases:
      1- Owner releases his ownership, in this case, an event will be
      sent to inform others to reattempt acquire ownership.
      2- Ownership was taken by a higher priority tool, in this case
      the owner should understand that it lost ownership, and go through
      tear down flow.
      
      The second subtype indicates that there are traces in the trace buffer,
      in this case, the driver polls the tracer buffer for new traces, parse
      them and prepares the messages for printing.
      
      The HW starts tracing from the first address in the tracer buffer.
      Driver receives an event notifying that new trace block exists.
      HW posts a timestamp event at the last 8B of every 256B block.
      Comparing the timestamp to the last handled timestamp would indicate
      that this is a new trace block. Once the new timestamp is detected,
      the entire block is considered valid.
      
      Block validation and parsing, should be done after copying the current
      block to a different location, in order to avoid block overwritten
      during processing.
      Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      c71ad41c
    • F
      net/mlx5: FW tracer, implement tracer logic · f53aaa31
      Feras Daoud 提交于
      Implement FW tracer logic and registers access, initialization and
      cleanup flows.
      
      Initializing the tracer will be part of load one flow, as multiple
      PFs will try to acquire ownership but only one will succeed and will
      be the tracer owner.
      Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      f53aaa31
  9. 23 7月, 2018 1 次提交
  10. 22 7月, 2018 3 次提交
  11. 21 7月, 2018 3 次提交
  12. 20 7月, 2018 2 次提交
  13. 19 7月, 2018 7 次提交
    • T
      net/mlx5: Fix QP fragmented buffer allocation · d7037ad7
      Tariq Toukan 提交于
      Fix bad alignment of SQ buffer in fragmented QP allocation.
      It should start directly after RQ buffer ends.
      
      Take special care of the end case where the RQ buffer does not occupy
      a whole page. RQ size is a power of two, so would be the case only for
      small RQ sizes (RQ size < PAGE_SIZE).
      
      Fix wrong assignments for sqb->size (mistakenly assigned RQ size),
      and for npages value of RQ and SQ.
      
      Fixes: 3a2f7033 ("net/mlx5: Use order-0 allocations for all WQ types")
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      d7037ad7
    • T
      net/mlx5: Better return types for CQE API · e2abdcf1
      Tariq Toukan 提交于
      Reduce sizes of return types.
      Use bool for binary indication.
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      e2abdcf1
    • J
      net/mlx5: Add core support for double vlan push/pop steering action · 8da6fe2a
      Jianbo Liu 提交于
      As newer firmware supports double push/pop in a single FTE, we add
      core bits and extend vlan action logic for it.
      Signed-off-by: NJianbo Liu <jianbol@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      8da6fe2a
    • E
      net/mlx5: Expose MPEGC (Management PCIe General Configuration) structures · 5e022dd3
      Eran Ben Elisha 提交于
      This patch exposes PRM layout for handling MPEGC (Management PCIe
      General Configuration).
      
      This will be used in the downstream patch for configuring MPEGC via the
      driver.
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      5e022dd3
    • F
      net/mlx5: FW tracer, add hardware structures · eff8ea8f
      Feras Daoud 提交于
      This change adds the infrastructure to mlx5 core fw tracer.
      It introduces the following 4 new registers:
      MLX5_REG_MTRC_CAP  - Used to read tracer capabilities
      MLX5_REG_MTRC_CONF - Used to set tracer configurations
      MLX5_REG_MTRC_STDB - Used to query tracer strings database
      MLX5_REG_MTRC_CTRL - Used to control the tracer
      
      The capability of the tracing can be checked using mcam access
      register, therefore, the mcam access register interface will expose
      the tracer register.
      Signed-off-by: NFeras Daoud <ferasda@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      eff8ea8f
    • S
      net: Move skb decrypted field, avoid explicity copy · a48d189e
      Stefano Brivio 提交于
      Commit 784abe24 ("net: Add decrypted field to skb")
      introduced a 'decrypted' field that is explicitly copied on skb
      copy and clone.
      
      Move it between headers_start[0] and headers_end[0], so that we
      don't need to copy it explicitly as it's copied by the memcpy()
      in __copy_skb_header().
      
      While at it, drop the assignment in __skb_clone(), it was
      already redundant.
      
      This doesn't change the size of sk_buff or cacheline boundaries.
      
      The 15-bits hole before tc_index becomes a 14-bits hole, and
      will be again a 15-bits hole when this change is merged with
      commit 8b700862 ("net: Don't copy pfmemalloc flag in
      __copy_skb_header()").
      
      v2: as reported by kbuild test robot (oops, I forgot to build
          with CONFIG_TLS_DEVICE it seems), we can't use
          CHECK_SKB_FIELD() on a bit-field member. Just drop the
          check for the moment being, perhaps we could think of some
          magic to also check bit-field members one day.
      
      Fixes: 784abe24 ("net: Add decrypted field to skb")
      Signed-off-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a48d189e
    • S
      PCI: OF: Fix I/O space page leak · a5fb9fb0
      Sergei Shtylyov 提交于
      When testing the R-Car PCIe driver on the Condor board, if the PCIe PHY
      driver was left disabled, the kernel crashed with this BUG:
      
        kernel BUG at lib/ioremap.c:72!
        Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
        Modules linked in:
        CPU: 0 PID: 39 Comm: kworker/0:1 Not tainted 4.17.0-dirty #1092
        Hardware name: Renesas Condor board based on r8a77980 (DT)
        Workqueue: events deferred_probe_work_func
        pstate: 80000005 (Nzcv daif -PAN -UAO)
        pc : ioremap_page_range+0x370/0x3c8
        lr : ioremap_page_range+0x40/0x3c8
        sp : ffff000008da39e0
        x29: ffff000008da39e0 x28: 00e8000000000f07
        x27: ffff7dfffee00000 x26: 0140000000000000
        x25: ffff7dfffef00000 x24: 00000000000fe100
        x23: ffff80007b906000 x22: ffff000008ab8000
        x21: ffff000008bb1d58 x20: ffff7dfffef00000
        x19: ffff800009c30fb8 x18: 0000000000000001
        x17: 00000000000152d0 x16: 00000000014012d0
        x15: 0000000000000000 x14: 0720072007200720
        x13: 0720072007200720 x12: 0720072007200720
        x11: 0720072007300730 x10: 00000000000000ae
        x9 : 0000000000000000 x8 : ffff7dffff000000
        x7 : 0000000000000000 x6 : 0000000000000100
        x5 : 0000000000000000 x4 : 000000007b906000
        x3 : ffff80007c61a880 x2 : ffff7dfffeefffff
        x1 : 0000000040000000 x0 : 00e80000fe100f07
        Process kworker/0:1 (pid: 39, stack limit = 0x        (ptrval))
        Call trace:
         ioremap_page_range+0x370/0x3c8
         pci_remap_iospace+0x7c/0xac
         pci_parse_request_of_pci_ranges+0x13c/0x190
         rcar_pcie_probe+0x4c/0xb04
         platform_drv_probe+0x50/0xbc
         driver_probe_device+0x21c/0x308
         __device_attach_driver+0x98/0xc8
         bus_for_each_drv+0x54/0x94
         __device_attach+0xc4/0x12c
         device_initial_probe+0x10/0x18
         bus_probe_device+0x90/0x98
         deferred_probe_work_func+0xb0/0x150
         process_one_work+0x12c/0x29c
         worker_thread+0x200/0x3fc
         kthread+0x108/0x134
         ret_from_fork+0x10/0x18
        Code: f9004ba2 54000080 aa0003fb 17ffff48 (d4210000)
      
      It turned out that pci_remap_iospace() wasn't undone when the driver's
      probe failed, and since devm_phy_optional_get() returned -EPROBE_DEFER,
      the probe was retried, finally causing the BUG due to trying to remap
      already remapped pages.
      
      Introduce the devm_pci_remap_iospace() managed API and replace the
      pci_remap_iospace() call with it to fix the bug.
      
      Fixes: dbf9826d ("PCI: generic: Convert to DT resource parsing API")
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      [lorenzo.pieralisi@arm.com: split commit/updated the commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      a5fb9fb0
  14. 18 7月, 2018 10 次提交