17 Aug, 2020

1 commit

  • When using ipv6_dev_find() in one module, it requires ipv6 not to
    work as a module. Otherwise, this error occurs in build:

    undefined reference to `ipv6_dev_find'.

    So fix it by adding "depends on IPV6 || IPV6=n" to tipc/Kconfig,
    as it does in sctp/Kconfig.

    Fixes: 5a6f6f579178 ("tipc: set ub->ifindex for local ipv6 address")
    Reported-by: kernel test robot
    Acked-by: Randy Dunlap
    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

09 Nov, 2019

1 commit

  • This commit offers an option to encrypt and authenticate all messaging,
    including the neighbor discovery messages. The currently most advanced
    algorithm supported is the AEAD AES-GCM (like IPSec or TLS). All
    encryption/decryption is done at the bearer layer, just before leaving
    or after entering TIPC.

    Supported features:
    - Encryption & authentication of all TIPC messages (header + data);
    - Two symmetric-key modes: Cluster and Per-node;
    - Automatic key switching;
    - Key-expired revoking (sequence number wrapped);
    - Lock-free encryption/decryption (RCU);
    - Asynchronous crypto, Intel AES-NI supported;
    - Multiple cipher transforms;
    - Logs & statistics;

    Two key modes:
    - Cluster key mode: One single key is used for both TX & RX in all
    nodes in the cluster.
    - Per-node key mode: Each nodes in the cluster has one specific TX key.
    For RX, a node requires its peers' TX key to be able to decrypt the
    messages from those peers.

    Key setting from user-space is performed via netlink by a user program
    (e.g. the iproute2 'tipc' tool).

    Internal key state machine:

    Attach Align(RX)
    +-+ +-+
    | V | V
    +---------+ Attach +---------+
    | IDLE |---------------->| PENDING |(user = 0)
    +---------+ +---------+
    A A Switch| A
    | | | |
    | | Free(switch/revoked) | |
    (Free)| +----------------------+ | |Timeout
    | (TX) | | |(RX)
    | | | |
    | | v |
    +---------+ Switch +---------+
    | PASSIVE |= 1)

    The number of TFMs is 10 by default and can be changed via the procfs
    'net/tipc/max_tfms'. At this moment, as for simplicity, this file is
    also used to print the crypto statistics at runtime:

    echo 0xfff1 > /proc/sys/net/tipc/max_tfms

    The patch defines a new TIPC version (v7) for the encryption message (-
    backward compatibility as well). The message is basically encapsulated
    as follows:

    +----------------------------------------------------------+
    | TIPCv7 encryption | Original TIPCv2 | Authentication |
    | header | packet (encrypted) | Tag |
    +----------------------------------------------------------+

    The throughput is about ~40% for small messages (compared with non-
    encryption) and ~9% for large messages. With the support from hardware
    crypto i.e. the Intel AES-NI CPU instructions, the throughput increases
    upto ~85% for small messages and ~55% for large messages.

    By default, the new feature is inactive (i.e. no encryption) until user
    sets a key for TIPC. There is however also a new option - "TIPC_CRYPTO"
    in the kernel configuration to enable/disable the new code when needed.

    MAINTAINERS | add two new files 'crypto.h' & 'crypto.c' in tipc

    Acked-by: Ying Xue
    Acked-by: Jon Maloy
    Signed-off-by: Tuong Lien
    Signed-off-by: David S. Miller

    Tuong Lien
     

15 Jun, 2019

1 commit

  • The kbuild documentation clearly shows that the documents
    there are written at different times: some use markdown,
    some use their own peculiar logic to split sections.

    Convert everything to ReST without affecting too much
    the author's style and avoiding adding uneeded markups.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

21 May, 2019

1 commit


23 Mar, 2018

1 commit

  • This commit adds socket diagnostics capability for AF_TIPC in netlink
    family NETLINK_SOCK_DIAG in a new kernel module (diag.ko).

    The following are key design considerations:
    - config TIPC_DIAG has default y, like INET_DIAG.
    - only requests with flag NLM_F_DUMP is supported (dump all).
    - tipc_sock_diag_req message is introduced to send filter parameters.
    - the response attributes are of TLV, some nested.

    To avoid exposing data structures between diag and tipc modules and
    avoid code duplication, the following additions are required:
    - export tipc_nl_sk_walk function to reuse socket iterator.
    - export tipc_sk_fill_sock_diag to fill the tipc diag attributes.
    - create a sock_diag response message in __tipc_add_sock_diag defined
    in diag.c and use the above exported tipc_sk_fill_sock_diag
    to fill response.

    Acked-by: Jon Maloy
    Acked-by: Ying Xue
    Signed-off-by: GhantaKrishnamurthy MohanKrishna
    Signed-off-by: Parthasarathy Bhuvaragan
    Signed-off-by: David S. Miller

    GhantaKrishnamurthy MohanKrishna
     

06 Mar, 2015

1 commit

  • The ip/udp bearer can be configured in a point-to-point
    mode by specifying both local and remote ip/hostname,
    or it can be enabled in multicast mode, where links are
    established to all tipc nodes that have joined the same
    multicast group. The multicast IP address is generated
    based on the TIPC network ID, but can be overridden by
    using another multicast address as remote ip.

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

    Erik Hugne
     

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
     

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
     

12 Jan, 2013

1 commit

  • The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
    while now and is almost always enabled by default. As agreed during the
    Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

    CC: Jon Maloy
    CC: Allan Stephens
    CC: "David S. Miller"
    Signed-off-by: Kees Cook
    Acked-by: David S. Miller

    Kees Cook
     

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
     

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
     
  • The link queue traces and packet level debug functions served
    a purpose during early development, but are now redundant
    since there are other, more capable tools available for
    debugging at the packet level.

    The TIPC_DEBUG Kconfig option is removed since it does not
    provide any extra debugging features anymore.

    This gets rid of a lot of tipc_printf usages, which will
    make the pending cleanup work of that function easier.

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

    Erik Hugne
     

14 Mar, 2011

1 commit

  • Gets rid of the need for users to specify the maximum number of
    cluster nodes supported by TIPC. TIPC now automatically provides
    support for all 4K nodes allowed by its addressing scheme.

    Note: This change sets TIPC's memory usage to the amount used by
    a maximum size node table with 4K entries. An upcoming patch that
    converts the node table from a linear array to a hash table will
    compact the node table to a more efficient design, but for clarity
    it is nice to have all the Kconfig infrastruture go away separately.

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

    Allan Stephens
     

02 Jan, 2011

4 commits

  • 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
     
  • Completes the simplification of TIPC's debugging capabilities. By default
    TIPC includes no debugging code, and any debugging code added by developers
    that calls the dbg() and dbg_macros() is compiled out. If debugging support
    is enabled, TIPC prints out some additional data about its internal state
    when certain abnormal conditions occur, and any developer-added calls to the
    TIPC debug macros are compiled in.

    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 were intended
    to allow TIPC to support a network containing multiple clusters.
    Currently, TIPC supports only networks consisting of a single cluster
    within a single zone, so this code is unnecessary.

    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 were intended
    to allows TIPC to support a network containing multiple zones.
    Currently, TIPC supports only networks consisting of a single cluster
    within a single zone, so this code is unnecessary.

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

    Allan Stephens
     

20 Jan, 2010

1 commit

  • This patch addresses a number of minor (mostly cosmetic) issues relating
    to the configuration of TIPC, including the following:

    - Corrects range limits for maximum number of ports per node
    - Adds missing range limits for size of log buffer
    - Removes configuration setting relating to unsupported slave node capability
    - Standardizes description and help text wording for configuration settings
    - Removes unneeded blank spaces

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

    Allan Stephens
     

04 Jan, 2010

1 commit

  • We can rely on kconfig to limit these numbers,
    no need to limit them at compile time/run time.

    Users who modify these numbers manually should
    be responsible for themself. :)

    Signed-off-by: WANG Cong
    Cc: Per Liden
    Cc: Jon Maloy
    Cc: Allan Stephens
    Cc: David S. Miller
    Signed-off-by: David S. Miller

    Amerigo Wang
     

25 May, 2007

1 commit


03 May, 2007

1 commit


18 Jan, 2006

1 commit


13 Jan, 2006

1 commit

  • TIPC (Transparent Inter Process Communication) is a protocol designed for
    intra cluster communication. For more information see
    http://tipc.sourceforge.net

    Signed-off-by: Per Liden

    Per Liden