1. 26 Sep, 2017 15 commits
    • Eric Dumazet's avatar
      net: speed up skb_rbtree_purge() · 7c90584c
      Eric Dumazet authored
      As measured in my prior patch ("sch_netem: faster rb tree removal"),
      rbtree_postorder_for_each_entry_safe() is nice looking but much slower
      than using rb_next() directly, except when tree is small enough
      to fit in CPU caches (then the cost is the same)
      
      Also note that there is not even an increase of text size :
      $ size net/core/skbuff.o.before net/core/skbuff.o
         text	   data	    bss	    dec	    hex	filename
        40711	   1298	      0	  42009	   a419	net/core/skbuff.o.before
        40711	   1298	      0	  42009	   a419	net/core/skbuff.o
      
      From: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7c90584c
    • Eric Dumazet's avatar
      sch_netem: faster rb tree removal · 3aa605f2
      Eric Dumazet authored
      While running TCP tests involving netem storing millions of packets,
      I had the idea to speed up tfifo_reset() and did experiments.
      
      I tried the rbtree_postorder_for_each_entry_safe() method that is
      used in skb_rbtree_purge() but discovered it was slower than the
      current tfifo_reset() method.
      
      I measured time taken to release skbs with three occupation levels :
      10^4, 10^5 and 10^6 skbs with three methods :
      
      1) (current 'naive' method)
      
      	while ((p = rb_first(&q->t_root))) {
      		struct sk_buff *skb = netem_rb_to_skb(p);
      
      		rb_erase(p, &q->t_root);
      		rtnl_kfree_skbs(skb, skb);
      	}
      
      2) Use rb_next() instead of rb_first() in the loop :
      
      	p = rb_first(&q->t_root);
      	while (p) {
      		struct sk_buff *skb = netem_rb_to_skb(p);
      
      		p = rb_next(p);
      		rb_erase(&skb->rbnode, &q->t_root);
      		rtnl_kfree_skbs(skb, skb);
      	}
      
      3) "optimized" method using rbtree_postorder_for_each_entry_safe()
      
      	struct sk_buff *skb, *next;
      
      	rbtree_postorder_for_each_entry_safe(skb, next,
      					     &q->t_root, rbnode) {
                     rtnl_kfree_skbs(skb, skb);
      	}
      	q->t_root = RB_ROOT;
      
      Results :
      
      method_1:while (rb_first()) rb_erase() 10000 skbs in 690378 ns (69 ns per skb)
      method_2:rb_first; while (p) { p = rb_next(p); ...}  10000 skbs in 541846 ns (54 ns per skb)
      method_3:rbtree_postorder_for_each_entry_safe() 10000 skbs in 868307 ns (86 ns per skb)
      
      method_1:while (rb_first()) rb_erase() 99996 skbs in 7804021 ns (78 ns per skb)
      method_2:rb_first; while (p) { p = rb_next(p); ...}  100000 skbs in 5942456 ns (59 ns per skb)
      method_3:rbtree_postorder_for_each_entry_safe() 100000 skbs in 11584940 ns (115 ns per skb)
      
      method_1:while (rb_first()) rb_erase() 1000000 skbs in 108577838 ns (108 ns per skb)
      method_2:rb_first; while (p) { p = rb_next(p); ...}  1000000 skbs in 82619635 ns (82 ns per skb)
      method_3:rbtree_postorder_for_each_entry_safe() 1000000 skbs in 127328743 ns (127 ns per skb)
      
      Method 2) is simply faster, probably because it maintains a smaller
      working size set.
      
      Note that this is the method we use in tcp_ofo_queue() already.
      
      I will also change skb_rbtree_purge() in a second patch.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3aa605f2
    • yuan linyu's avatar
      tun: delete original tun_get() and rename __tun_get() to tun_get() · 9484dc74
      yuan linyu authored
      it seems no need to keep tun_get() and __tun_get() at same time.
      Signed-off-by: default avataryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9484dc74
    • Ganesh Goudar's avatar
      cxgb4: do DCB state reset in couple of places · ba581f77
      Ganesh Goudar authored
      reset the driver's DCB state in couple of places
      where it was missing.
      Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba581f77
    • David S. Miller's avatar
      Merge branch 'liquidio-fw-loading' · d958af3d
      David S. Miller authored
      Rick Farrington says:
      
      ====================
      liquidio: firmware loading
      
      1. Allow host driver parameter to override auto-loaded firmware (in flash).
      2. Verify version of firmware that is auto-loaded from flash.
      3. Change value of fw_type module parameter to reflect default firmware
         image name that is loaded by host driver (in /sys/module/liquidio/...)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d958af3d
    • Rick Farrington's avatar
    • Rick Farrington's avatar
    • Rick Farrington's avatar
    • David S. Miller's avatar
      Merge branch 'dsa-port-enabling' · 74c6042a
      David S. Miller authored
      Vivien Didelot says:
      
      ====================
      net: dsa: port enabling
      
      This patchset makes slave open and close symmetrical and provides
      helpers for enabling or disabling a given DSA port.
      
      Changes in v3:
        - save the phy_device change for a future patchset
      
      Changes in v2:
        - do not remove the phy argument from port enable/disable
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74c6042a
    • Vivien Didelot's avatar
      net: dsa: add port enable and disable helpers · fb8a6a2b
      Vivien Didelot authored
      Provide dsa_port_enable and dsa_port_disable helpers to respectively
      enable and disable a switch port. This makes the dsa_port_set_state_now
      helper static.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb8a6a2b
    • Vivien Didelot's avatar
      net: dsa: make slave close symmetrical to open · 6457edfe
      Vivien Didelot authored
      The DSA slave open function configures the unicast MAC addresses on the
      master device, enable the switch port, change its STP state, then start
      the PHY device.
      
      Make the close function symmetric, by first stopping the PHY device,
      then changing the STP state, disabling the switch port and restore the
      master device.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6457edfe
    • Haiyang Zhang's avatar
      hv_netvsc: Fix the real number of queues of non-vRSS cases · 6450f8f2
      Haiyang Zhang authored
      For older hosts without multi-channel (vRSS) support, and some error
      cases, we still need to set the real number of queues to one.
      This patch adds this missing setting.
      
      Fixes: 8195b139 ("hv_netvsc: fix deadlock on hotplug")
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Reviewed-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6450f8f2
    • David S. Miller's avatar
      Merge branch 'tun-NAPI-and-gro' · 070eb6e0
      David S. Miller authored
      Petar Penkov says:
      
      ====================
      net: Improve code coverage of syzkaller
      
      This patch series is intended to improve code coverage of syzkaller on
      the early receive path, specifically including flow dissector, GRO,
      and GRO with frags parts of the networking stack. Syzkaller exercises
      the stack through the TUN driver and this is therefore where changes
      reside. Current coverage through netif_receive_skb() is limited as it
      does not touch on any of the aforementioned code paths. Furthermore,
      for full coverage, it is necessary to have more flexibility over the
      linear and non-linear data of the skbs.
      
      The following patches address this by providing the user(syzkaller)
      with the ability to send via napi_gro_receive() and napi_gro_frags().
      Additionally, syzkaller can specify how many fragments there are and
      how much data per fragment there is. This is done by exploiting the
      convenient structure of iovecs. Finally, this patch series adds
      support for exercising the flow dissector during fuzzing.
      
      The code path including napi_gro_receive() can be enabled via the
      IFF_NAPI flag.  The remainder of the changes in this patch series give
      the user significantly more control over packets entering the kernel.
      To avoid potential security vulnerabilities, hide the ability to send
      custom skbs and the flow dissector code paths behind a
      capable(CAP_NET_ADMIN) check to require special user privileges.
      
      Changes since v2 based on feedback from Willem de Bruijn and Mahesh
      Bandewar:
      
      Patch 1/ No changes.
      Patch 2/ Check if the preconditions for IFF_NAPI_FRAGS (IFF_NAPI and
      	 IFF_TAP) are met before opening/attaching rather than after.
      	 If they are not, change the behavior from discarding the
      	 flag to rejecting the command with EINVAL.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      070eb6e0
    • Petar Penkov's avatar
      tun: enable napi_gro_frags() for TUN/TAP driver · 90e33d45
      Petar Penkov authored
      Add a TUN/TAP receive mode that exercises the napi_gro_frags()
      interface. This mode is available only in TAP mode, as the interface
      expects packets with Ethernet headers.
      
      Furthermore, packets follow the layout of the iovec_iter that was
      received. The first iovec is the linear data, and every one after the
      first is a fragment. If there are more fragments than the max number,
      drop the packet. Additionally, invoke eth_get_headlen() to exercise flow
      dissector code and to verify that the header resides in the linear data.
      
      The napi_gro_frags() mode requires setting the IFF_NAPI_FRAGS option.
      This is imposed because this mode is intended for testing via tools like
      syzkaller and packetdrill, and the increased flexibility it provides can
      introduce security vulnerabilities. This flag is accepted only if the
      device is in TAP mode and has the IFF_NAPI flag set as well. This is
      done because both of these are explicit requirements for correct
      operation in this mode.
      Signed-off-by: default avatarPetar Penkov <peterpenkov96@gmail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Mahesh Bandewar <maheshb@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: davem@davemloft.net
      Cc: ppenkov@stanford.edu
      Acked-by: default avatarMahesh Bandewar <maheshb@google,com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90e33d45
    • Petar Penkov's avatar
      tun: enable NAPI for TUN/TAP driver · 94317099
      Petar Penkov authored
      Changes TUN driver to use napi_gro_receive() upon receiving packets
      rather than netif_rx_ni(). Adds flag IFF_NAPI that enables these
      changes and operation is not affected if the flag is disabled.  SKBs
      are constructed upon packet arrival and are queued to be processed
      later.
      
      The new path was evaluated with a benchmark with the following setup:
      Open two tap devices and a receiver thread that reads in a loop for
      each device. Start one sender thread and pin all threads to different
      CPUs. Send 1M minimum UDP packets to each device and measure sending
      time for each of the sending methods:
      	napi_gro_receive():	4.90s
      	netif_rx_ni():		4.90s
      	netif_receive_skb():	7.20s
      Signed-off-by: default avatarPetar Penkov <peterpenkov96@gmail.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Mahesh Bandewar <maheshb@google.com>
      Cc: Willem de Bruijn <willemb@google.com>
      Cc: davem@davemloft.net
      Cc: ppenkov@stanford.edu
      Acked-by: default avatarMahesh Bandewar <maheshb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94317099
  2. 25 Sep, 2017 7 commits
  3. 24 Sep, 2017 1 commit
  4. 23 Sep, 2017 17 commits
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · cd4175b1
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
      
       - Unbreak parisc bootloader by avoiding a gcc-7 optimization to convert
         multiple byte-accesses into one word-access.
      
       - Add missing HWPOISON page fault handler code. I completely missed
         that when I added HWPOISON support during this merge window and it
         only showed up now with the madvise07 LTP test case.
      
       - Fix backtrace unwinding to stop when stack start has been reached.
      
       - Issue warning if initrd has been loaded into memory regions with
         broken RAM modules.
      
       - Fix HPMC handler (parisc hardware fault handler) to comply with
         architecture specification.
      
       - Avoid compiler warnings about too large frame sizes.
      
       - Minor init-section fixes.
      
      * 'parisc-4.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Unbreak bootloader due to gcc-7 optimizations
        parisc: Reintroduce option to gzip-compress the kernel
        parisc: Add HWPOISON page fault handler code
        parisc: Move init_per_cpu() into init section
        parisc: Check if initrd was loaded into broken RAM
        parisc: Add PDCE_CHECK instruction to HPMC handler
        parisc: Add wrapper for pdc_instr() firmware function
        parisc: Move start_parisc() into init section
        parisc: Stop unwinding at start of stack
        parisc: Fix too large frame size warnings
      cd4175b1
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · ded85032
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
      
       - Smattering of miscellanous fixes
      
       - A five patch series for i40iw that had a patch (5/5) that was larger
         than I would like, but I took it because it's needed for large scale
         users
      
       - An 8 patch series for bnxt_re that landed right as I was leaving on
         PTO and so had to wait until now...they are all appropriate fixes for
         -rc IMO
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (22 commits)
        bnxt_re: Don't issue cmd to delete GID for QP1 GID entry before the QP is destroyed
        bnxt_re: Fix memory leak in FRMR path
        bnxt_re: Remove RTNL lock dependency in bnxt_re_query_port
        bnxt_re: Fix race between the netdev register and unregister events
        bnxt_re: Free up devices in module_exit path
        bnxt_re: Fix compare and swap atomic operands
        bnxt_re: Stop issuing further cmds to FW once a cmd times out
        bnxt_re: Fix update of qplib_qp.mtu when modified
        i40iw: Add support for port reuse on active side connections
        i40iw: Add missing VLAN priority
        i40iw: Call i40iw_cm_disconn on modify QP to disconnect
        i40iw: Prevent multiple netdev event notifier registrations
        i40iw: Fail open if there are no available MSI-X vectors
        RDMA/vmw_pvrdma: Fix reporting correct opcodes for completion
        IB/bnxt_re: Fix frame stack compilation warning
        IB/mlx5: fix debugfs cleanup
        IB/ocrdma: fix incorrect fall-through on switch statement
        IB/ipoib: Suppress the retry related completion errors
        iw_cxgb4: remove the stid on listen create failure
        iw_cxgb4: drop listen destroy replies if no ep found
        ...
      ded85032
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 71aa60f6
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix NAPI poll list corruption in enic driver, from Christian
          Lamparter.
      
       2) Fix route use after free, from Eric Dumazet.
      
       3) Fix regression in reuseaddr handling, from Josef Bacik.
      
       4) Assert the size of control messages in compat handling since we copy
          it in from userspace twice. From Meng Xu.
      
       5) SMC layer bug fixes (missing RCU locking, bad refcounting, etc.)
          from Ursula Braun.
      
       6) Fix races in AF_PACKET fanout handling, from Willem de Bruijn.
      
       7) Don't use ARRAY_SIZE on spinlock array which might have zero
          entries, from Geert Uytterhoeven.
      
       8) Fix miscomputation of checksum in ipv6 udp code, from Subash Abhinov
          Kasiviswanathan.
      
       9) Push the ipv6 header properly in ipv6 GRE tunnel driver, from Xin
          Long.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
        inet: fix improper empty comparison
        net: use inet6_rcv_saddr to compare sockets
        net: set tb->fast_sk_family
        net: orphan frags on stand-alone ptype in dev_queue_xmit_nit
        MAINTAINERS: update git tree locations for ieee802154 subsystem
        net: prevent dst uses after free
        net: phy: Fix truncation of large IRQ numbers in phy_attached_print()
        net/smc: no close wait in case of process shut down
        net/smc: introduce a delay
        net/smc: terminate link group if out-of-sync is received
        net/smc: longer delay for client link group removal
        net/smc: adapt send request completion notification
        net/smc: adjust net_device refcount
        net/smc: take RCU read lock for routing cache lookup
        net/smc: add receive timeout check
        net/smc: add missing dev_put
        net: stmmac: Cocci spatch "of_table"
        lan78xx: Use default values loaded from EEPROM/OTP after reset
        lan78xx: Allow EEPROM write for less than MAX_EEPROM_SIZE
        lan78xx: Fix for eeprom read/write when device auto suspend
        ...
      71aa60f6
    • Linus Torvalds's avatar
      Merge tag 'apparmor-pr-2017-09-22' of... · 79444df4
      Linus Torvalds authored
      Merge tag 'apparmor-pr-2017-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
      
      Pull apparmor updates from John Johansen:
       "This is the apparmor pull request, similar to SELinux and seccomp.
      
        It's the same series that I was sent to James' security tree + one
        regression fix that was found after the series was sent to James and
        would have been sent for v4.14-rc2.
      
        Features:
        - in preparation for secid mapping add support for absolute root view
          based labels
        - add base infastructure for socket mediation
        - add mount mediation
        - add signal mediation
      
        minor cleanups and changes:
        - be defensive, ensure unconfined profiles have dfas initialized
        - add more debug asserts to apparmorfs
        - enable policy unpacking to audit different reasons for failure
        - cleanup conditional check for label in label_print
        - Redundant condition: prev_ns. in [label.c:1498]
      
        Bug Fixes:
        - fix regression in apparmorfs DAC access permissions
        - fix build failure on sparc caused by undeclared signals
        - fix sparse report of incorrect type assignment when freeing label proxies
        - fix race condition in null profile creation
        - Fix an error code in aafs_create()
        - Fix logical error in verify_header()
        - Fix shadowed local variable in unpack_trans_table()"
      
      * tag 'apparmor-pr-2017-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
        apparmor: fix apparmorfs DAC access permissions
        apparmor: fix build failure on sparc caused by undeclared signals
        apparmor: fix incorrect type assignment when freeing proxies
        apparmor: ensure unconfined profiles have dfas initialized
        apparmor: fix race condition in null profile creation
        apparmor: move new_null_profile to after profile lookup fns()
        apparmor: add base infastructure for socket mediation
        apparmor: add more debug asserts to apparmorfs
        apparmor: make policy_unpack able to audit different info messages
        apparmor: add support for absolute root view based labels
        apparmor: cleanup conditional check for label in label_print
        apparmor: add mount mediation
        apparmor: add the ability to mediate signals
        apparmor: Redundant condition: prev_ns. in [label.c:1498]
        apparmor: Fix an error code in aafs_create()
        apparmor: Fix logical error in verify_header()
        apparmor: Fix shadowed local variable in unpack_trans_table()
      79444df4
    • David S. Miller's avatar
      Merge branch 'ieee802154-for-davem-2017-09-20' of... · 3fb5ec06
      David S. Miller authored
      Merge branch 'ieee802154-for-davem-2017-09-20' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next
      
      Stefan Schmidt says:
      
      ====================
      pull-request: ieee802154 2017-09-20
      
      Here comes a pull request for ieee802154 changes I have queued up for
      this merge window.
      
      Normally these have been coming through the bluetooth tree but as this
      three have been falling through the cracks so far and I have to review
      and ack all of them anyway I think it makes sense if I save the
      bluetooth people some work and handle them directly.
      
      Its the first pull request I send to you so please let me know if I did
      something wrong or if you prefer a different format.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fb5ec06
    • David S. Miller's avatar
      Merge branch 'cxgb4-tc-flower' · cddd9523
      David S. Miller authored
      Rahul Lakkireddy says:
      
      ====================
      cxgb4: add support to offload tc flower
      
      This series of patches add support to offload tc flower onto Chelsio
      NICs.
      
      Patch 1 adds basic skeleton to prepare for offloading tc flower flows.
      
      Patch 2 adds support to add/remove flows for offload.  Flows can have
      accompanying masks.  Following match and action are currently supported
      for offload:
      Match:  ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP)
      Action: drop, redirect to another port on the device.
      
      Patch 3 adds support to offload tc-flower flows having
      vlan actions: pop, push, and modify.
      
      Patch 4 adds support to fetch stats for the offloaded tc flower flows
      from hardware.
      
      Support for offloading more match and action types are to be followed
      in subsequent series.
      
      v2:
      - Setting ftid to -1 not required after bitmap_find_free_region
        in cxgb4_get_free_ftid.
      - Direct return can be used as jumping to error path is not needed
        if flower entry allocation failed in cxgb4_tc_flower_replace.
        Same applies if flower entry not found in cxgb4_tc_flower_destroy.
      - Also, removed an extra return from cxgb4_tc_flower_destroy.
      - Avoid wrapping line for netdev_err message. Also, use
        consistent error message string.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cddd9523
    • Kumar Sanghvi's avatar
      cxgb4: fetch stats for offloaded tc flower flows · e0f911c8
      Kumar Sanghvi authored
      Add support to retrieve stats from hardware for offloaded tc flower
      flows.  Also, poll for the stats of offloaded flows via timer callback.
      Signed-off-by: default avatarKumar Sanghvi <kumaras@chelsio.com>
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0f911c8
    • Kumar Sanghvi's avatar
      cxgb4: add support to offload action vlan · cf2885a7
      Kumar Sanghvi authored
      Add support for offloading tc-flower flows having
      vlan actions: pop, push and modify.
      Signed-off-by: default avatarKumar Sanghvi <kumaras@chelsio.com>
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf2885a7
    • Kumar Sanghvi's avatar
      cxgb4: add basic tc flower offload support · 62488e4b
      Kumar Sanghvi authored
      Add support to add/remove flows for offload.  Following match
      and action are supported for offloading a flow:
      
      Match: ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP)
      Action: drop, redirect to another port on the device.
      
      The qualifying flows can have accompanying mask information.
      Signed-off-by: default avatarKumar Sanghvi <kumaras@chelsio.com>
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      62488e4b
    • Kumar Sanghvi's avatar
      cxgb4: add tc flower offload skeleton · 6a345b3d
      Kumar Sanghvi authored
      Add basic skeleton to prepare for offloading tc-flower flows.
      Signed-off-by: default avatarKumar Sanghvi <kumaras@chelsio.com>
      Signed-off-by: default avatarRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a345b3d
    • Alexey Dobriyan's avatar
      net: use 32-bit arithmetic while allocating net device · 52a59bd5
      Alexey Dobriyan authored
      Private part of allocation is never big enough to warrant size_t.
      
      Space savings:
      
      	add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
      	function                                     old     new   delta
      	alloc_netdev_mqs                            1120    1110     -10
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52a59bd5
    • Gao Feng's avatar
      net: Remove useless function skb_header_release · 242c1a28
      Gao Feng authored
      There is no one which would invokes the function skb_header_release.
      So just remove it now.
      Signed-off-by: default avatarGao Feng <gfree.wind@vip.163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      242c1a28
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c65da8e2
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix the initialization of resources in the ACPI WDAT watchdog
        driver, a recent regression in the ACPI device properties handling, a
        recent change in behavior causing the ACPI_HANDLE() macro to only work
        for GPL code and create a MAINTAINERS entry for ACPI PMIC drivers in
        order to specify the official reviewers for that code.
      
        Specifics:
      
         - Fix the initialization of resources in the ACPI WDAT watchdog
           driver that uses unititialized memory which causes compiler
           warnings to be triggered (Arnd Bergmann).
      
         - Fix a recent regression in the ACPI device properties handling that
           causes some device properties data to be skipped during enumeration
           (Sakari Ailus).
      
         - Fix a recent change in behavior that caused the ACPI_HANDLE() macro
           to stop working for non-GPL code which is a problem for the NVidia
           binary graphics driver, for example (John Hubbard).
      
         - Add a MAINTAINERS entry for the ACPI PMIC drivers to specify the
           official reviewers for that code (Rafael Wysocki)"
      
      * tag 'acpi-4.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: properties: Return _DSD hierarchical extension (data) sub-nodes correctly
        ACPI / bus: Make ACPI_HANDLE() work for non-GPL code again
        ACPI / watchdog: properly initialize resources
        ACPI / PMIC: Add code reviewers to MAINTAINERS
      c65da8e2
    • David S. Miller's avatar
      Merge branch 'net-fix-reuseaddr-regression' · 4e683f49
      David S. Miller authored
      Josef Bacik says:
      
      ====================
      net: fix reuseaddr regression
      
      I introduced a regression when reworking the fastreuse port stuff that allows
      bind conflicts to occur once a reuseaddr successfully opens on an existing tb.
      The root cause is I reversed an if statement which caused us to set the tb as if
      there were no owners on the socket if there were, which obviously is not
      correct.
      
      Dave could you please queue these changes up for -stable, I've run them through
      the net tests and added another test to check for this problem specifically.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e683f49
    • Josef Bacik's avatar
      inet: fix improper empty comparison · fbed24bc
      Josef Bacik authored
      When doing my reuseport rework I screwed up and changed a
      
      if (hlist_empty(&tb->owners))
      
      to
      
      if (!hlist_empty(&tb->owners))
      
      This is obviously bad as all of the reuseport/reuse logic was reversed,
      which caused weird problems like allowing an ipv4 bind conflict if we
      opened an ipv4 only socket on a port followed by an ipv6 only socket on
      the same port.
      
      Fixes: b9470c27 ("inet: kill smallest_size and smallest_port")
      Reported-by: default avatarCole Robinson <crobinso@redhat.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fbed24bc
    • Josef Bacik's avatar
      net: use inet6_rcv_saddr to compare sockets · 7a56673b
      Josef Bacik authored
      In ipv6_rcv_saddr_equal() we need to use inet6_rcv_saddr(sk) for the
      ipv6 compare with the fast socket information to make sure we're doing
      the proper comparisons.
      
      Fixes: 637bc8bb ("inet: reset tb->fastreuseport when adding a reuseport sk")
      Reported-and-tested-by: default avatarCole Robinson <crobinso@redhat.com>
      Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a56673b