1. 18 6月, 2013 2 次提交
    • P
      tipc: cosmetic realignment of function arguments · ae8509c4
      Paul Gortmaker 提交于
      No runtime code changes here.  Just a realign of the function
      arguments to start where the 1st one was, and fit as many args
      as can be put in an 80 char line.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae8509c4
    • Y
      tipc: convert topology server to use new server facility · 13a2e898
      Ying Xue 提交于
      As the new TIPC server infrastructure has been introduced, we can
      now convert the TIPC topology server to it.  We get two benefits
      from doing this:
      
      1) It simplifies the topology server locking policy.  In the
      original locking policy, we placed one spin lock pointer in the
      tipc_subscriber structure to reuse the lock of the subscriber's
      server port, controlling access to members of tipc_subscriber
      instance.  That is, we only used one lock to ensure both
      tipc_port and tipc_subscriber members were safely accessed.
      
      Now we introduce another spin lock for tipc_subscriber structure
      only protecting themselves, to get a finer granularity locking
      policy.  Moreover, the change will allow us to make the topology
      server code more readable and maintainable.
      
      2) It fixes a bug where sent subscription events may be lost when
      the topology port is congested.  Using the new service, the
      topology server now queues sent events into an outgoing buffer,
      and then wakes up a sender process which has been blocked in
      workqueue context.  The process will keep picking events from the
      buffer and send them to their respective subscribers, using the
      kernel socket interface, until the buffer is empty. Even if the
      socket is congested during transmission there is no risk that
      events may be dropped, since the sender process may block when
      needed.
      
      Some minor reordering of initialization is done, since we now
      have a scenario where the topology server must be started after
      socket initialization has taken place, as the former depends
      on the latter.  And overall, we see a simplification of the
      TIPC subscriber code in making this changeover.
      Signed-off-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      13a2e898
  2. 08 12月, 2012 1 次提交
    • P
      tipc: standardize across connect/disconnect function naming · bc879117
      Paul Gortmaker 提交于
      Currently we have tipc_disconnect and tipc_disconnect_port.  It is
      not clear from the names alone, what they do or how they differ.
      It turns out that tipc_disconnect just deals with the port locking
      and then calls tipc_disconnect_port which does all the work.
      
      If we rename as follows: tipc_disconnect_port --> __tipc_disconnect
      then we will be following typical linux convention, where:
      
         __tipc_disconnect: "raw" function that does all the work.
      
         tipc_disconnect: wrapper that deals with locking and then calls
      		    the real core __tipc_disconnect function
      
      With this, the difference is immediately evident, and locking
      violations are more apt to be spotted by chance while working on,
      or even just while reading the code.
      
      On the connect side of things, we currently only have the single
      "tipc_connect2port" function.  It does both the locking at enter/exit,
      and the core of the work.  Pending changes will make it desireable to
      have the connect be a two part locking wrapper + worker function,
      just like the disconnect is already.
      
      Here, we make the connect look just like the updated disconnect case,
      for the above reason, and for consistency.  In the process, we also
      get rid of the "2port" suffix that was on the original name, since
      it adds no descriptive value.
      
      On close examination, one might notice that the above connect
      changes implicitly move the call to tipc_link_get_max_pkt() to be
      within the scope of tipc_port_lock() protected region; when it was
      not previously.  We don't see any issues with this, and it is in
      keeping with __tipc_connect doing the work and tipc_connect just
      handling the locking.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      bc879117
  3. 20 8月, 2012 1 次提交
  4. 14 7月, 2012 1 次提交
  5. 01 5月, 2012 1 次提交
    • P
      tipc: compress out gratuitous extra carriage returns · 617d3c7a
      Paul Gortmaker 提交于
      Some of the comment blocks are floating in limbo between two
      functions, or between blocks of code.  Delete the extra line
      feeds between any comment and its associated following block
      of code, to be consistent with the majority of the rest of
      the kernel.  Also delete trailing newlines at EOF and fix
      a couple trivial typos in existing comments.
      
      This is a 100% cosmetic change with no runtime impact.  We get
      rid of over 500 lines of non-code, and being blank line deletes,
      they won't even show up as noise in git blame.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      617d3c7a
  6. 27 4月, 2012 1 次提交
  7. 25 2月, 2012 1 次提交
  8. 30 12月, 2011 2 次提交
  9. 18 9月, 2011 1 次提交
  10. 11 5月, 2011 1 次提交
    • A
      tipc: Avoid recomputation of outgoing message length · 26896904
      Allan Stephens 提交于
      Rework TIPC's message sending routines to take advantage of the total
      amount of data value passed to it by the kernel socket infrastructure.
      This change eliminates the need for TIPC to compute the size of outgoing
      messages itself, as well as the check for an oversize message in
      tipc_msg_build().  In addition, this change warrants an explanation:
      
         -     res = send_packet(NULL, sock, &my_msg, 0);
         +     res = send_packet(NULL, sock, &my_msg, bytes_to_send);
      
      Previously, the final argument to send_packet() was ignored (since the
      amount of data being sent was recalculated by a lower-level routine)
      and we could just pass in a dummy value (0). Now that the
      recalculation is being eliminated, the argument value being passed to
      send_packet() is significant and we have to supply the actual amount
      of data we want to send.
      Signed-off-by: NAllan Stephens <Allan.Stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      26896904
  11. 24 2月, 2011 3 次提交
  12. 02 1月, 2011 5 次提交
  13. 03 12月, 2010 4 次提交
  14. 21 10月, 2010 2 次提交
    • N
      Revert d88dca79 · db5a753b
      Neil Horman 提交于
      TIPC needs to have its endianess issues fixed.  Unfortunately, the format of a
      subscriber message is passed in directly from user space, so requiring this
      message to be in network byte order breaks user space ABI.  Revert this change
      until such time as we can determine how to do this in a backwards compatible
      manner.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db5a753b
    • N
      Revert c6537d67 · 8c974438
      Neil Horman 提交于
      Backout the tipc changes to the flags int he subscription message.  These
      changees, while reasonable on the surface, interefere with user space ABI
      compatibility which is a no-no.  This was part of the changes to fix the
      endianess issues in the TIPC protocol, which would be really nice to do but we
      need to do so in a way that is backwards compatible with user space.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c974438
  15. 17 10月, 2010 1 次提交
  16. 24 9月, 2010 1 次提交
  17. 07 4月, 2010 1 次提交
  18. 09 3月, 2010 1 次提交
    • N
      tipc: fix endianness on tipc subscriber messages · d88dca79
      Neil Horman 提交于
      Remove htohl implementation from tipc
      
      I was working on forward porting the downstream commits for TIPC and ran accross this one:
      http://tipc.cslab.ericsson.net/cgi-bin/gitweb.cgi?p=people/allan/tipc.git;a=commitdiff;h=894279b9437b63cbb02405ad5b8e033b51e4e31e
      
      I was going to just take it, when I looked closer and noted what it was doing.
      This is basically a routine to byte swap fields of data in sent/received packets
      for tipc, dependent upon the receivers guessed endianness of the peer when a
      connection is established.  Asside from just seeming silly to me, it appears to
      violate the latest RFC draft for tipc:
      http://tipc.sourceforge.net/doc/draft-spec-tipc-02.txt
      Which, according to section 4.2 and 4.3.3, requires that all fields of all
      commands be sent in network byte order.  So instead of just taking this patch,
      instead I'm removing the htohl function and replacing the calls with calls to
      ntohl in the rx path and htonl in the send path.
      
      As part of this fix, I'm also changing the subscr_cancel function, which
      searches the list of subscribers, using a memcmp of the entire subscriber list,
      for the entry to tear down.  unfortunately it memcmps the entire tipc_subscr
      structure which has several bits that are private to the local side, so nothing
      will ever match.  section 5.2 of the draft spec indicates the <type,upper,lower>
      tuple should uniquely identify a subscriber, so convert subscr_cancel to just
      match on those fields (properly endian swapped).
      
      I've tested this using the tipc test suite, and its passed without issue.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d88dca79
  19. 30 11月, 2009 1 次提交
  20. 13 8月, 2008 1 次提交
  21. 20 5月, 2008 5 次提交
  22. 13 5月, 2008 1 次提交
  23. 11 2月, 2007 1 次提交
  24. 03 12月, 2006 1 次提交