30 Dec, 2011

2 commits


18 Sep, 2011

1 commit


11 May, 2011

1 commit

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

    Allan Stephens
     

24 Feb, 2011

3 commits

  • Eliminates a local iovec structure containing no data, which was
    previously used during the establishment of a topology service connection,
    since the same effect can be achieved by passing in a NULL pointer and
    an iovec length of zero.

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

    Allan Stephens
     
  • Modifies the initialization code for TIPC's topology service to
    avoid taking the spinlock protecting the subscriber list, since
    there is no need to do this.

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

    Allan Stephens
     
  • Merge two distinct structures containing information about a TIPC port
    into a single structure. The structures were previously kept separate
    so that public information about a port could be made available to
    applications using TIPC's native API, while the remaining information
    was kept private for use by TIPC itself. However, now that the native
    API has been removed there is no longer any need for this somewhat
    confusing arrangement.

    Since one of the structures was already embedded within the other, the
    change largely involves replacing instances of "publ.foo" with "foo".
    The changes do not otherwise alter the operation of TIPC ports.

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

    Allan Stephens
     

02 Jan, 2011

5 commits

  • Cleans up TIPC's source code to eliminate the needless initialization
    of static variables to zero.

    These changes are purely cosmetic and do not alter the operation of TIPC
    in any way.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Cleans up TIPC's source code to eliminate deviations from generally
    accepted coding conventions relating to leading/trailing white space
    and white space around commas, braces, cases, and sizeof.

    These changes are purely cosmetic and do not alter the operation of TIPC
    in any way.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Eliminates obsolete calls to two of TIPC's main debugging macros, as well
    as a pair of associated debugging routines that are no longer required.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Eliminates routines, data structures, and files that make up TIPC's
    user registry. The user registry is no longer needed since the native
    API routines that utilized it no longer exist and there are no longer
    any internal TIPC services that use it.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Simplifies TIPC's network topology service so that it no longer registers
    its ports with the user registry, since the service doesn't take advantage
    of any of the registry's capabilities.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     

03 Dec, 2010

4 commits

  • Removes initialization of a local variable that is always assigned
    a different value before it is referenced.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Eliminates support for the callback routine invoked when TIPC
    changes its mode of operation from inactive to standalone or from
    standalone to networked. This callback was part of TIPC's obsolete
    native API and is not used by TIPC internally.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • Gets rid of #include statements that are no longer required as a
    result of the merging of obsolete native API header file content
    into other TIPC include files.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • As part of the removal of TIPC's native API support it is no longer
    necessary for TIPC to export symbols for routines that can be called
    by kernel-based applications, nor for it to have header files that
    kernel-based applications can include to access the declarations for
    those routines. This commit eliminates the exporting of symbols by
    TIPC and migrates the contents of each obsolete native API include
    file into its corresponding non-native API equivalent.

    The code which was migrated in this commit was migrated intact, in
    that there are no technical changes combined with the relocation.

    Signed-off-by: Allan Stephens
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Allan Stephens
     

21 Oct, 2010

3 commits


17 Oct, 2010

1 commit

  • Do some cleanups of TIPC based on make namespacecheck
    1. Don't export unused symbols
    2. Eliminate dead code
    3. Make functions and variables local
    4. Rename buf_acquire to tipc_buf_acquire since it is used in several files

    Compile tested only.
    This make break out of tree kernel modules that depend on TIPC routines.

    Signed-off-by: Stephen Hemminger
    Acked-by: Jon Maloy
    Acked-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    stephen hemminger
     

24 Sep, 2010

1 commit


07 Apr, 2010

1 commit

  • This patch makes it explicit in the API that all fields in subscriptions and events exchanged with the Topology Server must be in
    network byte order.
    It also ensures that all fields of a subscription are compared when cancelling a subscription, in order to avoid inadvertent
    cancelling of the wrong subscription.
    Finally, the tipc module version is updated to 2.0.0, to reflect the API change.

    Signed-off-by: Jon Maloy
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

09 Mar, 2010

1 commit

  • 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
    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: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     

30 Nov, 2009

1 commit


