1. 04 5月, 2016 2 次提交
    • A
      ixgbe: Match on multiple headers for cls_u32 offloads · 1cdaaf54
      Amritha Nambiar 提交于
      Adds support to set filters with multiple header fields (L3,L4)to match on.
      This is achieved in the following order:
      1. Create a leaf hash table for the next header.
      2. Create a link to the leaf hash table from the base hash table with
         matches on next header type and current header fields.
      3. Add filter in leaf hash table with match on next header fields and
         action.
      
      Verified with the following filters :
      
      Match TCP and DIP:
              handle 1: u32 divisor 1
              u32 ht 800: order 1 link 1: \
              offset at 0 mask 0f00 shift 6 plus 0 eat \
              match ip protocol 6 ff match ip dst 10.0.0.1/32
              match tcp src 28 ffff action drop
      
      Delete the filter:
      
      Match on DIP, SIP, UDP (SPort, DPort):
              handle 2: u32 divisor 1
              u32 ht 800: order 2 link 2: \
              offset at 0 mask 0f00 shift 6 plus 0 eat \
              match ip dst 15.0.0.2/32 match ip protocol 17 ff \
              match ip src 15.0.0.1/32
              match udp src 30 ffff match udp dst 32 ffff action drop
      Signed-off-by: NAmritha Nambiar <amritha.nambiar@intel.com>
      Acked-by: NSridhar Samudrala <sridhar.samudrala@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1cdaaf54
    • S
      ixgbe: Add support for redirect action to cls_u32 offloads · 947f8a45
      Sridhar Samudrala 提交于
      This patch enables 'redirect' to a SRIOV VF or a offloaded macvlan
      device queue via tc 'mirred' action.
      
      Verified with the following script that creates SRIOV VFs,  offloaded
      macvlan and adds tc u32 filters with redirect action to the associated
      netdevs.
      
       # add ingress qdisc.
       tc qdisc add dev p4p1 ingress
      
       # enable hw tc offload.
       ethtool -K p4p1 hw-tc-offload on
      
       # create 4 sriov VFs and bring up the first one.
       echo 4 > /sys/class/net/p4p1/device/sriov_numvfs
       sleep 1
       ip link set p4p1 up
       ip link set p4p1_0 up
      
       # create a offloaded macvlan device and bring it up.
       ethtool -K p4p1 l2-fwd-offload on
       ip link add link p4p1 name mvlan_1 type macvlan
       ip link set mvlan_1 up
      
       # add u32 filter with action to redirect to VF netdev
       tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
          handle 800:0:1 u32 ht 800: \
          match ip src 192.168.1.3/32 \
          action mirred egress redirect dev p4p1_0
      
       # add u32 filter with action to redirect to macvlan netdev
       tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
          handle 800:0:2 u32 ht 800: \
          match ip src 192.168.2.3/32 \
          action mirred egress redirect dev mvlan_1
      Signed-off-by: NSridhar Samudrala <sridhar.samudrala@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      947f8a45
  2. 25 4月, 2016 6 次提交
  3. 22 4月, 2016 1 次提交
  4. 08 4月, 2016 7 次提交
  5. 05 4月, 2016 9 次提交
  6. 30 3月, 2016 7 次提交
  7. 18 3月, 2016 1 次提交
    • J
      mm: introduce page reference manipulation functions · fe896d18
      Joonsoo Kim 提交于
      The success of CMA allocation largely depends on the success of
      migration and key factor of it is page reference count.  Until now, page
      reference is manipulated by direct calling atomic functions so we cannot
      follow up who and where manipulate it.  Then, it is hard to find actual
      reason of CMA allocation failure.  CMA allocation should be guaranteed
      to succeed so finding offending place is really important.
      
      In this patch, call sites where page reference is manipulated are
      converted to introduced wrapper function.  This is preparation step to
      add tracepoint to each page reference manipulation function.  With this
      facility, we can easily find reason of CMA allocation failure.  There is
      no functional change in this patch.
      
      In addition, this patch also converts reference read sites.  It will
      help a second step that renames page._count to something else and
      prevents later attempt to direct access to it (Suggested by Andrew).
      Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Acked-by: NVlastimil Babka <vbabka@suse.cz>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fe896d18
  8. 04 3月, 2016 1 次提交
    • J
      net: relax setup_tc ndo op handle restriction · 5eb4dce3
      John Fastabend 提交于
      I added this check in setup_tc to multiple drivers,
      
       if (handle != TC_H_ROOT || tc->type != TC_SETUP_MQPRIO)
      
      Unfortunately restricting to TC_H_ROOT like this breaks the old
      instantiation of mqprio to setup a hardware qdisc. This patch
      relaxes the test to only check the type to make it equivalent
      to the check before I broke it. With this the old instantiation
      continues to work.
      
      A good smoke test is to setup mqprio with,
      
      # tc qdisc add dev eth4 root mqprio num_tc 8 \
        map 0 1 2 3 4 5 6 7 \
        queues 0@0 1@1 2@2 3@3 4@4 5@5 6@6 7@7
      
      Fixes: e4c6734e ("net: rework ndo tc op to consume additional qdisc handle paramete")
      Reported-by: NSingh Krishneil <krishneil.k.singh@intel.com>
      Reported-by: NJake Keller <jacob.e.keller@intel.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Shradha Shah <sshah@solarflare.com>
      CC: Or Gerlitz <ogerlitz@mellanox.com>
      CC: Ariel Elior <ariel.elior@qlogic.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Don Skidmore <donald.c.skidmore@intel.com>
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5eb4dce3
  9. 02 3月, 2016 1 次提交
  10. 17 2月, 2016 4 次提交
    • J
      net: ixgbe: abort with cls u32 divisor groups greater than 1 · db956ae8
      John Fastabend 提交于
      This patch ensures ixgbe will not try to offload hash tables from the
      u32 module. The device class does not currently support this so until
      it is enabled just abort on these tables.
      
      Interestingly the more flexible your hardware is the less code you
      need to implement to guard against these cases.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db956ae8
    • J
      net: ixgbe: add support for tc_u32 offload · b82b17d9
      John Fastabend 提交于
      This adds initial support for offloading the u32 tc classifier. This
      initial implementation only implements a few base matches and actions
      to illustrate the use of the infrastructure patches.
      
      However it is an interesting subset because it handles the u32 next
      hdr logic to correctly map tcp packets from ip headers using the ihl
      and protocol fields. After this is accepted we can extend the match
      and action fields easily by updating the model header file.
      
      Also only the drop action is supported initially.
      
      Here is a short test script,
      
       #tc qdisc add dev eth4 ingress
       #tc filter add dev eth4 parent ffff: protocol ip \
      	u32 ht 800: order 1 \
      	match ip dst 15.0.0.1/32 match ip src 15.0.0.2/32 action drop
      
      <-- hardware has dst/src ip match rule installed -->
      
       #tc filter del dev eth4 parent ffff: prio 49152
       #tc filter add dev eth4 parent ffff: protocol ip prio 99 \
      	handle 1: u32 divisor 1
       #tc filter add dev eth4 protocol ip parent ffff: prio 99 \
      	u32 ht 800: order 1 link 1: \
      	offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 6 ff
       #tc filter add dev eth4 parent ffff: protocol ip \
      	u32 ht 1: order 3 match tcp src 23 ffff action drop
      
      <-- hardware has tcp src port rule installed -->
      
       #tc qdisc del dev eth4 parent ffff:
      
      <-- hardware cleaned up -->
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b82b17d9
    • J
      net: rework setup_tc ndo op to consume general tc operand · 16e5cc64
      John Fastabend 提交于
      This patch updates setup_tc so we can pass additional parameters into
      the ndo op in a generic way. To do this we provide structured union
      and type flag.
      
      This lets each classifier and qdisc provide its own set of attributes
      without having to add new ndo ops or grow the signature of the
      callback.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16e5cc64
    • J
      net: rework ndo tc op to consume additional qdisc handle parameter · e4c6734e
      John Fastabend 提交于
      The ndo_setup_tc() op was added to support drivers offloading tx
      qdiscs however only support for mqprio was ever added. So we
      only ever added support for passing the number of traffic classes
      to the driver.
      
      This patch generalizes the ndo_setup_tc op so that a handle can
      be provided to indicate if the offload is for ingress or egress
      or potentially even child qdiscs.
      
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Shradha Shah <sshah@solarflare.com>
      CC: Or Gerlitz <ogerlitz@mellanox.com>
      CC: Ariel Elior <ariel.elior@qlogic.com>
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      CC: Bruce Allan <bruce.w.allan@intel.com>
      CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
      CC: Don Skidmore <donald.c.skidmore@intel.com>
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4c6734e
  11. 12 2月, 2016 1 次提交