12 Apr, 2016

1 commit

  • Nametable updates received from the network that cannot be applied
    immediately are placed on a defer queue. This queue is global to the
    TIPC module, which might cause problems when using TIPC in containers.
    To prevent nametable updates from escaping into the wrong namespace,
    we make the queue pernet instead.

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

    Erik Hugne
     

24 Oct, 2015

1 commit

  • The broadcast transmission link is currently instantiated when the
    network subsystem is started, i.e., on order from user space via netlink.

    This forces the broadcast transmission code to do unnecessary tests for
    the existence of the transmission link, as well in single mode node as
    in network mode.

    In this commit, we do instead create the link during initialization of
    the name space, and remove it when it is stopped. The fact that the
    transmission link now has a guaranteed longer life cycle than any of its
    potential clients paves the way for further code simplifcations
    and optimizations.

    Signed-off-by: Jon Maloy
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

05 May, 2015

1 commit

  • When a topology server accepts a connection request from its client,
    it allocates a connection instance and a tipc_subscriber structure
    object. The former is used to communicate with client, and the latter
    is often treated as a subscriber which manages all subscription events
    requested from a same client. When a topology server receives a request
    of subscribing name services from a client through the connection, it
    creates a tipc_subscription structure instance which is seen as a
    subscription recording what name services are subscribed. In order to
    manage all subscriptions from a same client, topology server links
    them into the subscrp_list of the subscriber. So subscriber and
    subscription completely represents different meanings respectively,
    but function names associated with them make us so confused that we
    are unable to easily tell which function is against subscriber and
    which is to subscription. So we want to eliminate the confusion by
    renaming them.

    Signed-off-by: Ying Xue
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     

01 Apr, 2015

1 commit

  • When remove TIPC module, there is a warning to remind us that a slab
    object is leaked like:

    root@localhost:~# rmmod tipc
    [ 19.056226] =============================================================================
    [ 19.057549] BUG TIPC (Not tainted): Objects remaining in TIPC on kmem_cache_close()
    [ 19.058736] -----------------------------------------------------------------------------
    [ 19.058736]
    [ 19.060287] INFO: Slab 0xffffea0000519a00 objects=23 used=1 fp=0xffff880014668b00 flags=0x100000000004080
    [ 19.061915] INFO: Object 0xffff880014668000 @offset=0
    [ 19.062717] kmem_cache_destroy TIPC: Slab cache still has objects

    This is because the listening socket of TIPC topology server is not
    closed before TIPC proto handler is unregistered with proto_unregister().
    However, as the socket is closed in tipc_exit_net() which is called by
    unregister_pernet_subsys() during unregistering TIPC namespace operation,
    the warning can be eliminated if calling unregister_pernet_subsys() is
    moved before calling proto_unregister().

    Fixes: e05b31f4bf89 ("tipc: make tipc socket support net namespace")
    Reviewed-by: Erik Hugne
    Signed-off-by: Ying Xue
    Signed-off-by: David S. Miller

    Ying Xue
     

10 Feb, 2015

2 commits

  • Add TIPC_CMD_NOOP to compat layer and remove the old framework.

    All legacy nl commands are now converted to the compat layer in
    netlink_compat.c.

    Signed-off-by: Richard Alpe
    Reviewed-by: Erik Hugne
    Reviewed-by: Ying Xue
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Richard Alpe
     
  • The new netlink API is no longer "v2" but rather the standard API and
    the legacy API is now "nl compat". We split them into separate
    start/stop and put them in different files in order to further
    distinguish them.

    Signed-off-by: Richard Alpe
    Reviewed-by: Erik Hugne
    Reviewed-by: Ying Xue
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Richard Alpe
     

13 Jan, 2015

