1. 24 Jul, 2020 5 commits
    • David S. Miller's avatar
      Merge branch 'TC-datapath-hash-api' · 197569f7
      David S. Miller authored
      Ariel Levkovich says:
      
      ====================
      TC datapath hash api
      
      Hash based packet classification allows user to set up rules that
      provide load balancing of traffic across multiple vports and
      for ECMP path selection while keeping the number of rule at minimum.
      
      Instead of matching on exact flow spec, which requires a rule per
      flow, user can define rules based on a their hash value and distribute
      the flows to different buckets. The number of rules
      in this case will be constant and equal to the number of buckets.
      
      The series introduces an extention to the cls flower classifier
      and allows user to add rules that match on the hash value that
      is stored in skb->hash while assuming the value was set prior to
      the classification.
      
      Setting the skb->hash can be done in various ways and is not defined
      in this series - for example:
      1. By the device driver upon processing an rx packet.
      2. Using tc action bpf with a program which computes and sets the
      skb->hash value.
      
      $ tc filter add dev ens1f0_0 ingress \
      prio 1 chain 2 proto ip \
      flower hash 0x0/0xf  \
      action mirred egress redirect dev ens1f0_1
      
      $ tc filter add dev ens1f0_0 ingress \
      prio 1 chain 2 proto ip \
      flower hash 0x1/0xf  \
      action mirred egress redirect dev ens1f0_2
      
      v3 -> v4:
       *Drop hash setting code leaving only the classidication parts.
        Setting the hash will be possible via existing tc action bpf.
      
      v2 -> v3:
       *Split hash algorithm option into 2 different actions.
        Asym_l4 available via act_skbedit and bpf via new act_hash.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      197569f7
    • Ariel Levkovich's avatar
      net/sched: cls_flower: Add hash info to flow classification · 5923b8f7
      Ariel Levkovich authored
      Adding new cls flower keys for hash value and hash
      mask and dissect the hash info from the skb into
      the flow key towards flow classication.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5923b8f7
    • Ariel Levkovich's avatar
      net/flow_dissector: add packet hash dissection · 0cb09aff
      Ariel Levkovich authored
      Retreive a hash value from the SKB and store it
      in the dissector key for future matching.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0cb09aff
    • Chi Song's avatar
      net: hyperv: dump TX indirection table to ethtool regs · 4a062d66
      Chi Song authored
      An imbalanced TX indirection table causes netvsc to have low
      performance. This table is created and managed during runtime. To help
      better diagnose performance issues caused by imbalanced tables, it needs
      make TX indirection tables visible.
      
      Because TX indirection table is driver specified information, so
      display it via ethtool register dump.
      Signed-off-by: default avatarChi Song <chisong@microsoft.com>
      Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a062d66
    • David Ahern's avatar
      vrf: Handle CONFIG_SYSCTL not set · 1b6687e3
      David Ahern authored
      Randy reported compile failure when CONFIG_SYSCTL is not set/enabled:
      
      ERROR: modpost: "sysctl_vals" [drivers/net/vrf.ko] undefined!
      
      Fix by splitting out the sysctl init and cleanup into helpers that
      can be set to do nothing when CONFIG_SYSCTL is disabled. In addition,
      move vrf_strict_mode and vrf_strict_mode_change to above
      vrf_shared_table_handler (code move only) and wrap all of it
      in the ifdef CONFIG_SYSCTL.
      
      Update the strict mode tests to check for the existence of the
      /proc/sys entry.
      
      Fixes: 33306f1a ("vrf: add sysctl parameter for strict mode")
      Cc: Andrea Mayer <andrea.mayer@uniroma2.it>
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid Ahern <dsahern@kernel.org>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b6687e3
  2. 23 Jul, 2020 35 commits