1. 27 Feb, 2015 7 commits
    • Alexander Duyck's avatar
      fib_trie: Add slen to fib alias · 9b6ebad5
      Alexander Duyck authored
      Make use of an empty spot in the alias to store the suffix length so that
      we don't need to pull that information from the leaf_info structure.
      
      This patch also makes a slight change to the user statistics.  Instead of
      incrementing semantic_match_miss once per leaf_info miss we now just
      increment it once per leaf if a match was not found.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b6ebad5
    • Alexander Duyck's avatar
      fib_trie: Replace plen with slen in leaf_info · 5786ec60
      Alexander Duyck authored
      This replaces the prefix length variable in the leaf_info structure with a
      suffix length value, or host identifier length in bits.  By doing this it
      makes it easier to sort out since the tnodes and leaf are carrying this
      value as well since it is compatible with the ->pos field in tnodes.
      
      I also cleaned up one spot that had some list manipulation that could be
      simplified.  I basically updated it so that we just use hlist_add_head_rcu
      instead of calling hlist_add_before_rcu on the first node in the list.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5786ec60
    • Alexander Duyck's avatar
      fib_trie: Convert fib_alias to hlist from list · 56315f9e
      Alexander Duyck authored
      There isn't any advantage to having it as a list and by making it an hlist
      we make the fib_alias more compatible with the list_info in terms of the
      type of list used.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56315f9e
    • David S. Miller's avatar
      Merge branch 'ip_level_multicast_join_leave' · 7705f730
      David S. Miller authored
      Madhu Challa says:
      
      ====================
      Multicast group join/leave at ip level
      
      This series enables configuring multicast group join/leave at ip level
      by extending the "ip address" command.
      
      It adds a new control socket mc_autojoin_sock and ifa_flag IFA_F_MCAUTOJOIN
      to invoke the corresponding igmp group join/leave api.
      
      Since the igmp group join/leave api takes the rtnl_lock the code had to
      be refactored by adding a shim layer prefixed by __ that can be invoked
      by code that already has the rtnl_lock. This way we avoid proliferation of
      work queues.
      
      The first patch in this series does the refactoring for igmp v6.
      Its based on igmp v4 changes that were added by Eric Dumazet.
      
      The second patch in this series does the group join/leave based on the
      setting of the IFA_F_MCAUTOJOIN flag.
      
      v5:
      - addressed comments from Daniel Borkmann.
       - removed blank line in patch 1/2
       - removed unused variable, const arg in patch 2/2
      v4:
      - addressed comments from Yoshifuji Hideaki.
       - Remove WARN_ON not needed because we return a value from v2.
      - addressed comments from Daniel Borkmann.
       - rename sock to mc_autojoin_sk
       - ip_mc_config() pass ifa so it needs one less argument.
       - igmp_net_{init|destroy}() use inet_ctl_sock_{create|destroy}
       - inet_rtm_newaddr() change scope of ret.
       - igmp_net_init() no need to initialize sock to NULL.
      v3:
      - addressed comments from David Miller.
       - fixed indentation and local variable order.
      v2:
      - addressed comments from Eric Dumazet.
       - removed workqueue and call __ip_mc_{join|leave}_group or
         __ipv6_sock_mc_{join|drop}
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7705f730
    • Madhu Challa's avatar
      multicast: Extend ip address command to enable multicast group join/leave on · 93a714d6
      Madhu Challa authored
      Joining multicast group on ethernet level via "ip maddr" command would
      not work if we have an Ethernet switch that does igmp snooping since
      the switch would not replicate multicast packets on ports that did not
      have IGMP reports for the multicast addresses.
      
      Linux vxlan interfaces created via "ip link add vxlan" have the group option
      that enables then to do the required join.
      
      By extending ip address command with option "autojoin" we can get similar
      functionality for openvswitch vxlan interfaces as well as other tunneling
      mechanisms that need to receive multicast traffic. The kernel code is
      structured similar to how the vxlan driver does a group join / leave.
      
      example:
      ip address add 224.1.1.10/24 dev eth5 autojoin
      ip address del 224.1.1.10/24 dev eth5
      Signed-off-by: default avatarMadhu Challa <challa@noironetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93a714d6
    • Madhu Challa's avatar
      igmp v6: add __ipv6_sock_mc_join and __ipv6_sock_mc_drop · 46a4dee0
      Madhu Challa authored
      Based on the igmp v4 changes from Eric Dumazet.
      959d10f6("igmp: add __ip_mc_{join|leave}_group()")
      
      These changes are needed to perform igmp v6 join/leave while
      RTNL is held.
      
      Make ipv6_sock_mc_join and ipv6_sock_mc_drop wrappers around
      __ipv6_sock_mc_join and  __ipv6_sock_mc_drop to avoid
      proliferation of work queues.
      Signed-off-by: default avatarMadhu Challa <challa@noironetworks.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46a4dee0
    • Tom Herbert's avatar
      udp: In udp_flow_src_port use random hash value if skb_get_hash fails · 723b8e46
      Tom Herbert authored
      In the unlikely event that skb_get_hash is unable to deduce a hash
      in udp_flow_src_port we use a consistent random value instead.
      This is specified in GRE/UDP draft section 3.2.1:
      https://tools.ietf.org/html/draft-ietf-tsvwg-gre-in-udp-encap-04Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      723b8e46
  2. 26 Feb, 2015 5 commits
    • Roopa Prabhu's avatar
      bridge: fix link notification skb size calculation to include vlan ranges · fed0a159
      Roopa Prabhu authored
      my previous patch skipped vlan range optimizations during skb size
      calculations for simplicity.
      
      This incremental patch considers vlan ranges during
      skb size calculations. This leads to a bit of code duplication
      in the fill and size calculation functions. But, I could not find a
      prettier way to do this. will take any suggestions.
      
      Previously, I had reused the existing br_get_link_af_size size calculation
      function to calculate skb size for notifications. Reusing it this time
      around creates some change in behaviour issues for the usual
      .get_link_af_size callback.
      
      This patch adds a new br_get_link_af_size_filtered() function to
      base the size calculation on the incoming filter flag and include
      vlan ranges.
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Reviewed-by: default avatarScott Feldman <sfeldma@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fed0a159
    • David S. Miller's avatar
      Merge branch 'rocker-next' · 90030191
      David S. Miller authored
      Scott Feldman says:
      
      ====================
      rocker cleanups
      
      Pushing out some rocker cleanups I've had in my queue for a while.  Nothing
      major, just some sync-up with changes that already went into device code
      (hard-coding desc err return values and lport renaming).  Also fixup
      port fowarding transitions prompted by some DSA discussions about how to
      restore port state when port leaves bridge.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90030191
    • Scott Feldman's avatar
      rocker: put port in FORWADING state after leaving bridge · e47172ab
      Scott Feldman authored
      Cleanup the port forwarding state transitions for the cases when the port
      joins or leaves a bridge, or is brought admin UP or DOWN.  When port is
      bridged, we can rely on bridge driver putting port in correct state using
      STP callback into port driver, regardless if bridge is enabled for STP or not.
      When port is not bridged, we can reuse some of the STP code to enabled or
      disable forwarding depending on UP or DOWN.
      
      Tested by trying all the transitions from bridge/not bridge, and UP/DOWN, and
      verifying port is in the correct forwarding state after each transition.
      Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e47172ab
    • Scott Feldman's avatar
      rocker: rename lport to pport · 4a6bb6d3
      Scott Feldman authored
      This is just a rename of physical ports from "lport" to "pport".  Not a
      functional change.  OF-DPA uses logical ports (lport) for tunnels, but the
      driver (and device) were using "lport" for physical ports.  Renaming physical
      ports references to "pport", freeing up "lport" for use later with tunnels.
      Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a6bb6d3
    • Scott Feldman's avatar
      rocker: fix non-portable err return codes · 7eb344f8
      Scott Feldman authored
      The rocker device returns error codes if something goes wrong with descriptor
      processing.  Originally the device used standard errno codes for different
      errors, but since those errno codes aren't portable across ARCHs, the device
      now returns hard-coded error codes that stay constant across diff ARCHs.  Fix
      driver to use those same hard-coded values.
      Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7eb344f8
  3. 25 Feb, 2015 21 commits
  4. 24 Feb, 2015 7 commits
    • Tino Reichardt's avatar
      net: via-rhine: add BQL support · 92bf2008
      Tino Reichardt authored
      Add Byte Queue Limits (BQL) support to via-rhine driver.
      
      [edumazet] tweaked patch and changed TX_RING_SIZE from 16 to 64
      Signed-off-by: default avatarTino Reichardt <milky-kernel@mcmilk.de>
      Tested-by: default avatarJamie Gloudon <jamie.gloudon@gmail.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      92bf2008
    • Ian Morris's avatar
      ipv6: remove dead debug code from ip6_tunnel.c · 49e64dcd
      Ian Morris authored
      The IP6_TNL_TRACE macro is no longer used anywhere in the code so remove definition.
      Signed-off-by: default avatarIan Morris <ipm@chirality.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49e64dcd
    • David S. Miller's avatar
      Merge branch 'bonding-next' · 8ff3ac06
      David S. Miller authored
      Mahesh Bandewar says:
      
      ====================
      (Shortened) Bonding patch series
      
      I'm shortening the earlier patch series to just two patches at this moment.
      Andy is going to integrate remaining 3 patches with his netlink changes
      and post the completed patches.
      
      These two patches are the same one from the previous patch series with
      some styling changes (Dave Miller's suggestions) for the churn-machine patch.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ff3ac06
    • Mahesh Bandewar's avatar
      bonding: Implement port churn-machine (AD standard 43.4.17). · 14c9551a
      Mahesh Bandewar authored
      The Churn Detection machines detect the situation where a port is operable,
      but the Actor and Partner have not attached the link to an Aggregator and
      brought the link into operation within a bound time period. Under normal
      operation of the LACP, agreement between Actor and Partner should be reached
      very rapidly. Continued failure to reach agreement can be symptomatic of
      device failure.
      
      Actor-churn-detection state-machine
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      
      ===================================
      
      BEGIN=True + PortEnable=False
                 |
                 v
       +------------------------+   ActorPort.Sync=True  +------------------+
       |   ACTOR_CHURN_MONITOR  | ---------------------> |  NO_ACTOR_CHURN  |
       |========================|                        |==================|
       |    ActorChurn=False    |  ActorPort.Sync=False  | ActorChurn=False |
       | ActorChurn.Timer=Start | <--------------------- |                  |
       +------------------------+                        +------------------+
                 |                                                ^
                 |                                                |
        ActorChurn.Timer=Expired                                  |
                 |                                       ActorPort.Sync=True
                 |                                                |
                 |                +-----------------+             |
                 |                |   ACTOR_CHURN   |             |
                 |                |=================|             |
                 +--------------> | ActorChurn=True | ------------+
                                  |                 |
                                  +-----------------+
      
      Similar for the Partner-churn-detection.
      Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14c9551a
    • Mahesh Bandewar's avatar
      bonding: Verify RX LACPDU has proper dest mac-addr · bb54e589
      Mahesh Bandewar authored
      The 802.1AX standard states:
      "The DA in LACPDUs is the Slow_Protocols_Multicast address."
      
      This patch enforces that and drops LACPDUs with destination MAC
      addresses other than Slow_Protocols_Multicast address
      Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
      Reviewed-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb54e589
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 2a12d6cf
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2015-02-23
      
      This series contains updates to e1000e, igbvf, i40e and i40evf.
      
      David adds support for i219 devices to the e1000e driver.
      
      Jeff (me) provides two patches to cleanup igbvf, first cleans up the
      whitespace issues found and the second cleans up the usage of msleep(),
      min() and max() with usleep_range(), min_t() and max_t() respectively.
      
      Kamil updates the shadow RAM read/write functions by refactoring them
      to prepare for future work.
      
      Shannon renames the debugfs command "clear_stats pf" to clear_stats port"
      to clarify what the function really does.
      
      Mitch refactors the receive routine, by splitting the receive hot path
      code into two, one for packet split and one for single buffer, which
      improves receive performance.  Disables NAPI polling sooner when closing
      the interface to fix an occasional panic during close which was
      caused by the driver trying to delete and clean rings at the same time.
      Also refactors reset for i40evf, since a recent change to the shutdown
      flow messed up the reset flow.  Since i40evf_down() now holds the
      critical section lock, we cannot call it from the reset handler, which
      also holds the lock.
      
      Nicholas restricts the virtual channel opcodes should remain consistent
      between updates to the opcode enum.
      
      Neerav converts the VSI connection type to use a #define instead of
      using a magic number.
      
      Anjali updates the registers file to remove registers no longer available.
      Also fixes the EMPR interrupt handling, so that we won't trigger another
      EMPR when we receive an EMPR event.
      
      Catherine cleans up the variable an_enable since it was set and never
      used.
      
      Greg fixes the netdev op that allows the operator to turn MAC/VLAN
      spoof checking on and off so that it includes the flag for VLAN spoof
      checking.
      
      v2: Updated patch #10 in the series to use test_and_clear_bit() as
          suggested by Sergei Shtylyov
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a12d6cf
    • David S. Miller's avatar
      Merge branch 'bcmgenet-next' · 1e0629d3
      David S. Miller authored
      Petri Gynther says:
      
      ====================
      net: bcmgenet: Tx init improvements
      
      Four small patches to improve bcmgenet Tx init:
      1. bcmgenet_init_tx_ring() cleanup
      2. rework Tx queue init
      3. precalculate TxCB->bd_addr
      4. rename bcmgenet_hw_params->bds_cnt and GENET_DEFAULT_BD_CNT
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e0629d3