9 commits

  • After namespace is supported, each namespace should own its private
    random value. So the global variable representing the random value
    must be moved to tipc_net structure.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • TIPC establishes one subscriber server which allows users to subscribe
    their interesting name service status. After tipc supports namespace,
    one dedicated tipc stack instance is created for each namespace, and
    each instance can be deemed as one independent TIPC node. As a result,
    subscriber server must be built for each namespace.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • If net namespace is supported in tipc, each namespace will be treated
    as a separate tipc node. Therefore, every namespace must own its
    private tipc node address. This means the "tipc_own_addr" global
    variable of node address must be moved to tipc_net structure to
    satisfy the requirement. It's turned out that users also can assign
    node address for every namespace.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • TIPC name table is used to store the mapping relationship between
    TIPC service name and socket port ID. When tipc supports namespace,
    it allows users to publish service names only owned by a certain
    namespace. Therefore, every namespace must have its private name
    table to prevent service names published to one namespace from being
    contaminated by other service names in another namespace. Therefore,
    The name table global variable (ie, nametbl) and its lock must be
    moved to tipc_net structure, and a parameter of namespace must be
    added for necessary functions so that they can obtain name table
    variable defined in tipc_net structure.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Now tipc socket table is statically allocated as a global variable.
    Through it, we can look up one socket instance with port ID, insert
    a new socket instance to the table, and delete a socket from the
    table. But when tipc supports net namespace, each namespace must own
    its specific socket table. So the global variable of socket table
    must be redefined in tipc_net structure. As a concequence, a new
    socket table will be allocated when a new namespace is created, and
    a socket table will be deallocated when namespace is destroyed.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Global variables associated with node table are below:
    - node table list (node_htable)
    - node hash table list (tipc_node_list)
    - node table lock (node_list_lock)
    - node number counter (tipc_num_nodes)
    - node link number counter (tipc_num_links)

    To make node table support namespace, above global variables must be
    moved to tipc_net structure in order to keep secret for different
    namespaces. As a consequence, these variables are allocated and
    initialized when namespace is created, and deallocated when namespace
    is destroyed. After the change, functions associated with these
    variables have to utilize a namespace pointer to access them. So
    adding namespace pointer as a parameter of these functions is the
    major change made in the commit.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Involve namespace infrastructure, make the "tipc_net_id" global
    variable aware of per namespace, and rename it to "net_id". In
    order that the conversion can be successfully done, an instance
    of networking namespace must be passed to relevant functions,
    allowing them to access the "net_id" variable of per namespace.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Only the works of initializing and shutting down tipc module are done
    in core.h and core.c files, so all stuffs which are not closely
    associated with the two tasks should be moved to appropriate places.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Remove redundant wrapper functions like tipc_core_start() and
    tipc_core_stop(), and directly move them to their callers, such
    as tipc_init() and tipc_exit(), having us clearly know what are
    really done in both initialization and deinitialzation functions.

    Signed-off-by: Ying Xue
    Tested-by: Tero Aho
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     

09 Jan, 2015

1 commit

  • As tipc reference table is statically allocated, its memory size
    requested on stack initialization stage is quite big even if the
    maximum port number is just restricted to 8191 currently, however,
    the number already becomes insufficient in practice. But if the
    maximum ports is allowed to its theory value - 2^32, its consumed
    memory size will reach a ridiculously unacceptable value. Apart from
    this, heavy tipc users spend a considerable amount of time in
    tipc_sk_get() due to the read-lock on ref_table_lock.

    If tipc reference table is converted with generic rhashtable, above
    mentioned both disadvantages would be resolved respectively: making
    use of the new resizable hash table can avoid locking on the lookup;
    smaller memory size is required at initial stage, for example, 256
    hash bucket slots are requested at the beginning phase instead of
    allocating the entire 8191 slots in old mode. The hash table will
    grow if entries exceeds 75% of table size up to a total table size
    of 1M, and it will automatically shrink if usage falls below 30%,
    but the minimum table size is allowed down to 256.

    Also converts ref_table_lock to a separate mutex to protect hash table
    mutations on write side. Lastly defers the release of the socket
    reference using call_rcu() to allow using an RCU read-side protected
    call to rhashtable_lookup().

    Signed-off-by: Ying Xue
    Acked-by: Jon Maloy
    Acked-by: Erik Hugne
    Cc: Thomas Graf
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Ying Xue
     

24 Aug, 2014

