1. 06 6月, 2014 3 次提交
  2. 05 6月, 2014 1 次提交
  3. 04 6月, 2014 7 次提交
  4. 03 6月, 2014 22 次提交
  5. 02 6月, 2014 7 次提交
    • J
      bridge: notify user space after fdb update · c65c7a30
      Jon Maxwell 提交于
      There has been a number incidents recently where customers running KVM have
      reported that VM hosts on different Hypervisors are unreachable. Based on
      pcap traces we found that the bridge was broadcasting the ARP request out
      onto the network. However some NICs have an inbuilt switch which on occasions
      were broadcasting the VMs ARP request back through the physical NIC on the
      Hypervisor. This resulted in the bridge changing ports and incorrectly learning
      that the VMs mac address was external. As a result the ARP reply was directed
      back onto the external network and VM never updated it's ARP cache. This patch
      will notify the bridge command, after a fdb has been updated to identify such
      port toggling.
      Signed-off-by: NJon Maxwell <jmaxwell37@gmail.com>
      Reviewed-by: NJiri Pirko <jiri@resnulli.us>
      Acked-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Acked-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c65c7a30
    • A
    • N
      net: fix wrong mac_len calculation for vlans · 4b9b1cdf
      Nikolay Aleksandrov 提交于
      After 1e785f48 ("net: Start with correct mac_len in
      skb_network_protocol") skb->mac_len is used as a start of the
      calculation in skb_network_protocol() but that is not always correct. If
      skb->protocol == 8021Q/AD, usually the vlan header is already inserted
      in the skb (i.e. vlan reorder hdr == 0). Usually when the packet enters
      dev_hard_xmit it has mac_len == 0 so we take 2 bytes from the
      destination mac address (skb->data + VLAN_HLEN) as a type in
      skb_network_protocol() and return vlan_depth == 4. In the case where TSO is
      off, then the mac_len is set but it's == 18 (ETH_HLEN + VLAN_HLEN), so
      skb_network_protocol() returns a type from inside the packet and
      offset == 22. Also make vlan_depth unsigned as suggested before.
      As suggested by Eric Dumazet, move the while() loop in the if() so we
      can avoid additional testing in fast path.
      
      Here are few netperf tests + debug printk's to illustrate:
      cat netperf.tso-on.reorder-on.bugged
      - Vlan -> device (reorder on, default, this case is okay)
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
      192.168.3.1 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.00    7111.54
      [   81.605435] skb->len 65226 skb->gso_size 1448 skb->proto 0x800
      skb->mac_len 0 vlan_depth 0 type 0x800
      
      - Vlan -> device (reorder off, bad)
      cat netperf.tso-on.reorder-off.bugged
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
      192.168.3.1 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.00     241.35
      [  204.578332] skb->len 1518 skb->gso_size 0 skb->proto 0x8100
      skb->mac_len 0 vlan_depth 4 type 0x5301
      0x5301 are the last two bytes of the destination mac.
      
      And if we stop TSO, we may get even the following:
      [   83.343156] skb->len 2966 skb->gso_size 1448 skb->proto 0x8100
      skb->mac_len 18 vlan_depth 22 type 0xb84
      Because mac_len already accounts for VLAN_HLEN.
      
      After the fix:
      cat netperf.tso-on.reorder-off.fixed
      MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
      192.168.3.1 () port 0 AF_INET
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
       87380  16384  16384    10.01    5001.46
      [   81.888489] skb->len 65230 skb->gso_size 1448 skb->proto 0x8100
      skb->mac_len 0 vlan_depth 18 type 0x800
      
      CC: Vlad Yasevich <vyasevic@redhat.com>
      CC: Eric Dumazet <eric.dumazet@gmail.com>
      CC: Daniel Borkman <dborkman@redhat.com>
      CC: David S. Miller <davem@davemloft.net>
      
      Fixes:1e785f48 ("net: Start with correct mac_len in
      skb_network_protocol")
      Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b9b1cdf
    • L
      Linux 3.15-rc8 · fad01e86
      Linus Torvalds 提交于
      fad01e86
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 204fe038
      Linus Torvalds 提交于
      Pull powerpc fix from Ben Herrenschmidt:
       "Here's just one trivial patch to wire up sys_renameat2 which I seem to
        have completely missed so far.
      
        (My test build scripts fwd me warnings but miss the ones generated for
        missing syscalls)"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc: Wire renameat2() syscall
      204fe038
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 568180a5
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "A fair number of fixes across the field.  Nothing terribly
        complicated; the one liners in below changelog should be fairly
        descriptive.
      
        Noteworthy is the SB1 change which the result of changes to binutils
        resulting in one big gas warning for most files being assembled as
        well as the asid_cache and branch emulation fixes which fix corruption
        or possible uninteded behaviour of kernel or application code.  The
        remainder of fixes are more platforms or subsystem specific"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: R46000: Fix Micro-assembler field overflow for R4600 V2
        MIPS: ptrace: Avoid smp_processor_id() in preemptible code
        MIPS: Lemote 2F: cs5536: mfgpt: use raw locks
        MIPS: SB1: Fix excessive kernel warnings.
        MIPS: RC32434: fix broken PCI resource initialization
        MIPS: malta: memory.c: Initialize the 'memsize' variable
        MIPS: Fix typo when reporting cache and ftlb errors for ImgTec cores
        MIPS: Fix inconsistancy of __NR_Linux_syscalls value
        MIPS: Fix branch emulation of branch likely instructions.
        MIPS: Fix a typo error in AUDIT_ARCH definition
        MIPS: Change type of asid_cache to unsigned long
      568180a5
    • L
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 32439700
      Linus Torvalds 提交于
      Pull scheduler fixes from Ingo Molnar:
       "Various fixlets, mostly related to the (root-only) SCHED_DEADLINE
        policy, but also a hotplug bug fix and a fix for a NR_CPUS related
        overallocation bug causing a suspend/resume regression"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Fix hotplug vs. set_cpus_allowed_ptr()
        sched/cpupri: Replace NR_CPUS arrays
        sched/deadline: Replace NR_CPUS arrays
        sched/deadline: Restrict user params max value to 2^63 ns
        sched/deadline: Change sched_getparam() behaviour vs SCHED_DEADLINE
        sched: Disallow sched_attr::sched_policy < 0
        sched: Make sched_setattr() correctly return -EFBIG
      32439700