1. 18 8月, 2015 17 次提交
    • P
      rhashtable-test: extend to test concurrency · f4a3e90b
      Phil Sutter 提交于
      After having tested insertion, lookup, table walk and removal, spawn a
      number of threads running operations on the same rhashtable. Each of
      them will:
      
      1) insert it's own set of objects,
      2) lookup every successfully inserted object and finally
      3) remove objects in several rounds until all of them have been removed,
         making sure the remaining ones are still found after each round.
      
      This should put a good amount of load onto the system and due to
      synchronising thread startup via two semaphores also extensive
      concurrent table access.
      
      The default number of ten threads returned within half a second on my
      local VM with two cores. Running 200 threads took about four seconds. If
      slow systems suffer too much from this though, the default could be
      lowered or even set to zero so this extended test does not run at all by
      default.
      Signed-off-by: NPhil Sutter <phil@nwl.cc>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4a3e90b
    • D
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · c1f066d4
      David S. Miller 提交于
      Antonio Quartulli says:
      
      ====================
      Included changes:
      - avoid integer overflow in GW selection routine
      - prevent race condition by making capability bit changes atomic (use
        clear/set/test_bit)
      - fix synchronization issue in mcast tvlv handler
      - fix crash on double list removal of TT Request objects
      - fix leak by puring packets enqueued for sending upon iface removal
      - ensure network header pointer is set in skb
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1f066d4
    • D
      Merge tag 'mac80211-next-for-davem-2015-08-14' of... · 2bd736fa
      David S. Miller 提交于
      Merge tag 'mac80211-next-for-davem-2015-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      Another pull request for the next cycle, this time with quite
      a bit of content:
       * mesh fixes/improvements from Alexis, Bob, Chun-Yeow and Jesse
       * TDLS higher bandwidth support (Arik)
       * OCB fixes from Bertold Van den Bergh
       * suspend/resume fixes from Eliad
       * dynamic SMPS support for minstrel-HT (Krishna Chaitanya)
       * VHT bitrate mask support (Lorenzo Bianconi)
       * better regulatory support for 5/10 MHz channels (Matthias May)
       * basic support for MU-MIMO to avoid the multi-vif issue (Sara Sharon)
      along with a number of other cleanups.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2bd736fa
    • D
      Merge branch 'bpf_fanout' · 90eb7fa5
      David S. Miller 提交于
      Willem de Bruijn says:
      
      ====================
      packet: add cBPF and eBPF fanout modes
      
      Allow programmable fanout modes. Support both classical BPF programs
      passed directly and extended BPF programs passed by file descriptor.
      
      One use case is packet steering by deep packet inspection, for
      instance for packet steering by application layer header fields.
      
      Separate the configuration of the fanout mode and the configuration
      of the program, to allow dynamic updates to the latter at runtime.
      
      Changes
        v1 -> v2:
          - follow SO_LOCK_FILTER semantics on filter updates
          - only accept eBPF programs of type BPF_PROG_TYPE_SOCKET_FILTER
          - rename PACKET_FANOUT_BPF to PACKET_FANOUT_CBPF to match
            man 2 bpf usage: "classic" vs. "extended" BPF.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90eb7fa5
    • W
      selftests/net: test extended BPF fanout mode · 30da679e
      Willem de Bruijn 提交于
      Test PACKET_FANOUT_EBPF by inserting a program into the the kernel
      with bpf(), then attaching it to the fanout group. Observe the same
      payload-based distribution as in the PACKET_FANOUT_CBPF test.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30da679e
    • W
      selftests/net: test classic bpf fanout mode · 95e22792
      Willem de Bruijn 提交于
      Test PACKET_FANOUT_CBPF by inserting a cBPF program that selects a
      socket by payload. Requires modifying the test program to send
      packets with multiple payloads.
      
      Also fix a bug in testing the return value of mmap()
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95e22792
    • W
      packet: add extended BPF fanout mode · f2e52095
      Willem de Bruijn 提交于
      Add fanout mode PACKET_FANOUT_EBPF that accepts an en extended BPF
      program to select a socket.
      
      Update the internal eBPF program by passing to socket option
      SOL_PACKET/PACKET_FANOUT_DATA a file descriptor returned by bpf().
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2e52095
    • W
      packet: add classic BPF fanout mode · 47dceb8e
      Willem de Bruijn 提交于
      Add fanout mode PACKET_FANOUT_CBPF that accepts a classic BPF program
      to select a socket.
      
      This avoids having to keep adding special case fanout modes. One
      example use case is application layer load balancing. The QUIC
      protocol, for instance, encodes a connection ID in UDP payload.
      
      Also add socket option SOL_PACKET/PACKET_FANOUT_DATA that updates data
      associated with the socket group. Fanout mode PACKET_FANOUT_CBPF is the
      only user so far.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47dceb8e
    • J
      lwtunnel: rename ip lwtunnel attributes · a1c234f9
      Jiri Benc 提交于
      We already have IFLA_IPTUN_ netlink attributes. The IP_TUN_ attributes look
      very similar, yet they serve very different purpose. This is confusing for
      anyone trying to implement a user space tool supporting lwt.
      
      As the IP_TUN_ attributes are used only for the lightweight tunnels, prefix
      them with LWTUNNEL_IP_ instead to make their purpose clear. Also, it's more
      logical to have them in lwtunnel.h together with the encap enum.
      
      Fixes: 3093fbe7 ("route: Per route IP tunnel metadata via lightweight tunnel")
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1c234f9
    • G
      smsc911x: Fix crash seen if neither ACPI nor OF is configured or used · 62ee783b
      Guenter Roeck 提交于
      Commit 0b50dc4f ("Convert smsc911x to use ACPI as well as DT") makes
      the call to smsc911x_probe_config() unconditional, and no longer fails if
      there is no device node. device_get_phy_mode() is called unconditionally,
      and if there is no phy node configured returns an error code. This error
      code is assigned to phy_interface, and interpreted elsewhere in the code
      as valid phy mode. This in turn causes qemu to crash when running a
      variant of realview_pb_defconfig.
      
      	qemu: hardware error: lan9118_read: Bad reg 0x86
      
      Fixes: 0b50dc4f ("Convert smsc911x to use ACPI as well as DT")
      Cc: Jeremy Linton <jeremy.linton@arm.com>
      Cc Graeme Gregory <graeme.gregory@linaro.org>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62ee783b
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next · c87acb25
      David S. Miller 提交于
      Steffen Klassert says:
      
      ====================
      pull request (net-next): ipsec-next 2015-08-17
      
      1) Fix IPv6 ECN decapsulation for IPsec interfamily tunnels.
         From Thomas Egerer.
      
      2) Use kmemdup instead of duplicating it in xfrm_dump_sa().
         From Andrzej Hajda.
      
      3) Pass oif to the xfrm lookups so that it gets set on the flow
         and the resolver routines can match based on oif.
         From David Ahern.
      
      4) Add documentation for the new xfrm garbage collector threshold.
         From Alexander Duyck.
      
      Please pull or let me know if there are problems.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c87acb25
    • J
      net: fix endian check warning in etherdevice.h · fbaff3ef
      Jesse Brandeburg 提交于
      Sparse builds have been warning for a really long time now
      that etherdevice.h has a conversion that is unsafe.
      
        include/linux/etherdevice.h:79:32: warning: restricted __be16 degrades to integer
      
      This code change fixes the issue and generates the exact
      same assembly before/after (checked on x86_64)
      
      Fixes: 2c722fe1 (etherdevice: Optimize a few is_<foo>_ether_addr functions)
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Joe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbaff3ef
    • D
      Merge branch 'iff_no_queue' · f3ae683f
      David S. Miller 提交于
      Phil Sutter says:
      
      ====================
      net: introduce IFF_NO_QUEUE as successor of zero tx_queue_len
      
      This series adds a new private net_device flag indicating that a device may
      (and probably should) be used without a queueing discipline attached to it.
      This is already common practice for many virtual device types like e.g.
      loopback, VLAN (802.1Q) or bridges (802.1D). The reason for this is that these
      devices lack an underlying layer which could impose back pressure and therefore
      making a TX queue necessary to not slow down senders.
      
      Up to now, drivers being aware of the above applying to them set
      dev->tx_queue_len to zero to indicate no qdisc should be attached to the
      interface they drive and the kernel reacts upon this by assigning the noop
      qdisc instead of the default pfifo_fast. This implicit agreement though leads
      to an inconvenient situation once a user tries to attach a real qdisc to these
      devices, as the formerly special tx_queue_len value becomes a regular one,
      limiting the queue to zero packets and thus prevents any TX from happening. To
      overcome this, practically all qdisc implementations intercept and sanitize the
      malicious value.
      
      With this series applied, drivers may signal the lack of need for a qdisc
      without having to tamper with tx_queue_len, making fallbacks in qdiscs and
      caveats in userspace unnecessary.
      
      Upon upstream acceptance, this series will be followed up by a set of patches
      converting device drivers, adding a warning so out-of-tree driver authors get
      aware of this change and dropping all special handling of tx_queue_len in
      net/sched/.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3ae683f
    • P
      net: sch_generic: react upon IFF_NO_QUEUE flag · 4b469955
      Phil Sutter 提交于
      Handle IFF_NO_QUEUE as alternative to tx_queue_len being zero.
      Signed-off-by: NPhil Sutter <phil@nwl.cc>
      Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b469955
    • P
      net: declare new net_device priv_flag IFF_NO_QUEUE · fa8187c9
      Phil Sutter 提交于
      This private net_device flag can be set by drivers to inform that a
      device runs fine without a qdisc attached. This was formerly done by
      setting tx_queue_len to zero.
      Signed-off-by: NPhil Sutter <phil@nwl.cc>
      Acked-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa8187c9
    • R
      tipc: don't sanity check non-existing TLV (NL compat) · 8f8ff913
      Richard Alpe 提交于
      A zero length payload means that no TLV (Type Length Value) data has
      been passed. Prior to this patch a non-existing TLV could be sanity
      checked with TLV_OK() resulting in random behavior where a user
      sending an empty message occasionally got a incorrect "operation not
      supported" message back.
      Signed-off-by: NRichard Alpe <richard.alpe@ericsson.com>
      Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f8ff913
    • Y
      bnx2: Fix bandwidth allocation for some MF modes · da3cc2da
      Yuval Mintz 提交于
      Management firmware tells driver in case bandwidth configuration for
      a specific function exists, but [regretably] the same field has different
      meanings depending on the multi-function mode - it can either be
      a percentile value or an actual speed.
      
      For newer multi-function modes current logic is incorrect -
      driver understands values as actual speeds instead of percentages,
      causing the resulting chip configuration to be incorrect.
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da3cc2da
  2. 17 8月, 2015 1 次提交
  3. 15 8月, 2015 8 次提交
  4. 14 8月, 2015 14 次提交