2 commits

  • The reference table is now 'socket aware' instead of being generic,
    and has in reality become a socket internal table. In order to be
    able to minimize the API exposed by the socket layer towards the rest
    of the stack, we now move the reference table definitions and functions
    into the file socket.c, and rename the functions accordingly.

    There are no functional changes in this commit.

    Signed-off-by: Jon Maloy
    Reviewed-by: Erik Hugne
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     
  • We move the inline functions in the file port.h to socket.c, and modify
    their names accordingly.

    We move struct tipc_port and some macros to socket.h.

    Finally, we remove the file port.h.

    Signed-off-by: Jon Maloy
    Reviewed-by: Erik Hugne
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

15 May, 2014

1 commit

  • Memory overhead when allocating big buffers for data transfer may
    be quite significant. E.g., truesize of a 64 KB buffer turns out
    to be 132 KB, 2 x the requested size.

    This invalidates the "worst case" calculation we have been
    using to determine the default socket receive buffer limit,
    which is based on the assumption that 1024x64KB = 67MB buffers
    may be queued up on a socket.

    Since TIPC connections cannot survive hitting the buffer limit,
    we have to compensate for this overhead.

    We do that in this commit by dividing the fix connection flow
    control window from 1024 (2*512) messages to 512 (2*256). Since
    older version nodes send out acks at 512 message intervals,
    compatibility with such nodes is guaranteed, although performance
    may be non-optimal in such cases.

    Signed-off-by: Jon Maloy
    Reviewed-by: Ying Xue
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

06 May, 2014

1 commit

  • In the previous commits of this series, we removed all asynchronous
    actions which were based on the tasklet handler - "tipc_k_signal()".

    So the moment has now come when we can completely remove the tasklet
    handler infrastructure. That is done with this commit.

    Signed-off-by: Ying Xue
    Reviewed-by: Erik Hugne
    Reviewed-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     

28 Mar, 2014

1 commit

  • Due to the lacking of any credential, it's allowed to accept commands
    requested from remote nodes to query the local node status, which is
    prone to involve potential security risks. Instead, if we login to
    a remote node with ssh command, this approach is not only more safe
    than the remote management feature, but also it can give us more
    permissions like changing the remote node configuration. So it's
    reasonable for us to obsolete the remote management feature now.

    Signed-off-by: Ying Xue
    Reviewed-by: Erik Hugne
    Signed-off-by: David S. Miller

    Ying Xue
     

06 Mar, 2014

1 commit

  • Conflicts:
    drivers/net/wireless/ath/ath9k/recv.c
    drivers/net/wireless/mwifiex/pcie.c
    net/ipv6/sit.c

    The SIT driver conflict consists of a bug fix being done by hand
    in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper
    was created (netdev_alloc_pcpu_stats()) which takes care of this.

    The two wireless conflicts were overlapping changes.

    Signed-off-by: David S. Miller

    David S. Miller
     

22 Feb, 2014

2 commits

  • Accidentally a side effect is involved by commit 6e967adf7(tipc:
    relocate common functions from media to bearer). Now tipc stack
    handler of receiving packets from netdevices as well as netdevice
    notification handler are registered when bearer is enabled rather
    than tipc module initialization stage, but the two handlers are
    both unregistered in tipc module exit phase. If tipc module is
    inserted and then immediately removed, the following warning
    message will appear:

    "dev_remove_pack: ffffffffa0380940 not found"

    This is because in module insertion stage tipc stack packet handler
    is not registered at all, but in module exit phase dev_remove_pack()
    needs to remove it. Of course, dev_remove_pack() cannot find tipc
    protocol handler from the kernel protocol handler list so that the
    warning message is printed out.

    But if registering the two handlers is adjusted from enabling bearer
    phase into inserting module stage, the warning message will be
    eliminated. Due to this change, tipc_core_start_net() and
    tipc_core_stop_net() can be deleted as well.

    Reported-by: Wang Weidong
    Cc: Jon Maloy
    Cc: Erik Hugne
    Signed-off-by: Ying Xue
    Reviewed-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • When tipc module is inserted, many tipc components are initialized
    one by one. During the initialization period, if one of them is
    failed, tipc_core_stop() will be called to stop all components
    whatever corresponding components are created or not. To avoid to
    release uncreated ones, relevant components have to add necessary
    enabled flags indicating whether they are created or not.

    But in the initialization stage, if one component is unsuccessfully
    created, we will just destroy successfully created components before
    the failed component instead of all components. All enabled flags
    defined in components, in turn, become redundant. Additionally it's
    also unnecessary to identify whether table.types is NULL in
    tipc_nametbl_stop() because name stable has been definitely created
    successfully when tipc_nametbl_stop() is called.

    Cc: Jon Maloy
    Cc: Erik Hugne
    Signed-off-by: Ying Xue
    Reviewed-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     

