1. 31 Aug, 2017 15 commits
  2. 30 Aug, 2017 25 commits
    • Haiyang Zhang's avatar
      hv_netvsc: Fix typos in the document of UDP hashing · d35d6e92
      Haiyang Zhang authored
      There are two typos in the document, netvsc.txt,
      regarding UDP hashing level. This patch fixes them.
      Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d35d6e92
    • Eric Dumazet's avatar
      xen-netfront: be more drop monitor friendly · 62f3250f
      Eric Dumazet authored
      xennet_start_xmit() might copy skb with inappropriate layout
      into a fresh one.
      
      Old skb is freed, and at this point it is not a drop, but
      a consume. New skb will then be either consumed or dropped.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      62f3250f
    • Gal Pressman's avatar
      net/mlx5e: Support RSS for GRE tunneled packets · 7b3722fa
      Gal Pressman authored
      Introduce a new flow table and indirect TIRs which are used to hash the
      inner packet headers of GRE tunneled packets.
      
      When a GRE tunneled packet is received, the TTC flow table will match
      the new IPv4/6->GRE rules which will forward it to the inner TTC table.
      The inner TTC is similar to its counterpart outer TTC table, but
      matching the inner packet headers instead of the outer ones (and does
      not include the new IPv4/6->GRE rules).
      The new rules will not add steering hops since they are added to an
      already existing flow group which will be matched regardless of this
      patch. Non GRE traffic will not be affected.
      
      The inner flow table will forward the packet to inner indirect TIRs
      which hash the inner packet and thus result in RSS for the tunneled
      packets.
      
      Testing 8 TCP streams bandwidth over GRE:
      System: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
      NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex]
      Before: 21.3 Gbps (Single RQ)
      Now   : 90.5 Gbps (RSS spread on 8 RQs)
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      7b3722fa
    • Gal Pressman's avatar
      net/mlx5e: Support TSO and TX checksum offloads for GRE tunnels · 27299841
      Gal Pressman authored
      Add TX offloads support for GRE tunneled packets by reporting the needed
      netdev features.
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      27299841
    • Gal Pressman's avatar
      net/mlx5e: Use IP version matching to classify IP traffic · 888fcd9c
      Gal Pressman authored
      This change adds the ability for flow steering to classify IPv4/6
      packets with MPLS tag (Ethertype 0x8847 and 0x8848) as standard IP
      packets and hit IPv4/6 classification steering rules.
      
      Since IP packets with MPLS tag header have MPLS ethertype, they
      missed the IPv4/6 ethertype rule and ended up hitting the default
      filter forwarding all the packets to the same single RQ (No RSS).
      
      Since our device is able to look past the MPLS tag and identify the
      next protocol we introduce this solution which replaces ethertype
      matching by the device's capability to perform IP version
      identification and matching in order to distinguish between IPv4 and
      IPv6.
      Therefore, when driver is performing flow steering configuration on the
      device it will use IP version matching in IP classified rules instead
      of ethertype matching which will cause relevant MPLS tagged packets to
      hit this rule as well.
      
      If the device doesn't support IP version matching the driver will fall back
      to use legacy ethertype matching in the steering as before.
      Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      888fcd9c
    • Colin Ian King's avatar
      bpf: test_maps: fix typos, "conenct" and "listeen" · 90774a93
      Colin Ian King authored
      Trivial fix to typos in printf error messages:
      "conenct" -> "connect"
      "listeen" -> "listen"
      
      thanks to Daniel Borkmann for spotting one of these mistakes
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90774a93
    • Colin Ian King's avatar
      qed: fix spelling mistake: "calescing" -> "coalescing" · 9e4a5613
      Colin Ian King authored
      Trivial fix to spelling mistake in DP_NOTICE message
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e4a5613
    • Salil Mehta's avatar
      net: hns3: Fixes the wrong IS_ERR check on the returned phydev value · 752b0694
      Salil Mehta authored
      This patch removes the wrong check being done for the phy device being
      returned by the mdiobus_get_phy() function. This function never returns
      the error pointers.
      
      Fixes: 256727da ("net: hns3: Add MDIO support to HNS3 Ethernet
      Driver for hip08 SoC")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      752b0694
    • Bhumika Goyal's avatar
      net: bcm63xx_enet: make bcm_enetsw_ethtool_ops const · dc8007e8
      Bhumika Goyal authored
      Make this const as it is never modified.
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc8007e8
    • Ahmed Abdelsalam's avatar
      ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200" · 5829d70b
      Ahmed Abdelsalam authored
      IPv6 packet may carry more than one extension header, and IPv6 nodes must
      accept and attempt to process extension headers in any order and occurring
      any number of times in the same packet. Hence, there should be no
      assumption that Segment Routing extension header is to appear immediately
      after the IPv6 header.
      
      Moreover, section 4.1 of RFC 8200 gives a recommendation on the order of
      appearance of those extension headers within an IPv6 packet. According to
      this recommendation, Segment Routing extension header should appear after
      Hop-by-Hop and Destination Options headers (if they present).
      
      This patch fixes the get_srh(), so it gets the segment routing header
      regardless of its position in the chain of the extension headers in IPv6
      packet, and makes sure that the IPv6 routing extension header is of Type 4.
      Signed-off-by: default avatarAhmed Abdelsalam <amsalam20@gmail.com>
      Acked-by: default avatarDavid Lebrun <david.lebrun@uclouvain.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5829d70b
    • David S. Miller's avatar
      Merge branch 'mvpp2-comphy' · 35aed4ac
      David S. Miller authored
      Antoine Tenart says:
      
      ====================
      net: mvpp2: comphy configuration
      
      This series, following up the one one the GoP/MAC configuration, aims at
      stopping to depend on the firmware/bootloader configuration when using
      the PPv2 engine. With this series the PPv2 driver does not need to rely
      on a previous configuration, and dynamic reconfiguration while the
      kernel is running can be done (i.e. switch one port from SGMII to 10G,
      or the opposite). A port can now be configured in a different mode than
      what's done in the firmware/bootloader as well.
      
      The series first contain patches in the generic PHY framework to support
      what is called the comphy (common PHYs), which is an h/w block providing
      PHYs that can be configured in various modes ranging from SGMII, 10G
      to SATA and others. As of now only the SGMII and 10G modes are
      supported by the comphy driver.
      
      Then patches are modifying the PPv2 driver to first add the comphy
      initialization sequence (i.e. calls to the generic PHY framework) and to
      then take advantage of this to allow dynamic reconfiguration (i.e.
      configuring the mode of a port given what's connected, between sgmii and
      10G). Note the use of the comphy in the PPv2 driver is kept optional
      (i.e. if not described in dt the driver still as before an relies on the
      firmware/bootloader configuration).
      
      Finally there are dt/defconfig patches to describe and take advantage of
      this.
      
      This was tested on a range of devices: 8040-db, 8040-mcbin and 7040-db.
      
      @Dave: the dt patches should go through the mvebu tree (patches 9-13).
      
      Thanks!
      Antoine
      
      Since v3:
        - Now use of_phy_simple_xlate() to retrieve the phy.
        - Added an owner in the phy_ops structure.
        - Now allow the module to be selected with COMPILE_TEST.
        - Removed unused parameter in the comphy set_mode functions.
        - Added Kishon Acked-by in patch 1.
      
      Since v2:
        - Kept the link mode enforcement.
        - Removed the netif_running() check.
        - Reworded the "dynamic reconfiguration of the PHY mode" commit log.
        - Added one patch not to force the GMAC autoneg parameters when using
          the XLG MAC.
      
      Since v1:
        - Updated the mode settings variable name in the comphy driver to
          have 'cp110' in it.
        - Documented the PHY cell argument in the dt documentation.
        - New patch adding comphy phandles for the 7040-db board.
        - Checked if the carrier_on/off functions were needed. They are.
        - s/PHY/generic PHY/ in commit log of patch 1.
        - Rebased on the latest net-next/master.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      35aed4ac
    • Antoine Tenart's avatar
      net: mvpp2: dynamic reconfiguration of the comphy/GoP/MAC · 89273bc0
      Antoine Tenart authored
      This patch adds logic to reconfigure the comphy/GoP/MAC when the link
      state is updated at runtime. This is very useful on boards where many
      link speed are supported: depending on what is negotiated the PPv2
      driver will automatically reconfigures the link between the PHY and the
      MAC.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      89273bc0
    • Antoine Tenart's avatar
      net: mvpp2: do not set GMAC autoneg when using XLG MAC · 65a2c09a
      Antoine Tenart authored
      When using the XLG MAC, it does not make sense to force the GMAC autoneg
      parameters. This patch adds checks to only set the GMAC autoneg
      parameters when needed (i.e. when not using the XLG MAC).
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      65a2c09a
    • Antoine Tenart's avatar
      net: mvpp2: improve the link management function · f55744ad
      Antoine Tenart authored
      When the link status changes, the phylib calls the link_event function
      in the mvpp2 driver. Before this patch only the egress/ingress transmit
      was enabled/disabled. This patch adds more functionality to the link
      status management code by enabling/disabling the port per-cpu
      interrupts, and the port itself. The queues are now stopped as well, and
      the netif carrier helpers are called.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f55744ad
    • Antoine Tenart's avatar
      net: mvpp2: simplify the link_event function · 968b211c
      Antoine Tenart authored
      The link_event function is somewhat complicated. This cosmetic patch
      simplifies it.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      968b211c
    • Antoine Tenart's avatar
      net: mvpp2: initialize the comphy · 542897d9
      Antoine Tenart authored
      On some platforms, the comphy is between the MAC GoP and the PHYs. The
      mvpp2 driver currently relies on the firmware/bootloader to configure
      the comphy. As a comphy driver was added to the generic PHY framework,
      this patch uses it in the mvpp2 driver to configure the comphy at boot
      time to avoid relying on the bootloader.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      542897d9
    • Antoine Tenart's avatar
      Documentation/bindings: phy: document the Marvell comphy driver · 9c2cbd47
      Antoine Tenart authored
      The Marvell Armada 7K/8K SoCs contains an hardware block called COMPHY
      that provides a number of shared PHYs used by various interfaces in the
      SoC: network, SATA, PCIe, etc. This Device Tree binding allows to
      describe this COMPHY hardware block.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c2cbd47
    • Antoine Tenart's avatar
      phy: add the mvebu cp110 comphy driver · d0438bd6
      Antoine Tenart authored
      On the CP110 unit, which can be found on various Marvell platforms such
      as the 7k and 8k (currently), a comphy (common PHYs) hardware block can
      be found. This block provides a number of PHYs which can be used in
      various modes by other controllers (network, SATA ...). These common
      PHYs must be configured for the controllers using them to work correctly
      either at boot time, or when the system runs to switch the mode used.
      This patch adds a driver for this comphy hardware block, providing
      callbacks for the its PHYs so that consumers can configure the modes
      used.
      
      As of this commit, two modes are supported by the comphy driver: sgmii
      and 10gkr.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0438bd6
    • Antoine Tenart's avatar
      phy: add sgmii and 10gkr modes to the phy_mode enum · 5c23f2dc
      Antoine Tenart authored
      This patch adds more generic PHY modes to the phy_mode enum, to
      allow configuring generic PHYs to the SGMII and/or the 10GKR mode
      by using the set_mode callback.
      Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
      Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c23f2dc
    • Stefan Sørensen's avatar
      dp83640: don't hold spinlock while calling netif_rx_ni · d36b82bc
      Stefan Sørensen authored
      We should not hold a spinlock while pushing the skb into the networking
      stack, so move the call to netif_rx_ni out of the critical region to where
      we have dropped the spinlock.
      Signed-off-by: default avatarStefan Sørensen <stefan.sorensen@spectralink.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d36b82bc
    • David S. Miller's avatar
      Merge branch 'net_sched-idr' · f379fdf1
      David S. Miller authored
      Chris Mi says:
      
      ====================
      net/sched: Improve getting objects by indexes
      
      Using current TC code, it is very slow to insert a lot of rules.
      
      In order to improve the rules update rate in TC,
      we introduced the following two changes:
              1) changed cls_flower to use IDR to manage the filters.
              2) changed all act_xxx modules to use IDR instead of
                 a small hash table
      
      But IDR has a limitation that it uses int. TC handle uses u32.
      To make sure there is no regression, we add several new IDR APIs
      to support unsigned long.
      
      v2
      ==
      
      Addressed Hannes's comment:
      express idr_alloc in terms of idr_alloc_ext and most of the other functions
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f379fdf1
    • Chris Mi's avatar
      net/sched: Change act_api and act_xxx modules to use IDR · 65a206c0
      Chris Mi authored
      Typically, each TC filter has its own action. All the actions of the
      same type are saved in its hash table. But the hash buckets are too
      small that it degrades to a list. And the performance is greatly
      affected. For example, it takes about 0m11.914s to insert 64K rules.
      If we convert the hash table to IDR, it only takes about 0m1.500s.
      The improvement is huge.
      
      But please note that the test result is based on previous patch that
      cls_flower uses IDR.
      Signed-off-by: default avatarChris Mi <chrism@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      65a206c0
    • Chris Mi's avatar
      net/sched: Change cls_flower to use IDR · c15ab236
      Chris Mi authored
      Currently, all filters with the same priority are linked in a doubly
      linked list. Every filter should have a unique handle. To make the
      handle unique, we need to iterate the list every time to see if the
      handle exists or not when inserting a new filter. It is time-consuming.
      For example, it takes about 5m3.169s to insert 64K rules.
      
      This patch changes cls_flower to use IDR. With this patch, it
      takes about 0m1.127s to insert 64K rules. The improvement is huge.
      
      But please note that in this testing, all filters share the same action.
      If every filter has a unique action, that is another bottleneck.
      Follow-up patch in this patchset addresses that.
      Signed-off-by: default avatarChris Mi <chrism@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c15ab236
    • Chris Mi's avatar
      idr: Add new APIs to support unsigned long · 388f79fd
      Chris Mi authored
      The following new APIs are added:
      
      int idr_alloc_ext(struct idr *idr, void *ptr, unsigned long *index,
                        unsigned long start, unsigned long end, gfp_t gfp);
      void *idr_remove_ext(struct idr *idr, unsigned long id);
      void *idr_find_ext(const struct idr *idr, unsigned long id);
      void *idr_replace_ext(struct idr *idr, void *ptr, unsigned long id);
      void *idr_get_next_ext(struct idr *idr, unsigned long *nextid);
      Signed-off-by: default avatarChris Mi <chrism@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      388f79fd
    • David S. Miller's avatar
      Merge branch 'add-rmnet-driver' · c2f8a6ce
      David S. Miller authored
      Subash Abhinov Kasiviswanathan says:
      
      ====================
      net: Add support for rmnet driver
      
      This patch series adds support for the rmnet driver which is required to
      support recent chipsets using Qualcomm Technologies, Inc. modems. The data
      from hardware follows the multiplexing and aggregation protocol (MAP).
      
      This driver can be used to register onto any physical network device in
      IP mode. Physical transports include USB, HSIC, PCIe and IP accelerator.
      
      rmnet driver helps to decode these packets and queue them to network
      stack (and encode and transmit it to the physical device).
      
      v1: Same as the RFC patch with some minor fixes for issues reported by
      kbuild test robot.
      
      v1->v2: Change datatypes and remove config IOCTL as mentioned by David.
      Also fix checkpatch issues and remove some unused code.
      
      v2->v3: Move location to drivers/net and rename to rmnet. Change the
      userspace - netlink communication from custom netlink to rtnl_link_ops.
      Refactor some code. Use a fixed config for ingress and egress.
      
      v3->v4: Move location to drivers/net/ethernet/qualcomm/.
      Fix comments from Stephen and Jiri -
      Split the ether and arp type changes into seperate patches.
      Remove debug and custom logging and switch to standard netdevice log.
      Remove module parameters. Refactor and change some code style issues.
      
      v4->v5: Rename some structs and variables. Move the initializer
      before the for loop start. Put the arp type in correct sequence.
      
      v5->v6: Fix comments from Dan -
      Use the upper link API. As a result, remove all the refcounting logic.
      Device refcount is explicitly held on real_dev on rx_handler
      registration only. Modifiy the flow control struct. Remove the unused
      ethernet mode handling.
      
      v6->v7: Fix comments from David - Add newline to end of Makefile. Remove
      inline from .c files. Move the module init/exit to rmnet config. Fix an
      error reported by kbuild test robot for an unused file.
      
      v7->v8: Use a smaller value for ETH_P_MAP as mentioned by David. Change
      netdev_info to netdev_dbg as mentioned by Andew. Fix comments from
      Stephen regarding netdev_priv and sparse related errors of using 0 as NULL
      
      v8->v9: Fix comments from David - Remove the CFLAG rule. Change the way
      rmnet devices are freed. Instead of using a workqueue to unregister devices
      individually, go through the list and free all devices within the rtnl_lock().
      
      v9->v10: Actually fix the locking as mentioned by David. The locking scheme is
      mentioned in a comment in rmnet_config.c. Change comment near MAP type
      definition as mentioned by Dan. Refactor some code.
      
      v10->v11: Allow RMNET to compile as a module as mentioned by David
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c2f8a6ce