1. 14 7月, 2012 2 次提交
    • E
      tipc: phase out most of the struct print_buf usage · dc1aed37
      Erik Hugne 提交于
      The tipc_printf is renamed to tipc_snprintf, as the new name
      describes more what the function actually does.  It is also
      changed to take a buffer and length parameter and return
      number of characters written to the buffer.  All callers of
      this function that used to pass a print_buf are updated.
      
      Final removal of the struct print_buf itself will be done
      synchronously with the pending removal of the deprecated
      logging code that also was using it.
      
      Functions that build up a response message with a list of
      ports, nametable contents etc. are changed to return the number
      of characters written to the output buffer. This information
      was previously hidden in a field of the print_buf struct, and
      the number of chars written was fetched with a call to
      tipc_printbuf_validate.  This function is removed since it
      is no longer referenced nor needed.
      
      A generic max size ULTRA_STRING_MAX_LEN is defined, named
      in keeping with the existing TIPC_TLV_ULTRA_STRING, and the
      various definitions in port, link and nametable code that
      largely duplicated this information are removed.  This means
      that amount of link statistics that can be returned is now
      increased from 2k to 32k.
      
      The buffer overflow check is now done just before the reply
      message is passed over netlink or TIPC to a remote node and
      the message indicating a truncated buffer is changed to a less
      dramatic one (less CAPS), placed at the end of the message.
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      dc1aed37
    • E
      tipc: use standard printk shortcut macros (pr_err etc.) · 2cf8aa19
      Erik Hugne 提交于
      All messages should go directly to the kernel log.  The TIPC
      specific error, warning, info and debug trace macro's are
      removed and all references replaced with pr_err, pr_warn,
      pr_info and pr_debug.
      
      Commonly used sub-strings are explicitly declared as a const
      char to reduce .text size.
      
      Note that this means the debug messages (changed to pr_debug),
      are now enabled through dynamic debugging, instead of a TIPC
      specific Kconfig option (TIPC_DEBUG).  The latter will be
      phased out completely
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      [PG: use pr_fmt as suggested by Joe Perches <joe@perches.com>]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      2cf8aa19
  2. 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
  3. 25 2月, 2012 3 次提交
    • A
      tipc: Eliminate trivial buffer manipulation helper routines · 5f6d9123
      Allan Stephens 提交于
      Gets rid of two inlined routines that simply call existing sk_buff
      manipulation routines, since there is no longer any extra processing
      done by the helper routines.
      
      Note that these changes are essentially cosmetic in nature, and have
      no impact on the actual operation of TIPC.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      5f6d9123
    • A
      tipc: Detect duplicate nodes using different network interfaces · 97878a40
      Allan Stephens 提交于
      Utilizes the new "node signature" field in neighbor discovery messages
      to ensure that all links TIPC associates with a given <Z.C.N> network
      address belong to the same neighboring node. (Previously, TIPC could not
      tell if link setup requests arriving on different interfaces were from
      the same node or from two different nodes that has mistakenly been assigned
      the same network address.)
      
      The revised algorithm for detecting a duplicate node considers both the
      node signature and the network interface adddress specified in a request
      message when deciding how to respond to a link setup request. This prevents
      false alarms that might otherwise arise during normal network operation
      under the following scenarios:
      
      a) A neighboring node reboots. (The node's signature changes, but the
      network interface address remains unchanged.)
      
      b) A neighboring node's network interface is replaced. (The node's signature
      remains unchanged, but the network interface address changes.)
      
      c) A neighboring node is completely replaced. (The node's signature and
      network interface address both change.)
      
      The algorithm also handles cases in which a node reboots and re-establishes
      its links to TIPC (or begins re-establishing those links) before TIPC
      detects that it is using a new node signature. In such cases of "delayed
      rediscovery" TIPC simply accepts the new signature without disrupting
      communication that is already underway over the links.
      
      Thanks to Laser [gotolaser@gmail.com] for his contributions to the
      development of this enhancement.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      97878a40
    • A
      tipc: Introduce node signature field in neighbor discovery message · fc0eea69
      Allan Stephens 提交于
      Adds support for the new "node signature" in neighbor discovery messages,
      which is a 16 bit identifier chosen randomly when TIPC is initialized.
      This field makes it possible for nodes receiving a neighbor discovery
      message to detect if multiple neighboring nodes are using the same network
      address (i.e. <Z.C.N>), even when the messages are arriving on different
      interfaces.
      
      This first phase of node signature support creates the signature,
      incorporates it into outgoing neighbor discovery messages, and tracks
      the signature used by valid neighbors. An upcoming patch builds on this
      foundation to implement the improved duplicate neighbor detection checking.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      fc0eea69
  4. 30 12月, 2011 1 次提交
  5. 28 12月, 2011 2 次提交
  6. 18 9月, 2011 1 次提交
    • A
      tipc: Ensure both nodes recognize loss of contact between them · b4b56102
      Allan Stephens 提交于
      Enhances TIPC to ensure that a node that loses contact with a
      neighboring node does not allow contact to be re-established until
      it sees that its peer has also recognized the loss of contact.
      
      Previously, nodes that were connected by two or more links could
      encounter a situation in which node A would lose contact with node B
      on all of its links, purge its name table of names published by B,
      and then fail to repopulate those names once contact with B was restored.
      This would happen because B was able to re-establish one or more links
      so quickly that it never reached a point where it had no links to A --
      meaning that B never saw a loss of contact with A, and consequently
      didn't re-publish its names to A.
      
      This problem is now prevented by enhancing the cleanup done by TIPC
      following a loss of contact with a neighboring node to ensure that
      node A ignores all messages sent by B until it receives a LINK_PROTOCOL
      message that indicates B has lost contact with A, thereby preventing
      the (re)establishment of links between the nodes. The loss of contact
      is recognized when a RESET or ACTIVATE message is received that has
      a "redundant link exists" field of 0, indicating that B's sending link
      endpoint is in a reset state and that B has no other working links.
      
      Additionally, TIPC now suppresses the sending of (most) link protocol
      messages to a neighboring node while it is cleaning up after an earlier
      loss of contact with that node. This stops the peer node from prematurely
      activating its link endpoint, which would prevent TIPC from later
      activating its own end. TIPC still allows outgoing RESET messages to
      occur during cleanup, to avoid problems if its own node recognizes
      the loss of contact first and tries to notify the peer of the situation.
      
      Finally, TIPC now recognizes an impending loss of contact with a peer node
      as soon as it receives a RESET message on a working link that is the
      peer's only link to the node, and ensures that the link protocol
      suppression mentioned above goes into effect right away -- that is,
      even before its own link endpoints have failed. This is necessary to
      ensure correct operation when there are redundant links between the nodes,
      since otherwise TIPC would send an ACTIVATE message upon receiving a RESET
      on its first link and only begin suppressing when a RESET on its second
      link was received, instead of initiating suppression with the first RESET
      message as it needs to.
      
      Note: The reworked cleanup code also eliminates a check that prevented
      a link endpoint's discovery object from responding to incoming messages
      while stale name table entries are being purged. This check is now
      unnecessary and would have slowed down re-establishment of communication
      between the nodes in some situations.
      Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      b4b56102
  7. 11 5月, 2011 5 次提交
  8. 14 3月, 2011 5 次提交
  9. 24 2月, 2011 2 次提交
  10. 02 1月, 2011 4 次提交
  11. 03 12月, 2010 1 次提交
  12. 17 10月, 2010 1 次提交
  13. 14 10月, 2010 1 次提交
  14. 18 8月, 2010 1 次提交
  15. 13 5月, 2010 2 次提交
  16. 03 9月, 2008 1 次提交
  17. 05 6月, 2008 3 次提交
  18. 22 5月, 2008 1 次提交
  19. 11 2月, 2007 1 次提交
  20. 19 10月, 2006 2 次提交