14 Feb, 2014

1 commit

  • In our ongoing effort to simplify the TIPC locking structure,
    we see a need to remove the linked list for tipc_links
    in the bearer. This can be explained as follows.

    Currently, we have three different ways to access a link,
    via three different lists/tables:

    1: Via a node hash table:
    Used by the time-critical outgoing/incoming data paths.
    (e.g. link_send_sections_fast() and tipc_recv_msg() ):

    grab net_lock(read)
    find node from node hash table
    grab node_lock
    select link
    grab bearer_lock
    send_msg()
    release bearer_lock
    release node lock
    release net_lock

    2: Via a global linked list for nodes:
    Used by configuration commands (link_cmd_set_value())

    grab net_lock(read)
    find node and link from global node list (using link name)
    grab node_lock
    update link
    release node lock
    release net_lock

    (Same locking order as above. No problem.)

    3: Via the bearer's linked link list:
    Used by notifications from interface (e.g. tipc_disable_bearer() )

    grab net_lock(write)
    grab bearer_lock
    get link ptr from bearer's link list
    get node from link
    grab node_lock
    delete link
    release node lock
    release bearer_lock
    release net_lock

    (Different order from above, but works because we grab the
    outer net_lock in write mode first, excluding all other access.)

    The first major goal in our simplification effort is to get rid
    of the "big" net_lock, replacing it with rcu-locks when accessing
    the node list and node hash array. This will come in a later patch
    series.

    But to get there we first need to rewrite access methods ##2 and 3,
    since removal of net_lock would introduce three major problems:

    a) In access method #2, we access the link before taking the
    protecting node_lock. This will not work once net_lock is gone,
    so we will have to change the access order. We will deal with
    this in a later commit in this series, "tipc: add node lock
    protection to link found by link_find_link()".

    b) When the outer protection from net_lock is gone, taking
    bearer_lock and node_lock in opposite order of method 1) and 2)
    will become an obvious deadlock hazard. This is fixed in the
    commit ("tipc: remove bearer_lock from tipc_bearer struct")
    later in this series.

    c) Similar to what is described in problem a), access method #3
    starts with using a link pointer that is unprotected by node_lock,
    in order to via that pointer find the correct node struct and
    lock it. Before we remove net_lock, this access order must be
    altered. This is what we do with this commit.

    We can avoid introducing problem problem c) by even here using the
    global node list to find the node, before accessing its links. When
    we loop though the node list we use the own bearer identity as search
    criteria, thus easily finding the links that are associated to the
    resetting/disabling bearer. It should be noted that although this
    method is somewhat slower than the current list traversal, it is in
    no way time critical. This is only about resetting or deleting links,
    something that must be considered relatively infrequent events.

    As a bonus, we can get rid of the mutual pointers between links and
    bearers. After this commit, pointer dependency go in one direction
    only: from the link to the bearer.

    This commit pre-empts introduction of problem c) as described above.

    Signed-off-by: Ying Xue
    Reviewed-by: Paul Gortmaker
    Signed-off-by: Jon Maloy
    Signed-off-by: David S. Miller

    Ying Xue
     

19 Dec, 2013

1 commit


11 Dec, 2013

