Skip to content

Commit bd78453

Browse files
ajstephensdavem330
authored andcommitted
tipc: Expand link sequence gap field to 13 bits
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 307fdf5 commit bd78453

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/tipc/msg.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* net/tipc/msg.h: Include file for TIPC message header routines
33
*
44
* Copyright (c) 2000-2007, Ericsson AB
5-
* Copyright (c) 2005-2007, Wind River Systems
5+
* Copyright (c) 2005-2008, Wind River Systems
66
* All rights reserved.
77
*
88
* Redistribution and use in source and binary forms, with or without
@@ -325,7 +325,7 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m)
325325
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
326326
w0:|vers |msg usr|hdr sz |n|resrv| packet size |
327327
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
328-
w1:|m typ|rsv=0| sequence gap | broadcast ack no |
328+
w1:|m typ| sequence gap | broadcast ack no |
329329
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
330330
w2:| link level ack no/bc_gap_from | seq no / bcast_gap_to |
331331
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -388,12 +388,12 @@ static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m)
388388

389389
static inline u32 msg_seq_gap(struct tipc_msg *m)
390390
{
391-
return msg_bits(m, 1, 16, 0xff);
391+
return msg_bits(m, 1, 16, 0x1fff);
392392
}
393393

394394
static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n)
395395
{
396-
msg_set_bits(m, 1, 16, 0xff, n);
396+
msg_set_bits(m, 1, 16, 0x1fff, n);
397397
}
398398

399399
static inline u32 msg_req_links(struct tipc_msg *m)

0 commit comments

Comments
 (0)