01 Nov, 2011

2 commits


18 Sep, 2011

11 commits

  • Elimintes prototype link event tracking functionality that has never
    been fleshed out and doesn't do anything useful at the current time.

    Signed-off-by: Ying Xue
    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • Eliminate the "event_cb" member from TIPC's "subscription" structure
    since the function pointer it holds always points to subscr_send_event().

    Signed-off-by: Ying Xue
    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • 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: Ying Xue
    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • Adds support for the SO_SNDTIMEO socket option. (This complements the
    existing support for SO_RCVTIMEO that is already present.)

    Signed-off-by: Ying Xue
    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • 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: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • 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: Paul Gortmaker

    Paul Gortmaker
     
  • 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: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • 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: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • 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: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • 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: Allan Stephens
    Signed-off-by: Paul Gortmaker

    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: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     

01 Sep, 2011

17 commits

  • Modifies code that disables a bearer to ensure that all of its links
    are deleted, not just its uncongested links. Similarly, modifies code
    that blocks a bearer to ensure that all of its links are reset, not
    just its uncongested links.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Saves a socket's TIPC_CONN_TIMEOUT socket option value in its original
    form (milliseconds), rather than jiffies. This ensures that the exact
    value set using setsockopt() is always returned by getsockopt(), without
    being subject to rounding issues introduced by a ms->jiffies->ms
    conversion sequence.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates code in tipc_send_buf_fast() that handles messages
    sent to a destination on the current node, since the only caller
    of the routine only passes in messages destined for other nodes.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates obsolete code that handles broadcast bearer congestion when
    the broadast link sends a NACK message, since the broadcast pseudo-bearer
    never becomes blocked.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Modifies TIPC's incoming broadcast packet handler to discard messages
    that cannot legally be sent over the broadcast link, including:

    - broadcast protocol messages that do no contain state information
    - payload messages that are not named multicast messages
    - any other form of message except for bundled messages, fragmented
    messages, and name distribution messages.

    These checks are needed to prevent TIPC from handing an unexpected
    message to a routine that isn't prepared to handle it, which could
    lead to incorrect processing (up to and including invalid memory
    references caused by attempts to access message fields that aren't
    present in the message).

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Modifies TIPC's incoming broadcast packet handler so that it no longer
    pre-reads information about the deferred packet queue, since the cached
    value is unreliable once the associated node lock has been released.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Modifies TIPC's incoming broadcast packet handler to ensure that the
    node lock associated with the sender of the packet is held whenever
    node-related data structure fields are accessed. The routine is also
    restructured with a single exit point, making it easier to ensure
    the node lock is properly released and the incoming packet is properly
    disposed of.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Ensure that broadcast link messages that have not been acknowledged
    by a newly failed node do not get an implied acknowledgement until the
    failed node is removed from the broadcast link's map of reachable nodes.

    Previously, a race condition allowed a new broadcast link message to be
    sent after the implicit acknowledgement processing was completed, but
    before the map of reachable nodes was updated, resulting in the message
    having an expected acknowledgement count that required the failed node
    to explicitly acknowledge the message. Since this would never occur
    the new message would remain in the broadcast link's transmit queue
    forever, eventually causing the link to become congested and "stall".
    Delaying the implicit acknowledgement processing until after the update
    of the map of reachable nodes eliminates this race condition and prevents
    stalling.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Enhances cleanup of broadcast link-related information when contact
    with a node is lost.

    1) All broadcast link-related cleanup now occurs only if the lost node
    was capable of communicating over the broadcast link.

    2) Following cleanup, the lost node is marked as no longer supporting
    the broadcast link, ensuring that any remaining broadcast messages
    received from that node prior to the re-establishment of a normal
    communication link are ignored.

    Thanks to Surya [Suryanarayana.Garlapati@emerson.com] for contributing
    a prototype version of this patch.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates code associated with the sending of unsent broadcast link
    traffic when the broadcast pseudo-bearer becomes unblocked following a
    temporary congestion situation. This code is non-executable because the
    broadcast pseudo-bearer never becomes blocked [see tipc_bcbearer_send()].

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Updates the comments in the broadcast bearer send routine to more
    accurately describe the processing done by the routine. Also replaces
    the improper use of a TIPC payload message error status symbol (in a place
    that has nothing to do with such errors) with its numeric equivalent.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Updates TIPC's broadcast link in a couple of places that were missed
    during the transition from its former name ("multicast-link") to its
    current name ("broadcast-link"). These changes are essentially cosmetic
    and do not affect the overall operation of TIPC.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Ensure TIPC ignores an out-dated link reset message whose session
    number predates the current session number. (Previously, TIPC only
    ignored an out-date reset message whose session number was equal
    to the current link session number.)

    Out-dated link reset messages should not occur under normal circumstances;
    however, they can be generated if a link endpoint is unable to send a
    link reset message right away and queues it for later delivery, but the
    queued message is not sent until after the link is established.

    Thanks to Laser [gotolaser@gmail.com] for diagnosing the problem and
    contributing a prototype patch.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Initializes the peer session number field of a newly created link
    endpoint to an invalid value. This eliminates the remote possibility
    that it will accidentally match the session number used by the peer
    the first time the link is activated, and cause the link to ignore
    a valid RESET message.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Sets the peer interface portion of the name of a newly created link
    endpoint to "unknown". This ensures that state and statistics information
    can be properly displayed during the time between the link endpoint's
    creation and the time handshaking with its peer is completed.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Removes a test that ensures unicast link endpoints discard an incoming
    message if it will not be consumed by the node itself and cannot be
    forwarded to another node, since the preceding test already ensures that
    the message is destined for this node and single-cluster TIPC no longer
    performs message forwarding.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates code that increments and validates the re-route count field
    of payload messages, since the elimination of multi-cluster support
    means that it is no longer necessary for TIPC to forward incoming messages
    to another node. (The obsolete code was incorrect anyway, since it
    incorrectly incremented the re-route count field of messages that
    originated on the node that forwarded the message.)

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