2 commits

  • Currently, registering a TIPC stack handler in the network device layer
    is done twice, once for Ethernet (eth_media) and Infiniband (ib_media)
    repectively. But, as this registration is not media specific, we can
    avoid some code duplication by moving the registering function to
    the generic bearer layer, to the file bearer.c, and call it only once.
    The same is true for the network device event notifier.

    As a side effect, the two workqueues we are using for for setting up/
    cleaning up media can now be eliminated. Furthermore, the array for
    storing the specific media type structs, media_array[], can be entirely
    deleted.

    Note that the eth_started and ib_started flags were removed during the
    code relocation. There is now only one call to bearer_setup and
    bearer_cleanup, and these can logically not race against each other.

    Despite its size, this cleanup work incurs no functional changes in TIPC.
    In particular, it should be noted that the sequence ordering of received
    packets is unaffected by this change, since packet reception never was
    subject to any work queue handling in the first place.

    Signed-off-by: Ying Xue
    Cc: Patrick McHardy
    Signed-off-by: Jon Maloy
    Reviewed-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • The 'signal handler' service in TIPC is a mechanism that makes it
    possible to postpone execution of functions, by launcing them into
    a job queue for execution in a separate tasklet, independent of
    the launching execution thread.

    When we do rmmod on the tipc module, this service is stopped after
    the network service. At the same time, the stopping of the network
    service may itself launch jobs for execution, with the risk that these
    functions may be scheduled for execution after the data structures
    meant to be accessed by the job have already been deleted. We have
    seen this happen, most often resulting in an oops.

    This commit ensures that the signal handler is the very first to be
    stopped when TIPC is shut down, so there are no surprises during
    the cleanup of the other services.

    Signed-off-by: Jon Maloy
    Reviewed-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Jon Paul Maloy
     

18 Jun, 2013

