05 Jun, 2008

11 commits

  • This patch eliminates several cases where message header fields
    were being set to the same value twice.

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

    Allan Stephens
     
  • This patch increases the "sequence gap" field of the LINK_PROTOCOL
    message header from 8 bits to 13 bits (utilizing 5 previously
    unused 0 bits). This ensures that the field is big enough to
    indicate the loss of up to 8191 consecutive messages on the link,
    thereby accommodating the current worst-case scenario of 4000
    lost messages.

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

    Allan Stephens
     
  • This patch ensures that the display code that traverses the
    publication lists belonging to a name table entry take its
    associated spinlock, to protect against a possible change to
    one of its "head of list" pointers caused by a simultaneous
    name table lookup operation by another thread of control.

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

    Allan Stephens
     
  • This patch adds a check to prevent TIPC's name table display code
    from listing a name type entry if it exists only to hold subscription
    info, rather than published names.

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

    Allan Stephens
     
  • This patch eliminates the rarely-used "error code" argument
    when initializing a TIPC message header, since the default
    value of zero is the desired result in most cases; the few
    exceptional cases now set the error code explicitly.

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

    Allan Stephens
     
  • This patch eliminates a case where TIPC's link code could try reading
    a field that is not present in a short message header. (The random
    value obtained was not being used, but the read operation could result
    in an invalid memory access exception in extremely rare circumstances.)

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

    Allan Stephens
     
  • This patch enhances TIPC's handler for incoming messages in two
    ways:
    - the trivial, single-use routine for processing non-sequenced
    messages has been merged into the main handler
    - the interface that received a message is now identified without
    having to access and/or modify the associated sk_buff

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

    Allan Stephens
     
  • This patch introduces a new, out-of-range value to indicate that
    a link endpoint does not have an existing session established
    with its peer, eliminating the risk that the previously used
    "invalid session number" value (i.e. zero) might eventually be
    assigned as a valid session number and cause incorrect link
    behavior.

    The patch also introduces explicit bit masking when assigning a
    new link session number to ensure it does not exceed 16 bits.

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

    Allan Stephens
     
  • This patch corrects two problems in the display of error code
    information in TIPC messages when debugging:
    - no longer tries to display error code in NAME_DISTRIBUTOR
    messages, which don't have the error field
    - now displays error code in 24 byte data messages, which do
    have the error field

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

    Allan Stephens
     
  • This patch re-orders & re-groups the error checks performed on
    messages being delivered to native API ports, in order to clarify the
    similarities and differences required for the various message types.

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

    Allan Stephens
     
  • This patch fixes a bug that prevented TIPC from receiving a
    connection setup request message on a native TIPC port.
    The revised connection setup logic ensures that validation
    of the source of a connection-based message is skipped if
    the port is not yet connected to a peer.

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

    Allan Stephens
     

31 May, 2008

27 commits


29 May, 2008

2 commits

  • David S. Miller
     
  • I tried to group recovery related fields nearby (non-CA_Open related
    variables, to be more accurate) so that one to three cachelines would
    not be necessary in CA_Open. These are now contiguously deployed:

    struct sk_buff_head out_of_order_queue; /* 1968 80 */
    /* --- cacheline 32 boundary (2048 bytes) --- */
    struct tcp_sack_block duplicate_sack[1]; /* 2048 8 */
    struct tcp_sack_block selective_acks[4]; /* 2056 32 */
    struct tcp_sack_block recv_sack_cache[4]; /* 2088 32 */
    /* --- cacheline 33 boundary (2112 bytes) was 8 bytes ago --- */
    struct sk_buff * highest_sack; /* 2120 8 */
    int lost_cnt_hint; /* 2128 4 */
    int retransmit_cnt_hint; /* 2132 4 */
    u32 lost_retrans_low; /* 2136 4 */
    u8 reordering; /* 2140 1 */
    u8 keepalive_probes; /* 2141 1 */

    /* XXX 2 bytes hole, try to pack */

    u32 prior_ssthresh; /* 2144 4 */
    u32 high_seq; /* 2148 4 */
    u32 retrans_stamp; /* 2152 4 */
    u32 undo_marker; /* 2156 4 */
    int undo_retrans; /* 2160 4 */
    u32 total_retrans; /* 2164 4 */

    ...and they're then followed by URG slowpath & keepalive related
    variables.

    Head of the out_of_order_queue always needed for empty checks, if
    that's empty (and TCP is in CA_Open), following ~200 bytes (in 64-bit)
    shouldn't be necessary for anything. If only OFO queue exists but TCP
    is in CA_Open, selective_acks (and possibly duplicate_sack) are
    necessary besides the out_of_order_queue but the rest of the block
    again shouldn't be (ie., the other direction had losses).

    As the cacheline boundaries depend on many factors in the preceeding
    stuff, trying to align considering them doesn't make too much sense.

    Commented one ordering hazard.

    There are number of low utilized u8/16s that could be combined get 2
    bytes less in total so that the hole could be made to vanish (includes
    at least ecn_flags, urg_data, urg_mode, frto_counter, nonagle).

    Signed-off-by: Ilpo Järvinen
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Ilpo Järvinen