1. 18 Sep, 2011 9 commits
    • Ying Xue's avatar
      tipc: Simplify prohibition of listen and accept for connectionless sockets · 245f3d34
      Ying Xue authored
      Modifies the proto_ops structure used by TIPC DGRAM and RDM sockets
      so that calls to listen() and accept() are handled by existing kernel
      "unsupported operation" routines, and eliminates the related checks
      in the listen and accept routines used by SEQPACKET and STREAM sockets
      that are no longer needed.
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      245f3d34
    • Ying Xue's avatar
      tipc: Add support for SO_SNDTIMEO socket option · 1d835874
      Ying Xue authored
      Adds support for the SO_SNDTIMEO socket option. (This complements the
      existing support for SO_RCVTIMEO that is already present.)
      Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      1d835874
    • Allan Stephens's avatar
      tipc: Enhance sending of bulk name table messages · 9aa88c2a
      Allan Stephens authored
      Modifies the initial transfer of name table entries to a new neighboring
      node so that the messages are enqueued as a unit, rather than individually.
      
      The revised algorithm now locates the link carrying the message only once,
      and eliminates unnecessary checks for link congestion, message fragmentation,
      and message bundling that are not required when sending these messages.
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      9aa88c2a
    • Paul Gortmaker's avatar
      tipc: relocate/coalesce node cast in tipc_named_node_up · 1c553bb5
      Paul Gortmaker authored
      Functions like this are called using unsigned longs from
      function pointers.  In this case, the function is passed in
      a node which is normally internally treated as a u32 by TIPC.
      
      Rather than add more casts into this function in the future
      for each added use of node within, move the cast to a single
      place on a local.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      1c553bb5
    • Allan Stephens's avatar
      tipc: Prevent fragmented messages during initial name table exchange · 149ce37c
      Allan Stephens authored
      Reduces the maximum size of messages sent during the initial exchange
      of name table information between two nodes to be no larger than the
      MTU of the first link established between the nodes. This ensures that
      messages will never need to be fragmented, which would add unnecessary
      overhead to the name table synchronization mechanism.
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      149ce37c
    • Allan Stephens's avatar
      tipc: Lower limits for number of bearers and media types · 909234cd
      Allan Stephens authored
      Reduces the number of bearers a node can support to 2, which can use
      identical or non-identical media. This change won't impact users,
      since they are currently limited to a maximum of 2 Ethernet bearers,
      and will save memory by eliminating a number of unused entries in
      TIPC's media and bearer arrays.
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      909234cd
    • Allan Stephens's avatar
      tipc: Remove redundant search when enabling bearer · 18abf0fb
      Allan Stephens authored
      Removes obsolete code that searches for an Ethernet bearer structure entry
      to use for a newly enabled bearer, since this search is now performed
      at the start of the enabling algorithm.
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      18abf0fb
    • Allan Stephens's avatar
      tipc: Fix unsafe device list search when enabling bearer · bcd326e8
      Allan Stephens authored
      Ensures that the device list lock is held while trying to locate
      the Ethernet device used by a newly enabled bearer, so that the
      addition or removal of a device does not cause problems.
      Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      bcd326e8
    • Allan Stephens's avatar
      tipc: Ensure both nodes recognize loss of contact between them · b4b56102
      Allan Stephens authored
      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: default avatarAllan Stephens <allan.stephens@windriver.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      b4b56102
  2. 01 Sep, 2011 17 commits
  3. 30 Aug, 2011 14 commits