1. 12 5月, 2018 24 次提交
  2. 11 5月, 2018 16 次提交
    • 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
    • B
      tls: Fix tls_device initialization · 895262d8
      Boris Pismenny 提交于
      Add sg table initialization to fix a BUG_ON encountered when enabling
      CONFIG_DEBUG_SG.
      Signed-off-by: NBoris Pismenny <borisp@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      895262d8
    • G
      cxgb4: fix the wrong conversion of Mbps to Kbps · b3c594ab
      Ganesh Goudar 提交于
      fix the wrong conversion where 1 Mbps was converted to
      1024 Kbps.
      Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3c594ab
    • D
      Merge branch 'mlxsw-Support-VLAN-devices-in-mirroring-offloads' · ccb02638
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Support VLAN devices in mirroring offloads
      
      Petr says:
      
      When offloading "tc action mirred mirror", there are several scenarios
      where VLAN devices can show up, that mlxsw can offload on Spectrum
      machines.
      
      I) A direct mirror to a VLAN device on top of a front-panel port device
         (commonly referred to as "RSPAN")
      
      II) VLAN device in egress path of a packet when resolving a mirror to
          gretap or ip6gretap netdevice.
      
      Specifically in the latter case, the following are the cases that can be
      offloaded:
      
      IIa) VLAN device directly above a physical device.
      IIb) A VLAN-unaware bridge where the egress device is as in IIa.
      IIc) VLAN device on top of a VLAN-aware bridge where the egress device
           is a physical device.
      
      This patch set implements all the above cases.
      
      First, in patch #1, br_vlan_get_info() is extended to allow bridge
      master argument.
      
      Case I is then implemented in patches #2 and #3, case II in patch #4.
      
      Note that handling of VLAN protocol is not included. In case I, mirrored
      packets may end up being double-tagged, and it might be reasonable for
      the outer tag to be an 802.1ad. However, the protocol type configuration
      would have to be put on the same VLAN netdevice that represents normal
      VLAN traffic, and mlxsw currently ignores this setting in that case. Thus
      this support was left out and the encapsulation always uses 802.1q
      protocol.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccb02638
    • P
      mlxsw: spectrum_span: Support VLAN under mirror-to-gretap · 03c44132
      Petr Machata 提交于
      When mirroring to a gretap or ip6gretap device, allow the underlay
      packet path to include VLAN devices. The following configurations are
      supported in underlay:
      
      - vlan over phys
      - vlan-unaware bridge where the egress device is vlan over phys
      - vlan over vlan-aware bridge where the egress device is phys
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03c44132
    • P
      mlxsw: spectrum_span: Support mirror-to-VLAN · e00698d1
      Petr Machata 提交于
      Offload "tc action mirred mirror" to a device that is a vlan device on
      top of a front-panel port device. The hardware encapsulates the mirrored
      packets in a VLAN tag. That includes the case that the mirrored traffic
      is already VLAN-tagged--in that case the monitor traffic will be
      double-tagged, just like in the software path.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e00698d1
    • P
      mlxsw: reg: Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH · 41947662
      Petr Machata 提交于
      Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH to support VLAN-encapsulated
      port mirroring.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41947662
    • P
      net: bridge: Allow bridge master in br_vlan_get_info() · 2b18d79e
      Petr Machata 提交于
      Mirroring offload in mlxsw needs to check that a given VLAN is allowed
      to ingress the bridge device. br_vlan_get_info() is the function that is
      used for this, however currently it only supports bridge port devices.
      Extend it to support bridge masters as well.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b18d79e
    • J
      tcp: Add mark for TIMEWAIT sockets · 00483690
      Jon Maxwell 提交于
      This version has some suggestions by Eric Dumazet:
      
      - Use a local variable for the mark in IPv6 instead of ctl_sk to avoid SMP
      races.
      - Use the more elegant "IP4_REPLY_MARK(net, skb->mark) ?: sk->sk_mark"
      statement.
      - Factorize code as sk_fullsock() check is not necessary.
      
      Aidan McGurn from Openwave Mobility systems reported the following bug:
      
      "Marked routing is broken on customer deployment. Its effects are large
      increase in Uplink retransmissions caused by the client never receiving
      the final ACK to their FINACK - this ACK misses the mark and routes out
      of the incorrect route."
      
      Currently marks are added to sk_buffs for replies when the "fwmark_reflect"
      sysctl is enabled. But not for TW sockets that had sk->sk_mark set via
      setsockopt(SO_MARK..).
      
      Fix this in IPv4/v6 by adding tw->tw_mark for TIME_WAIT sockets. Copy the the
      original sk->sk_mark in __inet_twsk_hashdance() to the new tw->tw_mark location.
      Then progate this so that the skb gets sent with the correct mark. Do the same
      for resets. Give the "fwmark_reflect" sysctl precedence over sk->sk_mark so that
      netfilter rules are still honored.
      Signed-off-by: NJon Maxwell <jmaxwell37@gmail.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00483690
    • J
      net: ipv4: remove define INET_CSK_DEBUG and unnecessary EXPORT_SYMBOL · 03bdfc00
      Joe Perches 提交于
      INET_CSK_DEBUG is always set and only is used for 2 pr_debug calls.
      
      EXPORT_SYMBOL(inet_csk_timer_bug_msg) is only used by these 2
      pr_debug calls and is also unnecessary as the exported string can
      be used directly by these calls.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      03bdfc00
    • F
    • F
      liquidio: monitor all of Octeon's cores in watchdog thread · f6047576
      Felix Manlunas 提交于
      The liquidio_watchdog kernel thread is watching over only 12 cores of the
      Octeon CN23XX; it's neglecting the other 4 cores that are present in the
      CN2360.  Fix it by defining LIO_MAX_CORES as 16.
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6047576
    • D
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · e72a7dd7
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2018-05-09
      
      This series contains updates to fm10k only.
      
      Jake provides all the changes in the series, starting with adding
      support for accelerated MACVLAN devices.  Reduced code duplication by
      implementing a macro to be used when setting up the type specific
      macros.  Avoided potential bugs with stats by using a macro to calculate
      the array size when passing to ensure that the size is correct.
      
      v2: changed macro reference '#' with __stringify() as suggested by
          Joe Perches to patch 2 of the series.  Also made sure the updated
          series of patches is actually pushed to my kernel.org tree
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e72a7dd7
    • E
      net/ipv6: fix lock imbalance in ip6_route_del() · 9e575010
      Eric Dumazet 提交于
      WARNING: lock held when returning to user space!
      4.17.0-rc3+ #37 Not tainted
      
      syz-executor1/27662 is leaving the kernel with locks still held!
      1 lock held by syz-executor1/27662:
       #0: 00000000f661aee7 (rcu_read_lock){....}, at: ip6_route_del+0xea/0x13f0 net/ipv6/route.c:3206
      BUG: scheduling while atomic: syz-executor1/27662/0x00000002
      INFO: lockdep is turned off.
      Modules linked in:
      Kernel panic - not syncing: scheduling while atomic
      
      CPU: 1 PID: 27662 Comm: syz-executor1 Not tainted 4.17.0-rc3+ #37
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x1b9/0x294 lib/dump_stack.c:113
       panic+0x22f/0x4de kernel/panic.c:184
       __schedule_bug.cold.85+0xdf/0xdf kernel/sched/core.c:3290
       schedule_debug kernel/sched/core.c:3307 [inline]
       __schedule+0x139e/0x1e30 kernel/sched/core.c:3412
       schedule+0xef/0x430 kernel/sched/core.c:3549
       exit_to_usermode_loop+0x220/0x310 arch/x86/entry/common.c:152
       prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
       syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
       do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x455979
      RSP: 002b:00007fbf4051dc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      RAX: 0000000000000000 RBX: 00007fbf4051e6d4 RCX: 0000000000455979
      RDX: 00000000200001c0 RSI: 000000000000890c RDI: 0000000000000013
      RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
      R13: 00000000000003c8 R14: 00000000006f9b60 R15: 0000000000000000
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Kernel Offset: disabled
      Rebooting in 86400 seconds..
      
      Fixes: 23fb93a4 ("net/ipv6: Cleanup exception and cache route handling")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: David Ahern <dsahern@gmail.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e575010
    • D
      Merge branch 'hns3-misc-fixes' · c320e49d
      David S. Miller 提交于
      Salil Mehta says:
      
      ====================
      Misc bug fixes for HNS3 Ethernet Driver
      
      Fixes to some of the bugs found during system test, internal review
      and clean-up
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c320e49d
    • Y
      net: hns3: refactor the loopback related function · e4d68dae
      Yunsheng Lin 提交于
      This patch refactors the loopback related function in order
      to support the serdes loopback.
      Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: NPeng Li <lipeng321@huawei.com>
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4d68dae