13 Aug, 2008

1 commit


20 May, 2008

5 commits

  • This patch contains a set of cosmetic changes to TIPC's network
    topology service subsystem, including:

    - updates to comments (including copyright dates)
    - re-ordering structure fields to group them more logically
    - removal of optional debugging code that is no longer required
    - minor changes to whitespace to conform to Linux coding conventions

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch modifies TIPC's network topology service so that it
    only requires a single reference table entry per subscriber
    connection, rather than two. This is achieved by letting the
    reference to the server port communicating with the subscriber
    act as the reference to the subscriber object itself. (Since
    the subscriber cannot exist without its port, and vice versa,
    this dual role for the reference is perfectly natural.) This
    consolidation reduces the size of the reference table by 50%
    in the default configuration.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch fixes TIPC's topology server so that it does byte swapping
    correctly when endianness conversion is required. (Note: This bug only
    impacted an application if it issues a subscription request to a
    topology server on another node, rather than the server on it's own
    node; since the topology server is normally not accessible by off-node
    applications, most TIPC applications were not impacted by the bug.)

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch enables TIPC's topology server code to do customized
    endianness conversions on a per-subscription basis. (This
    capability is needed to support the upcoming consolidation of
    subscriber and subscription object references.)

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     
  • This patch enables TIPC's topology server code to do customized
    overlap detection handling on a per-subscription basis. (This
    capability is needed to support the upcoming introduction of
    multi-cluster TIPC networks.)

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     

13 May, 2008

1 commit

  • This patch eliminates the (very remote) chance of a crash resulting
    from a partially initialized socket or native port unexpectedly
    receiving a message. Now, during the creation of a socket or native
    port, the underlying generic port's lock is not released until all
    initialization required to handle incoming messages has been done.

    Signed-off-by: Allan Stephens
    Signed-off-by: David S. Miller

    Allan Stephens
     

11 Feb, 2007

1 commit


03 Dec, 2006

1 commit


19 Oct, 2006

1 commit

  • This patch allows a TIPC application to cancel an existing
    topology service subscription by re-requesting the subscription
    with the TIPC_SUB_CANCEL filter bit set. (All other bits of
    the cancel request must match the original subscription request.)

    Signed-off-by: Allan Stephens
    Signed-off-by: Per Liden
    Signed-off-by: David S. Miller

    Lijun Chen
     

22 Jul, 2006

1 commit


28 Jun, 2006

1 commit

  • locking init cleanups:

    - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
    - convert rwlocks in a similar manner

    this patch was generated automatically.

    Motivation:

    - cleanliness
    - lockdep needs control of lock initialization, which the open-coded
    variants do not give
    - it's also useful for -rt and for lock debugging in general

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

26 Jun, 2006

1 commit


21 Mar, 2006

2 commits

  • With reference to latest discussions on linux-kernel with respect to
    inline here is a patch for tipc to remove all inlines as used in
    the .c files. See also chapter 14 in Documentation/CodingStyle.

    Before:
    text data bss dec hex filename
    102990 5292 1752 110034 1add2 tipc.o

    Now:
    text data bss dec hex filename
    101190 5292 1752 108234 1a6ca tipc.o

    This is a nice text size reduction which will improve icache usage.
    In some cases bigger (> 4 lines) functions where declared inline
    and used in many places, they are most probarly no longer inlined by gcc
    resulting in the size reduction.
    There are several one liners that no longer are declared inline, but gcc
    should inline these just fine without the inline hint.

    With this patch applied one warning is added about an unused static
    function - that was hidded by utilising inline before.
    The function in question were kept so this patch is solely a
    inline removal patch.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Per Liden
    Signed-off-by: David S. Miller

    Sam Ravnborg
     
  • Tried to run the new tipc stack through sparse.
    Following patch fixes all cases where 0 was used
    as replacement of NULL.
    Use NULL to document this is a pointer and to silence sparse.

    This brough sparse warning count down with 127 to 24 warnings.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Per Liden
    Signed-off-by: David S. Miller

    Sam Ravnborg
     

18 Jan, 2006

1 commit