1. 02 3月, 2015 16 次提交
  2. 01 3月, 2015 11 次提交
  3. 28 2月, 2015 13 次提交
    • D
      Merge branch 'tipc-next' · 721a57a0
      David S. Miller 提交于
      Erik Hugne says:
      
      ====================
      tipc: bug fix and some improvements
      
      Most important is a fix for a nullptr exception that would occur when
      name table subscriptions fail. The remaining patches are performance
      improvements and cosmetic changes.
      
      v2: remove unnecessary whitespace in patch #2
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      721a57a0
    • E
      tipc: make media address offset a common define · d76a436d
      Erik Hugne 提交于
      With the exception of infiniband media which does not use media
      offsets, the media address is always located at offset 4 in the
      media info field as defined by the protocol, so we move the
      definition to the generic bearer.h
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d76a436d
    • E
      tipc: rename media/msg related definitions · 91e2eb56
      Erik Hugne 提交于
      The TIPC_MEDIA_ADDR_SIZE and TIPC_MEDIA_ADDR_OFFSET names
      are misleading, as they actually define the size and offset of
      the whole media info field and not the address part. This patch
      does not have any functional changes.
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91e2eb56
    • E
      tipc: purge links when bearer is disabled · afaa3f65
      Erik Hugne 提交于
      If a bearer is disabled by manual intervention, all links over that
      bearer should be purged, indicated with the 'shutting_down' flag.
      Otherwise tipc will get confused if a new bearer is enabled using
      a different media type.
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      afaa3f65
    • E
      tipc: fix nullpointer bug when subscribing to events · 7fe8097c
      Erik Hugne 提交于
      If a subscription request is sent to a topology server
      connection, and any error occurs (malformed request, oom
      or limit reached) while processing this request, TIPC should
      terminate the subscriber connection. While doing so, it tries
      to access fields in an already freed (or never allocated)
      subscription element leading to a nullpointer exception.
      We fix this by removing the subscr_terminate function and
      terminate the connection immediately upon any subscription
      failure.
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7fe8097c
    • E
      tipc: only create header copy for name distr messages · 3622c36f
      Erik Hugne 提交于
      The TIPC name distributor pushes topology updates to the cluster
      neighbors. Currently this is done in a unicast manner, and the
      skb holding the update is cloned for each cluster member. This
      is unnecessary, as we only modify the destnode field in the header
      so we change it to do pskb_copy instead.
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3622c36f
    • J
      team: allow TSO being set on master · 247f6d0f
      Jiri Pirko 提交于
      This patch allows TSO being set/unset on the master, so that GSO
      segmentation is done after team layer.
      
      Similar patch is present for bonding:
      	b0ce3508 ("bonding: allow TSO being set on bonding master")
      and bridge:
      	f902e881 ("bridge: Add ability to enable TSO")
      Suggested-by: NJiri Prochazka <jprochaz@redhat.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      247f6d0f
    • D
      Merge branch 'fib_trie_remove_leaf_info' · 7eb60345
      David S. Miller 提交于
      Alexander Duyck says:
      
      ====================
      fib_trie: Remove leaf_info structure
      
      This patch set removes the leaf_info structure from the IPv4 fib_trie.  The
      general idea is that the leaf_info structure itself only held about 6
      actual bits of data, beyond that it was mostly just waste.  As such we can
      drop the structure, move the 1 byte representing the prefix/suffix length
      into the fib_alias and just link it all into one list.
      
      My testing shows that this saves somewhere between 4 to 10ns depending on
      the type of test performed.  I'm suspecting that this represents 1 to 2 L1
      cache misses saved per look-up.
      
      One side effect of this change is that semantic_match_miss will now only
      increment once per leaf instead of once per leaf_info miss.  However the
      stat is already skewed now that we perform a preliminary check on the leaf
      as a part of the look-up.
      
      I also have gone through and addressed a number of ordering issues in the
      first patch since I had misread the behavior of list_add_tail.
      
      I have since run some additional testing and verified the resulting lists
      are in the same order when combining multiple prefix length and tos values
      in a single leaf.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7eb60345
    • A
      fib_trie: Remove leaf_info · 79e5ad2c
      Alexander Duyck 提交于
      At this point the leaf_info hash is redundant.  By adding the suffix length
      to the fib_alias hash list we no longer have need of leaf_info as we can
      determine the prefix length from fa_slen.  So we can compress things by
      dropping the leaf_info structure from fib_trie and instead directly connect
      the leaves to the fib_alias hash list.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79e5ad2c
    • A
      fib_trie: Add slen to fib alias · 9b6ebad5
      Alexander Duyck 提交于
      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: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b6ebad5
    • A
      fib_trie: Replace plen with slen in leaf_info · 5786ec60
      Alexander Duyck 提交于
      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: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5786ec60
    • A
      fib_trie: Convert fib_alias to hlist from list · 56315f9e
      Alexander Duyck 提交于
      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: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56315f9e
    • D
      Merge branch 'ip_level_multicast_join_leave' · 7705f730
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      7705f730