Skip to content

Commit 2e07dda

Browse files
ajstephensPaul Gortmaker
authored andcommitted
tipc: Remove unused message header field for requested number of links
Eliminates support for the "number of requested links" field in a neighbor discovery message. This field was never used and has been removed from the TIPC 2.0 protocol specification. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1 parent 741de3e commit 2e07dda

5 files changed

Lines changed: 5 additions & 22 deletions

File tree

‎net/tipc/bearer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority)
566566
INIT_LIST_HEAD(&b_ptr->links);
567567
if (m_ptr->bcast) {
568568
b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr,
569-
bcast_scope, 2);
569+
bcast_scope);
570570
}
571571
spin_lock_init(&b_ptr->lock);
572572
write_unlock_bh(&tipc_net_lock);

‎net/tipc/discover.c‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ struct link_req {
6767
/**
6868
* tipc_disc_init_msg - initialize a link setup message
6969
* @type: message type (request or response)
70-
* @req_links: number of links associated with message
7170
* @dest_domain: network domain of node(s) which should respond to message
7271
* @b_ptr: ptr to bearer issuing message
7372
*/
7473

7574
static struct sk_buff *tipc_disc_init_msg(u32 type,
76-
u32 req_links,
7775
u32 dest_domain,
7876
struct tipc_bearer *b_ptr)
7977
{
@@ -84,7 +82,6 @@ static struct sk_buff *tipc_disc_init_msg(u32 type,
8482
msg = buf_msg(buf);
8583
tipc_msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain);
8684
msg_set_non_seq(msg, 1);
87-
msg_set_req_links(msg, req_links);
8885
msg_set_dest_domain(msg, dest_domain);
8986
msg_set_bc_netid(msg, tipc_net_id);
9087
msg_set_media_addr(msg, &b_ptr->addr);
@@ -191,7 +188,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
191188
spin_unlock_bh(&n_ptr->lock);
192189
if ((type == DSC_RESP_MSG) || link_fully_up)
193190
return;
194-
rbuf = tipc_disc_init_msg(DSC_RESP_MSG, 1, orig, b_ptr);
191+
rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr);
195192
if (rbuf != NULL) {
196193
b_ptr->media->send_msg(rbuf, b_ptr, &media_addr);
197194
buf_discard(rbuf);
@@ -274,23 +271,21 @@ static void disc_timeout(struct link_req *req)
274271
* @b_ptr: ptr to bearer issuing requests
275272
* @dest: destination address for request messages
276273
* @dest_domain: network domain of node(s) which should respond to message
277-
* @req_links: max number of desired links
278274
*
279275
* Returns pointer to link request structure, or NULL if unable to create.
280276
*/
281277

282278
struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
283279
const struct tipc_media_addr *dest,
284-
u32 dest_domain,
285-
u32 req_links)
280+
u32 dest_domain)
286281
{
287282
struct link_req *req;
288283

289284
req = kmalloc(sizeof(*req), GFP_ATOMIC);
290285
if (!req)
291286
return NULL;
292287

293-
req->buf = tipc_disc_init_msg(DSC_REQ_MSG, req_links, dest_domain, b_ptr);
288+
req->buf = tipc_disc_init_msg(DSC_REQ_MSG, dest_domain, b_ptr);
294289
if (!req->buf) {
295290
kfree(req);
296291
return NULL;

‎net/tipc/discover.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ struct link_req;
4141

4242
struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
4343
const struct tipc_media_addr *dest,
44-
u32 dest_domain,
45-
u32 req_links);
44+
u32 dest_domain);
4645
void tipc_disc_update_link_req(struct link_req *req);
4746
void tipc_disc_stop_link_req(struct link_req *req);
4847

‎net/tipc/msg.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,6 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str)
390390
if (msg_user(msg) == LINK_CONFIG) {
391391
u32 *raw = (u32 *)msg;
392392
struct tipc_media_addr *orig = (struct tipc_media_addr *)&raw[5];
393-
tipc_printf(buf, ":REQL(%u):", msg_req_links(msg));
394393
tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg));
395394
tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg));
396395
tipc_media_addr_printf(buf, orig);

‎net/tipc/msg.h‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -567,16 +567,6 @@ static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n)
567567
msg_set_bits(m, 1, 16, 0x1fff, n);
568568
}
569569

570-
static inline u32 msg_req_links(struct tipc_msg *m)
571-
{
572-
return msg_bits(m, 1, 16, 0xfff);
573-
}
574-
575-
static inline void msg_set_req_links(struct tipc_msg *m, u32 n)
576-
{
577-
msg_set_bits(m, 1, 16, 0xfff, n);
578-
}
579-
580570

581571
/*
582572
* Word 2

0 commit comments

Comments
 (0)