30 Dec, 2011

8 commits


28 Dec, 2011

23 commits

  • Migrates the buf_seqno() helper routine from broadcast link level to
    unicast link level so that it can be used both types of TIPC links.
    This is a cosmetic change only, and does not affect the operation of TIPC.

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

    Allan Stephens
     
  • Adds checks to TIPC's broadcast link so that it ignores any
    acknowledgement message containing a sequence number that does not
    correspond to an unacknowledged message currently in the broadcast
    link's transmit queue.

    This change prevents the broadcast link from becoming stalled if a
    newly booted node receives stale broadcast link acknowledgement
    information from another node that has not yet fully synchronized
    its end of the broadcast link to reflect the current state of the
    new node's end.

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

    Allan Stephens
     
  • Adds code to release any unsent broadcast messages in the broadcast link
    transmit queue if TIPC loses contact with its only neighboring node.
    Previously, a broadcast link that was in the congested state would hold
    on to the unsent messages, even though the messages were now undeliverable.

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

    Allan Stephens
     
  • The two broadcast link statistics fields that are used to derive the
    average length of that link's transmit queue are now updated only after
    a successful attempt to send a broadcast message, since there is no need
    to update these values when an unsuccessful send attempt leaves the
    queue unchanged.

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

    Allan Stephens
     
  • Adds a check to detect when an attempt is made to send a message
    via the broadcast link and no neighboring nodes are currently available
    to receive it. Rather than wasting effort passing the message to the
    broadcast link and broadcast bearer, who will only throw it away,
    TIPC now frees the message immediately and reports success (i.e. the
    message has been delivered to all available destinations).

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

    Allan Stephens
     
  • Fixes oversight that allowed broadcast link node map to be updated without
    first taking the broadcast link spinlock that protects the map. As part
    of this fix the node map has been incorporated into the broadcast link
    structure to make the need for such protection more evident.

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

    Allan Stephens
     
  • Creates global variables to hold the broadcast link's pseudo-bearer and
    pseudo-link structures, rather than allocating them dynamically. There
    is only a single instance of each structure, and changing over to static
    allocation allows elimination of code to handle the cases where dynamic
    allocation was unsuccessful.

    The memset in the teardown code may look like they aren't used, but
    the same teardown code is run when there is a non-fatal error at
    init-time, so that stale data isn't present when the user fixes the
    cause of the soft error.

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

    Allan Stephens
     
  • Gets rid of an unnecessary check in the routine that updates the port id
    of a node's name publications when the node is assigned a network address,
    since the routine is only invoked if the new address is different from
    the existing one.

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

    Allan Stephens
     
  • Modifies TIPC's module unloading logic to switch itself into "single
    node" mode before starting to terminate networking support. This helps
    to ensure that no operations that require TIPC to be in "networking"
    mode can initiate once unloading starts.

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

    Allan Stephens
     
  • Gets rid of two pointless operations that zero out the array used to
    record information about TIPC's Ethernet bearers. There is no need to
    initialize the array on start up since it is a global variable that is
    already zero'd out, and there is no need to zero it out on exit because
    the array is never referenced again.

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

    Allan Stephens
     
  • Modifies Ethernet bearer disable logic to break the association between
    the bearer and its device driver at the time the bearer is disabled,
    rather than when the TIPC module is unloaded. This allows the array
    entry used by the disabled bearer to be re-used if the same bearer (or
    a different one) is subsequently enabled.

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

    Allan Stephens
     
  • Change TIPC's shutdown code to deactivate generic networking support
    before terminating Ethernet media support. The deactivation of generic
    networking support causes all existing bearers to be destroyed, meaning
    the Ethernet media termination routine no longer has to bother marking
    them as unavailable.

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

    Allan Stephens
     
  • Comment-only change to better explain why TIPC's configuration lock is
    temporarily released while activating support for network interfaces,
    and why the existing activation code doesn't require rework.

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

    Allan Stephens
     
  • Permits run-time alteration of default link settings on a per-media
    and per-bearer basis, in addition to the existing per-link basis.
    The following syntax can now be used:

    tipc-config -lt=/
    tipc-config -lp=/
    tipc-config -lw=/

    Note that changes to the default settings for a given media type has
    no effect on the default settings used by existing bearers. Similarly,
    changes to default bearer settings has no effect on existing link
    endpoints that utilize that interface.

    Thanks to Florian Westphal for his contributions to
    the development of this enhancement.

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

    Allan Stephens
     
  • Adds a check to ensure that TIPC ignores an incoming neighbor discovery
    message that specifies an invalid media address as its source. The check
    ensures that the source address is a valid, non-broadcast address that
    could legally be used by a neighboring link endpoint.

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

    Allan Stephens
     
  • Reworks TIPC's media address data structure and associated processing
    routines to transfer all media-specific details of address conversion
    to the associated TIPC media adaptation code. TIPC's generic bearer code
    now only needs to know which media type an address is associated with
    and whether or not it is a broadcast address, and totally ignores the
    "value" field that contains the actual media-specific addressing info.

    These changes eliminate the need for a number of endianness conversion
    operations and will make it easier for TIPC to support new media types
    in the future.

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

    Allan Stephens
     
  • Enhances TIPC's Ethernet media support to provide 3 new address conversion
    routines, which allow TIPC to interpret an address that is in string form
    and to convert an address to and from the 20 byte format used in TIPC's
    neighbor discovery messages.

    These routines are pre-requisites to a follow on commit that hides all
    media-specific addressing details from TIPC's generic bearer code.

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

    Allan Stephens
     
  • Enhances conversion of a media address to printable form so that an
    unconvertable address will be displayed as a string of hex digits,
    rather than not being displayed at all. (Also removes a pointless check
    for the existence of the media-specific address conversion routine,
    since the routine is not optional.)

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

    Allan Stephens
     
  • Simplifies error handling performed during media registration, since
    TIPC no longer supports the dynamic addition of new media types that
    are potentially error-prone. These simplifications include the following:

    1) No longer check for premature registration of a new media type.
    2) No longer check for negative link priority values (which was pointless
    since such values are unsigned, and could cause a compiler warning).
    3) No longer generate a warning describing the exact cause of any
    registration failure (just warns that overall registration failed).

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

    Allan Stephens
     
  • Changes TIPC's list of registered media types from an array of media
    structures to an array of pointers to media structures. This eliminates
    the need to copy of the contents of the structure passed in during media
    registration.

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

    Allan Stephens
     
  • Streamlines the detection of an attempt to register a TIPC media structure
    using an already registered name or type identifier. The revised logic now
    reuses an existing routine to detect an existing name and no longer
    unnecessarily manipulates the media type counter during an unsuccessful
    registration attempt.

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

    Allan Stephens
     
  • Speeds up the registration of TIPC media types by passing in a structure
    containing the required information, rather than by passing in the various
    fields describing the media type individually.

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

    Allan Stephens
     
  • Permits a Linux container to use TIPC sockets even when it has its own
    network namespace defined by removing the check that prohibits such use.
    This makes it possible for users who wish to isolate their container
    network traffic from normal network traffic to utilize TIPC.

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

    Allan Stephens
     

20 Dec, 2011

1 commit


01 Nov, 2011

2 commits


18 Sep, 2011

6 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