1. 06 7月, 2011 3 次提交
  2. 02 7月, 2011 2 次提交
    • D
      ipv6: Don't put artificial limit on routing table size. · 957c665f
      David S. Miller 提交于
      IPV6, unlike IPV4, doesn't have a routing cache.
      
      Routing table entries, as well as clones made in response
      to route lookup requests, all live in the same table.  And
      all of these things are together collected in the destination
      cache table for ipv6.
      
      This means that routing table entries count against the garbage
      collection limits, even though such entries cannot ever be reclaimed
      and are added explicitly by the administrator (rather than being
      created in response to lookups).
      
      Therefore it makes no sense to count ipv6 routing table entries
      against the GC limits.
      
      Add a DST_NOCOUNT destination cache entry flag, and skip the counting
      if it is set.  Use this flag bit in ipv6 when adding routing table
      entries.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      957c665f
    • T
      rtnl: provide link dump consistency info · 4e985ada
      Thomas Graf 提交于
      This patch adds a change sequence counter to each net namespace
      which is bumped whenever a netdevice is added or removed from
      the list. If such a change occurred while a link dump took place,
      the dump will have the NLM_F_DUMP_INTR flag set in the first
      message which has been interrupted and in all subsequent messages
      of the same dump.
      
      Note that links may still be modified or renamed while a dump is
      taking place but we can guarantee for userspace to receive a
      complete list of links and not miss any.
      
      Testing:
      I have added 500 VLAN netdevices to make sure the dump is split
      over multiple messages. Then while continuously dumping links in
      one process I also continuously deleted and re-added a dummy
      netdevice in another process. Multiple dumps per seconds have
      had the NLM_F_DUMP_INTR flag set.
      
      I guess we can wait for Johannes patch to hit net-next via the
      wireless tree.  I just wanted to give this some testing right away.
      Signed-off-by: NThomas Graf <tgraf@infradead.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e985ada
  3. 30 6月, 2011 1 次提交
  4. 28 6月, 2011 2 次提交
  5. 25 6月, 2011 1 次提交
  6. 24 6月, 2011 1 次提交
  7. 23 6月, 2011 1 次提交
    • J
      netlink: advertise incomplete dumps · 670dc283
      Johannes Berg 提交于
      Consider the following situation:
       * a dump that would show 8 entries, four in the first
         round, and four in the second
       * between the first and second rounds, 6 entries are
         removed
       * now the second round will not show any entry, and
         even if there is a sequence/generation counter the
         application will not know
      
      To solve this problem, add a new flag NLM_F_DUMP_INTR
      to the netlink header that indicates the dump wasn't
      consistent, this flag can also be set on the MSG_DONE
      message that terminates the dump, and as such above
      situation can be detected.
      
      To achieve this, add a sequence counter to the netlink
      callback struct. Of course, netlink code still needs
      to use this new functionality. The correct way to do
      that is to always set cb->seq when a dumpit callback
      is invoked and call nl_dump_check_consistent() for
      each new message. The core code will also call this
      function for the final MSG_DONE message.
      
      To make it usable with generic netlink, a new function
      genlmsg_nlhdr() is needed to obtain the netlink header
      from the genetlink user header.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      670dc283
  8. 22 6月, 2011 6 次提交
    • P
      ip: introduce ip_is_fragment helper inline function · 56f8a75c
      Paul Gortmaker 提交于
      There are enough instances of this:
      
          iph->frag_off & htons(IP_MF | IP_OFFSET)
      
      that a helper function is probably warranted.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56f8a75c
    • J
      dcb: fix return type on dcb_setapp() · ab6baf98
      John Fastabend 提交于
      Incorrect return type on dcb_setapp() this routine
      returns negative error codes. All call sites of
      dcb_setapp() assign the return value to an int already
      so no need to update drivers.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab6baf98
    • J
      dcb: Add dcb_ieee_getapp_mask() for drivers to query APP settings · a364c8cf
      John Fastabend 提交于
      With multiple APP entries per selector and protocol drivers
      or stacks may want to pick a specific value or stripe traffic
      across many priorities. Also if an APP entry in use is
      deleted the stack/driver may want to choose from the existing
      APP entries.
      
      To facilitate this and avoid having duplicate code to walk
      the APP ring provide a routine dcb_ieee_getapp_mask() to
      return a u8 bitmask of all priorities set for the specified
      selector and protocol. This routine and bitmask is a helper
      for DCB kernel users.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a364c8cf
    • J
      dcb: Add ieee_dcb_delapp() and dcb op to delete app entry · f9ae7e4b
      John Fastabend 提交于
      Now that we allow multiple IEEE App entries we need a way
      to remove specific entries. To do this add the ieee_dcb_delapp()
      routine.
      
      Additionaly drivers may need to remove the APP entry from
      their firmware tables. Add dcb ops routine to handle this.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9ae7e4b
    • J
      dcb: Add ieee_dcb_setapp() to be used for IEEE 802.1Qaz APP data · b6db2174
      John Fastabend 提交于
      This adds a setapp routine for IEEE802.1Qaz encoded APP data types.
      The IEEE 802.1Qaz spec encodes the priority bits differently and
      allows for multiple APP data entries of the same selector and
      protocol. Trying to force these to use the same set routines was
      becoming tedious. Furthermore, userspace could probably enforce
      the correct semantics, but expecting drivers to do this seems
      error prone in the firmware case.
      
      For these reasons add ieee_dcb_setapp() that understands the
      IEEE 802.1Qaz encoded form.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6db2174
    • J
      net: dcbnl, add multicast group for DCB · 314b4778
      John Fastabend 提交于
      Now that dcbnl is being used in many cases by more
      than a single agent it is beneficial to be notified
      when some entity either driver or user space has
      changed the DCB attributes.
      
      Today applications either end up polling the interface
      or relying on a user space database to maintain the DCB
      state and post events. Polling is a poor solution for
      obvious reasons. And relying on a user space database
      has its own downside. Namely it has created strange
      boot dependencies requiring the database be populated
      before any applications dependent on DCB attributes
      starts or the application goes into a polling loop.
      Populating the database requires negotiating link
      setting with the peer and can take anywhere from less
      than a second up to a few seconds depending on the switch
      implementation.
      
      Perhaps more importantly if another application or an
      embedded agent sets a DCB link attribute the database
      has no way of knowing other than polling the kernel.
      This prevents applications from responding quickly to
      changes in link events which at least in the FCoE case
      and probably any other protocols expecting a lossless
      link may result in IO errors.
      
      By adding a multicast group for DCB we have clean way
      to disseminate kernel DCB link attributes up to user
      space. Avoiding the need for user space to maintain
      a coherant database and disperse events that potentially
      do not reflect the current link state.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      314b4778
  9. 18 6月, 2011 1 次提交
  10. 17 6月, 2011 4 次提交
  11. 16 6月, 2011 1 次提交
  12. 15 6月, 2011 2 次提交
  13. 14 6月, 2011 15 次提交