1. 08 Dec, 2016 19 commits
    • Tobias Klauser's avatar
      net: ethernet: slicoss: use module_pci_driver() · 3f0dd6b7
      Tobias Klauser authored
      Use module_pci_driver() to get rid of some boilerplate code.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Acked-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f0dd6b7
    • David S. Miller's avatar
      Merge branch 'cls_flower-ICMP' · 334c5e2b
      David S. Miller authored
      Simon Horman says:
      
      ====================
      net/sched: cls_flower: Support matching on ICMP
      
      this series adds support for matching on ICMP type and code to cls_flower.
      
      Changes v5->v6:
      * Restore missing signed-off-by
      
      Changes v4->v5:
      * Drop all helpers
      
      Changes v3->v4:
      * Do not add icmp to struct flow_keys, it is not needed
      * Do not test for ICMP protocols in packet in __skb_flow_dissect,
        this is also not needed
      
      Changes v2->v3:
      * Add FLOW_DISSECTOR_KEY_ICMP and use separate structure for ICMP
      
      Changes v1->v2:
      * Include all dissector helpers in first patch
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      334c5e2b
    • Simon Horman's avatar
      net/sched: cls_flower: Support matching on ICMP type and code · 7b684884
      Simon Horman authored
      Support matching on ICMP type and code.
      
      Example usage:
      
      tc qdisc add dev eth0 ingress
      
      tc filter add dev eth0 protocol ip parent ffff: flower \
      	indev eth0 ip_proto icmp type 8 code 0 action drop
      
      tc filter add dev eth0 protocol ipv6 parent ffff: flower \
      	indev eth0 ip_proto icmpv6 type 128 code 0 action drop
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b684884
    • Simon Horman's avatar
      flow dissector: ICMP support · 972d3876
      Simon Horman authored
      Allow dissection of ICMP(V6) type and code. This should only occur
      if a packet is ICMP(V6) and the dissector has FLOW_DISSECTOR_KEY_ICMP set.
      
      There are currently no users of FLOW_DISSECTOR_KEY_ICMP.
      A follow-up patch will allow FLOW_DISSECTOR_KEY_ICMP to be used by
      the flower classifier.
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      972d3876
    • Niklas Cassel's avatar
      net: stmmac: stmmac_platform: use correct setup function for gmac4 · 7cc99fd2
      Niklas Cassel authored
      devicetree binding for stmmac states:
      - compatible: Should be "snps,dwmac-<ip_version>", "snps,dwmac"
      	For backwards compatibility: "st,spear600-gmac" is also supported.
      
      Previously, when specifying "snps,dwmac-4.10a", "snps,dwmac" as your
      compatible string, plat_stmmacenet_data would have both has_gmac and
      has_gmac4 set.
      
      This would lead to stmmac_hw_init calling dwmac1000_setup rather than
      dwmac4_setup, resulting in a non-functional driver.
      This happened since the check for has_gmac is done before the check for
      has_gmac4. However, the order should not matter, so it does not make sense
      to have both set.
      
      If something is valid for both, you should do as the stmmac_interrupt does:
      if (priv->plat->has_gmac || priv->plat->has_gmac4) ...
      
      The places where it was obvious that the author actually meant
      if (has_gmac || has_gmac4) rather than if (has_gmac) has been updated.
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cc99fd2
    • Niklas Cassel's avatar
      net: stmmac: dwmac-generic: add missing compatible strings · 4966a692
      Niklas Cassel authored
      devicetree binding for stmmac states:
      - compatible: Should be "snps,dwmac-<ip_version>", "snps,dwmac"
      	For backwards compatibility: "st,spear600-gmac" is also supported.
      
      Since dwmac-generic.c calls stmmac_probe_config_dt explicitly,
      another alternative would have been to remove all compatible strings
      other than "snps,dwmac" and "st,spear600-gmac" from dwmac-generic.c.
      
      However, that would probably do more good than harm, since when trying
      to figure out what hardware a certain driver supports, you usually look
      at the compatible strings in the struct of_device_id, and not in some
      function defined in a completely different file.
      
      No functional change intended.
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4966a692
    • Niklas Cassel's avatar
      bindings: net: stmmac: correct note about TSO · 6357d15e
      Niklas Cassel authored
      snps,tso was previously placed under AXI BUS Mode parameters,
      suggesting that the property should be in the stmmac-axi-config node.
      
      TSO (TCP Segmentation Offloading) has nothing to do with AXI BUS Mode
      parameters, and the parser actually expects it to be in the root node,
      not in the stmmac-axi-config.
      
      Also added a note about snps,tso only being available on GMAC4 and newer.
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6357d15e
    • Tobias Klauser's avatar
      net: ll_temac: Utilize of_get_mac_address() · 06205472
      Tobias Klauser authored
      Do not open code getting the MAC address exclusively from the
      "local-mac-address" property, but instead use of_get_mac_address()
      which looks up the MAC address using the 3 typical property names.
      
      Also avoid casting away the const qualifier of the return value by
      making temac_init_mac_address() take a const void* address.
      
      Follows commit b34296a9 ("net: ethoc: Utilize
      of_get_mac_address()").
      
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      06205472
    • Tobias Klauser's avatar
      net: axienet: Utilize of_get_mac_address() · da90e380
      Tobias Klauser authored
      Do not open code getting the MAC address exclusively from the
      "local-mac-address" property, but instead use of_get_mac_address()
      which looks up the MAC address using the 3 typical property names.
      
      Also avoid casting away the const qualifier of the return value by
      making axienet_set_mac_address() take a const void* address.
      
      Follows commit b34296a9 ("net: ethoc: Utilize
      of_get_mac_address()").
      
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da90e380
    • David S. Miller's avatar
      Merge branch 'cls_flower-flags' · 8b7b707a
      David S. Miller authored
      Or Gerlitz says:
      
      ====================
      net/sched: cls_flower: Add support for matching on dissection flags
      
      This series add the UAPI to provide set of flags for matching, where the
      flags provided from user-space are mapped to flow-dissector flags.
      
      The 1st flag allows to match on whether the packet is an
      IP fragment and corresponds to the FLOW_DIS_IS_FRAGMENT flag.
      
      v2->v3:
        - replace BIT() with << (kbuild test robot)
      
      v1->v2:
       - dropped the flow dissector patch (#1) as no changes are needed there (Jiri)
       - applied code review comments from Jiri to the flower patch
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b7b707a
    • Or Gerlitz's avatar
      net/mlx5e: Offload TC matching on packets being IP fragments · 3f7d0eb4
      Or Gerlitz authored
      Enable offloading of matching on packets being fragments.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: default avatarPaul Blakey <paulb@mellanox.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f7d0eb4
    • Or Gerlitz's avatar
      net/sched: cls_flower: Add support for matching on flags · faa3ffce
      Or Gerlitz authored
      Add UAPI to provide set of flags for matching, where the flags
      provided from user-space are mapped to flow-dissector flags.
      
      The 1st flag allows to match on whether the packet is an
      IP fragment and corresponds to the FLOW_DIS_IS_FRAGMENT flag.
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: default avatarPaul Blakey <paulb@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      faa3ffce
    • Dan Carpenter's avatar
      net: mvneta: Indent some statements · d26aac2d
      Dan Carpenter authored
      These two statements were not indented correctly so it's sort of
      confusing.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d26aac2d
    • Dan Carpenter's avatar
      drivers: net: xgene: uninitialized variable in xgene_enet_free_pagepool() · 0b801290
      Dan Carpenter authored
      We never set "slots" in this function.
      
      Fixes: a9380b0f ("drivers: net: xgene: Add support for Jumbo frame")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b801290
    • Peng Tao's avatar
      vhost: remove unnecessary smp_mb from vhost_work_queue · 635abf01
      Peng Tao authored
      test_and_set_bit() already implies a memory barrier.
      Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      635abf01
    • Peng Tao's avatar
      1440a3a1
    • Zhang Shengju's avatar
      icmp: correct return value of icmp_rcv() · f91c58d6
      Zhang Shengju authored
      Currently, icmp_rcv() always return zero on a packet delivery upcall.
      
      To make its behavior more compliant with the way this API should be
      used, this patch changes this to let it return NET_RX_SUCCESS when the
      packet is proper handled, and NET_RX_DROP otherwise.
      Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f91c58d6
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 5fccd64a
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS updates for net-next
      
      The following patchset contains a large Netfilter update for net-next,
      to summarise:
      
      1) Add support for stateful objects. This series provides a nf_tables
         native alternative to the extended accounting infrastructure for
         nf_tables. Two initial stateful objects are supported: counters and
         quotas. Objects are identified by a user-defined name, you can fetch
         and reset them anytime. You can also use a maps to allow fast lookups
         using any arbitrary key combination. More info at:
      
         http://marc.info/?l=netfilter-devel&m=148029128323837&w=2
      
      2) On-demand registration of nf_conntrack and defrag hooks per netns.
         Register nf_conntrack hooks if we have a stateful ruleset, ie.
         state-based filtering or NAT. The new nf_conntrack_default_on sysctl
         enables this from newly created netnamespaces. Default behaviour is not
         modified. Patches from Florian Westphal.
      
      3) Allocate 4k chunks and then use these for x_tables counter allocation
         requests, this improves ruleset load time and also datapath ruleset
         evaluation, patches from Florian Westphal.
      
      4) Add support for ebpf to the existing x_tables bpf extension.
         From Willem de Bruijn.
      
      5) Update layer 4 checksum if any of the pseudoheader fields is updated.
         This provides a limited form of 1:1 stateless NAT that make sense in
         specific scenario, eg. load balancing.
      
      6) Add support to flush sets in nf_tables. This series comes with a new
         set->ops->deactivate_one() indirection given that we have to walk
         over the list of set elements, then deactivate them one by one.
         The existing set->ops->deactivate() performs an element lookup that
         we don't need.
      
      7) Two patches to avoid cloning packets, thus speed up packet forwarding
         via nft_fwd from ingress. From Florian Westphal.
      
      8) Two IPVS patches via Simon Horman: Decrement ttl in all modes to
         prevent infinite loops, patch from Dwip Banerjee. And one minor
         refactoring from Gao feng.
      
      9) Revisit recent log support for nf_tables netdev families: One patch
         to ensure that we correctly handle non-ethernet packets. Another
         patch to add missing logger definition for netdev. Patches from
         Liping Zhang.
      
      10) Three patches for nft_fib, one to address insufficient register
          initialization and another to solve incorrect (although harmless)
          byteswap operation. Moreover update xt_rpfilter and nft_fib to match
          lbcast packets with zeronet as source, eg. DHCP Discover packets
          (0.0.0.0 -> 255.255.255.255). Also from Liping Zhang.
      
      11) Built-in DCCP, SCTP and UDPlite conntrack and NAT support, from
          Davide Caratti. While DCCP is rather hopeless lately, and UDPlite has
          been broken in many-cast mode for some little time, let's give them a
          chance by placing them at the same level as other existing protocols.
          Thus, users don't explicitly have to modprobe support for this and
          NAT rules work for them. Some people point to the lack of support in
          SOHO Linux-based routers that make deployment of new protocols harder.
          I guess other middleboxes outthere on the Internet are also to blame.
          Anyway, let's see if this has any impact in the midrun.
      
      12) Skip software SCTP software checksum calculation if the NIC comes
          with SCTP checksum offload support. From Davide Caratti.
      
      13) Initial core factoring to prepare conversion to hook array. Three
          patches from Aaron Conole.
      
      14) Gao Feng made a wrong conversion to switch in the xt_multiport
          extension in a patch coming in the previous batch. Fix it in this
          batch.
      
      15) Get vmalloc call in sync with kmalloc flags to avoid a warning
          and likely OOM killer intervention from x_tables. From Marcelo
          Ricardo Leitner.
      
      16) Update Arturo Borrero's email address in all source code headers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fccd64a
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 63c36c40
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2016-12-07
      
      This series contains updates to i40e and i40evf only.
      
      Filip modifies the i40e to log link speed change and when the link is
      brought up and down.
      
      Mitch replaces i40e_txd_use_count() with a new function which is slightly
      faster and better documented so the dim witted can better follow the
      code.  Fixes the locking of the service task so that it is actually
      done in the service task and not in the scheduling function which calls
      the service task.
      
      Jacob, being the busy little beaver he is, provides most of the changes
      starting restores a workaround that is still needed in some configurations,
      specifically the Ethernet Controller XL710 for 40GbE QSFP+.  Removes
      duplicate code and simplifies the i40e_vsi_add_vlan() and
      i40e_vsi_kill_vlan() functions.  Removes detection of PTP frames over L4
      (UDP) on the XL710 MAC, since there was a product decision to defeature
      it.  Fixed a previous refactor of active filters which caused issues in
      the accounting of active_filters.  Remaining work was done in the VLAN
      filters to improve readability and simplify code as much as possible
      to reduce inconsistencies.
      
      Alex fixes foul budget accounting in core code by returning actual
      work done, capped to budget-1.
      
      Henry fixes the "ethtool -p" function for 1G BaseT PHYs.
      
      Carolyn adds support for 25G devices for i40e and i40evf.
      
      Michal adds functions to apply the correct access method for external PHYs
      which could use Clause22 or Clause45 depending on the PHY.
      
      v2: dropped last patch from previous series, since changes are needed based
          on feedback from Sergei Shtylyov
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      63c36c40
  2. 07 Dec, 2016 21 commits