25 Jun, 2011

9 commits

  • Simplifies the creation of connection protocol messages by eliminating
    the passing of information that is no longer required, is constant,
    or is contained within the port structure that is issuing the message.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Modifies the logic that creates a connection termination payload
    message so that it no longer (mis)uses a routine that creates a
    connection protocol message. The revised code is now more easily
    understood, and avoids setting several fields that are either not
    present in payload messages or were being set more than once.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Restructures the logic used in tipc_port_recv_proto_msg() to ensure
    that incoming connection protocol messages are handled properly. The
    routine now uses a two-stage process that first ensures the message
    applies on an existing connection and then processes the request.
    This corrects a loophole that allowed a connection probe request to
    be processed if it was sent to an unconnected port that had no names
    bound to it.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Speeds up the creation of the FIN message that terminates a TIPC
    connection. The typical peer termination message is now created by
    duplicating the terminating port's standard payload message header
    and adjusting the message size, importance, and error code fields,
    rather than building all fields of the message from scratch. A FIN
    message that is directed to the port itself is created the same way.
    but also requires swapping the origin and destination address fields.

    In addition to reducing the work required to create FIN messages,
    these changes eliminate several instances of duplicated code,

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Performs cosmetic cleanup of the symbolic names used to specify TIPC
    payload message header sizes. The revised names now more accurately
    reflect the payload messages in which they can appear. In addition,
    several places where these payload message symbol names were being used
    to create non-payload messages have been updated to use the proper
    internal message symbolic name.

    No functional changes are introduced by this rework.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Gets rid of code that allows tipc_msg_init() to create a short
    payload message header. This optimization is possible because
    there are no longer any callers who require this capability.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Eliminates a pair of #include statements for files that are brought in
    automatically by including core.h.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Gets rid of counter that records the number of times a bearer has
    resumed after congestion or blocking, since the value is never
    referenced anywhere.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens
     
  • Fixes a minor error in the title of one of the message size profiling
    values printed as part of TIPC's link statistics.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker

    Allan Stephens