3 commits

  • As the new socket-based TIPC server infrastructure has been
    introduced, we can now convert the configuration server to use
    it. Then we can take future steps to simplify the configuration
    server locking policy.

    Some minor reordering of initialization is done, due to the
    dependency on having tipc_socket_init completed.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • As the new TIPC server infrastructure has been introduced, we can
    now convert the TIPC topology server to it. We get two benefits
    from doing this:

    1) It simplifies the topology server locking policy. In the
    original locking policy, we placed one spin lock pointer in the
    tipc_subscriber structure to reuse the lock of the subscriber's
    server port, controlling access to members of tipc_subscriber
    instance. That is, we only used one lock to ensure both
    tipc_port and tipc_subscriber members were safely accessed.

    Now we introduce another spin lock for tipc_subscriber structure
    only protecting themselves, to get a finer granularity locking
    policy. Moreover, the change will allow us to make the topology
    server code more readable and maintainable.

    2) It fixes a bug where sent subscription events may be lost when
    the topology port is congested. Using the new service, the
    topology server now queues sent events into an outgoing buffer,
    and then wakes up a sender process which has been blocked in
    workqueue context. The process will keep picking events from the
    buffer and send them to their respective subscribers, using the
    kernel socket interface, until the buffer is empty. Even if the
    socket is congested during transmission there is no risk that
    events may be dropped, since the sender process may block when
    needed.

    Some minor reordering of initialization is done, since we now
    have a scenario where the topology server must be started after
    socket initialization has taken place, as the former depends
    on the latter. And overall, we see a simplification of the
    TIPC subscriber code in making this changeover.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • As per feedback from the netdev community, we change the buffer
    overflow protection algorithm in receiving sockets so that it
    always respects the nominal upper limit set in sk_rcvbuf.

    Instead of scaling up from a small sk_rcvbuf value, which leads to
    violation of the configured sk_rcvbuf limit, we now calculate the
    weighted per-message limit by scaling down from a much bigger value,
    still in the same field, according to the importance priority of the
    received message.

    To allow for administrative tunability of the socket receive buffer
    size, we create a tipc_rmem sysctl variable to allow the user to
    configure an even bigger value via sysctl command. It is a size of
    three (min/default/max) to be consistent with things like tcp_rmem.

    By default, the value initialized in tipc_rmem[1] is equal to the
    receive socket size needed by a TIPC_CRITICAL_IMPORTANCE message.
    This value is also set as the default value of sk_rcvbuf.

    Originally-by: Jon Maloy
    Cc: Neil Horman
    Cc: Jon Maloy
    [Ying: added sysctl variation to Jon's original patch]
    Signed-off-by: Ying Xue
    [PG: don't compile sysctl.c if not config'd; add Documentation]
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     

18 Apr, 2013

1 commit

  • Add InfiniBand media type based on the ethernet media type.

    The only real difference is that in case of InfiniBand, we need the entire
    20 bytes of space reserved for media addresses, so the TIPC media type ID is
    not explicitly stored in the packet payload.

    Sample output of tipc-config:

    # tipc-config -v -addr -netid -nt=all -p -m -b -n -ls

    node address:
    current network id: 4711
    Type Lower Upper Port Identity Publication Scope
    0 167776257 167776257 1855512578 cluster
    167776260 167776260 1216454658 zone
    1 1 1 1216479236 node
    Ports:
    1216479235: bound to {1,1}
    1216454657: bound to {0,167776260}
    Media:
    eth
    ib
    Bearers:
    ib:ib0
    Nodes known:
    : up
    Link
    Window:20 packets
    RX packets:0 fragments:0/0 bundles:0/0
    TX packets:0 fragments:0/0 bundles:0/0
    RX naks:0 defs:0 dups:0
    TX naks:0 acks:0 dups:0
    Congestion bearer:0 link:0 Send queue max:0 avg:0

    Link
    ACTIVE MTU:2044 Priority:10 Tolerance:1500 ms Window:50 packets
    RX packets:80 fragments:0/0 bundles:0/0
    TX packets:40 fragments:0/0 bundles:0/0
    TX profile sample:22 packets average:54 octets
    0-64:100% -256:0% -1024:0% -4096:0% -16384:0% -32768:0% -66000:0%
    RX states:410 probes:213 naks:0 defs:0 dups:0
    TX states:410 probes:197 naks:0 acks:0 dups:0
    Congestion bearer:0 link:0 Send queue max:1 avg:0

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

23 Nov, 2012

1 commit

  • There used to be a time when TIPC had lots of Kconfig knobs the
    end user could alter, but they have all been made automatic or
    obsolete, with the exception of CONFIG_TIPC_PORTS. This
    previously existing set of options was all hidden under the
    TIPC_ADVANCED setting, which does not exist in any code, but
    only in Kconfig scope.

    Having this now, just to hide the one remaining "advanced"
    option no longer makes sense. Remove it. Also get rid of the
    ifdeffery in the TIPC code that allowed for TIPC_PORTS to be
    possibly undefined.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

20 Aug, 2012

5 commits

  • Gets rid of the need for users to specify the maximum number of
    name publications supported by TIPC. TIPC now automatically provides
    support for the maximum number of name publications to 65535.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Gets rid of the need for users to specify the maximum number of
    name subscriptions supported by TIPC. TIPC now automatically provides
    support for the maximum number of name subscriptions to 65535.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Added to the following:

    - tipc_random
    - tipc_own_addr
    - tipc_max_ports
    - tipc_net_id
    - tipc_remote_management
    - handler_enabled

    The above global variables are read often, but written rarely. Use
    __read_mostly to prevent them being on the same cacheline as another
    variable which is written to often, which would cause cacheline
    bouncing.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • Since now tipc_net_start() always returns a success code - 0, its
    return value type should be changed from integer to void, which can
    avoid unnecessary check for its return value.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     
  • There is no real reason to check whether all letters in the given
    media name and network interface name are within the character set
    defined in tipc_alphabet array. Even if we eliminate the checking,
    the rest of checking conditions in tipc_enable_bearer() can ensure
    we do not enable an invalid or illegal bearer.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker
    Signed-off-by: David S. Miller

    Ying Xue
     

14 Jul, 2012

2 commits

  • The internal log buffer handling functions can now safely be
    removed since there is no code using it anymore. Requests to
    interact with the internal tipc log buffer over netlink (in
    config.c) will report 'obsolete command'.

    This represents the final removal of any references to a
    struct print_buf, and the removal of the struct itself.
    We also get rid of a TIPC specific Kconfig in the process.

    Finally, log.h is removed since it is not needed anymore.

    Signed-off-by: Erik Hugne
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker

    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: Erik Hugne
    Signed-off-by: Jon Maloy
    [PG: use pr_fmt as suggested by Joe Perches ]
    Signed-off-by: Paul Gortmaker

    Erik Hugne