1. 23 Oct, 2015 12 commits
    • David S. Miller's avatar
      Merge branch 'mpls_multipath' · e74f5105
      David S. Miller authored
      Roopa Prabhu says:
      
      ====================
      mpls: multipath support
      
      This patch adds support for MPLS multipath routes.
      
      Includes following changes to support multipath:
      - splits struct mpls_route into 'struct mpls_route + struct mpls_nh'.
      
      - struct mpls_nh represents a mpls nexthop label forwarding entry
      
      - Adds support to parse/fill RTA_MULTIPATH netlink attribute for
      multipath routes similar to ipv4/v6 fib
      
      - In the process of restructuring, this patch also consistently changes all
      labels to u8
      
      $ip -f mpls route add 100 nexthop as 200 via inet 10.1.1.2 dev swp1 \
      		nexthop as 700 via inet 10.1.1.6 dev swp2 \
      		nexthop as 800 via inet 40.1.1.2 dev swp3
      
      $ip  -f mpls route show
      100
      	nexthop as to 200 via inet 10.1.1.2  dev swp1
      	nexthop as to 700 via inet 10.1.1.6  dev swp2
      	nexthop as to 800 via inet 40.1.1.2  dev swp3
      ====================
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Acked-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e74f5105
    • Robert Shearman's avatar
      mpls: flow-based multipath selection · 1c78efa8
      Robert Shearman authored
      Change the selection of a multipath route to use a flow-based
      hash. This more suitable for traffic sensitive to reordering within a
      flow (e.g. TCP, L2VPN) and whilst still allowing a good distribution
      of traffic given enough flows.
      
      Selection of the path for a multipath route is done using a hash of:
      1. Label stack up to MAX_MP_SELECT_LABELS labels or up to and
         including entropy label, whichever is first.
      2. 3-tuple of (L3 src, L3 dst, proto) from IPv4/IPv6 header in MPLS
         payload, if present.
      
      Naturally, a 5-tuple hash using L4 information in addition would be
      possible and be better in some scenarios, but there is a tradeoff
      between looking deeper into the packet to achieve good distribution,
      and packet forwarding performance, and I have erred on the side of the
      latter as the default.
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c78efa8
    • Roopa Prabhu's avatar
      mpls: multipath route support · f8efb73c
      Roopa Prabhu authored
      This patch adds support for MPLS multipath routes.
      
      Includes following changes to support multipath:
      - splits struct mpls_route into 'struct mpls_route + struct mpls_nh'
      
      - 'struct mpls_nh' represents a mpls nexthop label forwarding entry
      
      - moves mpls route and nexthop structures into internal.h
      
      - A mpls_route can point to multiple mpls_nh structs
      
      - the nexthops are maintained as a array (similar to ipv4 fib)
      
      - In the process of restructuring, this patch also consistently changes
        all labels to u8
      
      - Adds support to parse/fill RTA_MULTIPATH netlink attribute for
      multipath routes similar to ipv4/v6 fib
      
      - In this patch, the multipath route nexthop selection algorithm
      simply returns the first nexthop. It is replaced by a
      hash based algorithm from Robert Shearman in the next patch
      
      - mpls_route_update cleanup: remove 'dev' handling in mpls_route_update.
      mpls_route_update though implemented to update based on dev, it was
      never used that way. And the dev handling gets tricky with multiple
      nexthops. Cannot match against any single nexthops dev. So, this patch
      removes the unused 'dev' handling in mpls_route_update.
      
      - dead route/path handling will be implemented in a subsequent patch
      
      Example:
      
      $ip -f mpls route add 100 nexthop as 200 via inet 10.1.1.2 dev swp1 \
                      nexthop as 700 via inet 10.1.1.6 dev swp2 \
                      nexthop as 800 via inet 40.1.1.2 dev swp3
      
      $ip  -f mpls route show
      100
              nexthop as to 200 via inet 10.1.1.2  dev swp1
              nexthop as to 700 via inet 10.1.1.6  dev swp2
              nexthop as to 800 via inet 40.1.1.2  dev swp3
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Acked-by: default avatarRobert Shearman <rshearma@brocade.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8efb73c
    • David S. Miller's avatar
      Merge branch 'mdiobus_nested_read_write' · 654c9c54
      David S. Miller authored
      Neil Armstrong says:
      
      ====================
      Refactor nested mdiobus read/write functions
      
      In order to avoid locked signal false positive for nested mdiobus
      read/write calls, nested code was introduced in mv88e6xxx and
      mdio-mux.
      But mv88e6060 also needs such nested mdiobus read/write calls.
      For sake of refactoring, introduce nested variants of mdiobus read/write
      and make them used by mv88e6xxx and mv88e6060.
      In a next patch, mdio-mux should also use these variant calls.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      654c9c54
    • Neil Armstrong's avatar
      net: dsa: Make mv88e6060 use nested mdiobus read/write · f0505610
      Neil Armstrong authored
      Like mv88e6xxx and mdio-mux, to avoid lockdep give false positives
      because of nested MDIO busses, switch to previously introduced
      nested mdiobus_read/write variants.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f0505610
    • Neil Armstrong's avatar
      net: dsa: Make mv88e6xxx use nested mdiobus read/write · 6e899e6c
      Neil Armstrong authored
      Make the mv88e6xxx driver use the previously introduced nested
      variants of mdiobus_read/write functions.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e899e6c
    • Neil Armstrong's avatar
      net: phy: Add nested variants of mdiobus read/write · 21dd19fe
      Neil Armstrong authored
      Since nested variants of mdiobus_read/write are used in multiple
      drivers, add nested variants in the mdiobus core.
      Suggested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21dd19fe
    • Grygorii Strashko's avatar
      drivers: net: cpsw: use module_platform_driver · 6fb3b6b5
      Grygorii Strashko authored
      There is no reasons to probe cpsw from late_initcall level
      and it's not recommended. Hence, use module_platform_driver()
      to register and probe cpsw driver from module_init() level.
      
      Cc: Tony Lindgren <tony@atomide.com>
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6fb3b6b5
    • Eric Dumazet's avatar
      tcp/dccp: fix hashdance race for passive sessions · 5e0724d0
      Eric Dumazet authored
      Multiple cpus can process duplicates of incoming ACK messages
      matching a SYN_RECV request socket. This is a rare event under
      normal operations, but definitely can happen.
      
      Only one must win the race, otherwise corruption would occur.
      
      To fix this without adding new atomic ops, we use logic in
      inet_ehash_nolisten() to detect the request was present in the same
      ehash bucket where we try to insert the new child.
      
      If request socket was not found, we have to undo the child creation.
      
      This actually removes a spin_lock()/spin_unlock() pair in
      reqsk_queue_unlink() for the fast path.
      
      Fixes: e994b2f0 ("tcp: do not lock listener to process SYN packets")
      Fixes: 079096f1 ("tcp/dccp: install syn_recv requests into ehash table")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e0724d0
    • Paolo Abeni's avatar
      ipv4: implement support for NOPREFIXROUTE ifa flag for ipv4 address · 7b131180
      Paolo Abeni authored
      Currently adding a new ipv4 address always cause the creation of the
      related network route, with default metric. When a host has multiple
      interfaces on the same network, multiple routes with the same metric
      are created.
      
      If the userspace wants to set specific metric on each routes, i.e.
      giving better metric to ethernet links in respect to Wi-Fi ones,
      the network routes must be deleted and recreated, which is error-prone.
      
      This patch implements the support for IFA_F_NOPREFIXROUTE for ipv4
      address. When an address is added with such flag set, no associated
      network route is created, no network route is deleted when
      said IP is gone and it's up to the user space manage such route.
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b131180
    • Michael Chan's avatar
      bnxt_en: New Broadcom ethernet driver. · c0c050c5
      Michael Chan authored
      Broadcom ethernet driver for the new family of NetXtreme-C/E
      ethernet devices.
      
      v5:
        - Removed empty blank lines at end of files (noted by David Miller).
        - Moved busy poll helper functions to bnxt.h to at least make the
          .c file look less cluttered with #ifdef (noted by Stephen Hemminger).
      
      v4:
        - Broke up 2 long message strings with "\n" (suggested by John Linville)
        - Constify an array of strings (suggested by Stephen Hemminger)
        - Improve bnxt_vf_pciid() (suggested by Stephen Hemminger)
        - Use PCI_VDEVICE() to populate pci_device_id table for more compact
          source.
      
      v3:
        - Fixed 2 more sparse warnings.
        - Removed some unused structures in .h files.
      
      v2:
        - Fixed all kbuild test robot reported warnings.
        - Fixed many of the checkpatch.pl errors and warnings.
        - Fixed the Kconfig description (noted by Dmitry Kravkov).
      Acked-by: default avatarEddie Wai <eddie.wai@broadcom.com>
      Acked-by: default avatarJeffrey Huang <huangjw@broadcom.com>
      Signed-off-by: default avatarPrashant Sreedharan <prashant@broadcom.com>
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c0c050c5
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: remove debugfs interface · 0a31adae
      Vivien Didelot authored
      It is preferable to have a common debugfs interface for DSA or switchdev
      instead of a driver specific one. Thus remove the mv88e6xxx debug code.
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a31adae
  2. 22 Oct, 2015 28 commits