Commit 2e07dda1 authored by Allan Stephens's avatar Allan Stephens Committed by Paul Gortmaker

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: default avatarAllan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 741de3e9
...@@ -566,7 +566,7 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority) ...@@ -566,7 +566,7 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority)
INIT_LIST_HEAD(&b_ptr->links); INIT_LIST_HEAD(&b_ptr->links);
if (m_ptr->bcast) { if (m_ptr->bcast) {
b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr,
bcast_scope, 2); bcast_scope);
} }
spin_lock_init(&b_ptr->lock); spin_lock_init(&b_ptr->lock);
write_unlock_bh(&tipc_net_lock); write_unlock_bh(&tipc_net_lock);
......
...@@ -67,13 +67,11 @@ struct link_req { ...@@ -67,13 +67,11 @@ struct link_req {
/** /**
* tipc_disc_init_msg - initialize a link setup message * tipc_disc_init_msg - initialize a link setup message
* @type: message type (request or response) * @type: message type (request or response)
* @req_links: number of links associated with message
* @dest_domain: network domain of node(s) which should respond to message * @dest_domain: network domain of node(s) which should respond to message
* @b_ptr: ptr to bearer issuing message * @b_ptr: ptr to bearer issuing message
*/ */
static struct sk_buff *tipc_disc_init_msg(u32 type, static struct sk_buff *tipc_disc_init_msg(u32 type,
u32 req_links,
u32 dest_domain, u32 dest_domain,
struct tipc_bearer *b_ptr) struct tipc_bearer *b_ptr)
{ {
...@@ -84,7 +82,6 @@ static struct sk_buff *tipc_disc_init_msg(u32 type, ...@@ -84,7 +82,6 @@ static struct sk_buff *tipc_disc_init_msg(u32 type,
msg = buf_msg(buf); msg = buf_msg(buf);
tipc_msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain); tipc_msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain);
msg_set_non_seq(msg, 1); msg_set_non_seq(msg, 1);
msg_set_req_links(msg, req_links);
msg_set_dest_domain(msg, dest_domain); msg_set_dest_domain(msg, dest_domain);
msg_set_bc_netid(msg, tipc_net_id); msg_set_bc_netid(msg, tipc_net_id);
msg_set_media_addr(msg, &b_ptr->addr); 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) ...@@ -191,7 +188,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
spin_unlock_bh(&n_ptr->lock); spin_unlock_bh(&n_ptr->lock);
if ((type == DSC_RESP_MSG) || link_fully_up) if ((type == DSC_RESP_MSG) || link_fully_up)
return; return;
rbuf = tipc_disc_init_msg(DSC_RESP_MSG, 1, orig, b_ptr); rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr);
if (rbuf != NULL) { if (rbuf != NULL) {
b_ptr->media->send_msg(rbuf, b_ptr, &media_addr); b_ptr->media->send_msg(rbuf, b_ptr, &media_addr);
buf_discard(rbuf); buf_discard(rbuf);
...@@ -274,15 +271,13 @@ static void disc_timeout(struct link_req *req) ...@@ -274,15 +271,13 @@ static void disc_timeout(struct link_req *req)
* @b_ptr: ptr to bearer issuing requests * @b_ptr: ptr to bearer issuing requests
* @dest: destination address for request messages * @dest: destination address for request messages
* @dest_domain: network domain of node(s) which should respond to message * @dest_domain: network domain of node(s) which should respond to message
* @req_links: max number of desired links
* *
* Returns pointer to link request structure, or NULL if unable to create. * Returns pointer to link request structure, or NULL if unable to create.
*/ */
struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr, struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
const struct tipc_media_addr *dest, const struct tipc_media_addr *dest,
u32 dest_domain, u32 dest_domain)
u32 req_links)
{ {
struct link_req *req; struct link_req *req;
...@@ -290,7 +285,7 @@ struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr, ...@@ -290,7 +285,7 @@ struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
if (!req) if (!req)
return NULL; return NULL;
req->buf = tipc_disc_init_msg(DSC_REQ_MSG, req_links, dest_domain, b_ptr); req->buf = tipc_disc_init_msg(DSC_REQ_MSG, dest_domain, b_ptr);
if (!req->buf) { if (!req->buf) {
kfree(req); kfree(req);
return NULL; return NULL;
......
...@@ -41,8 +41,7 @@ struct link_req; ...@@ -41,8 +41,7 @@ struct link_req;
struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr, struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
const struct tipc_media_addr *dest, const struct tipc_media_addr *dest,
u32 dest_domain, u32 dest_domain);
u32 req_links);
void tipc_disc_update_link_req(struct link_req *req); void tipc_disc_update_link_req(struct link_req *req);
void tipc_disc_stop_link_req(struct link_req *req); void tipc_disc_stop_link_req(struct link_req *req);
......
...@@ -390,7 +390,6 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str) ...@@ -390,7 +390,6 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str)
if (msg_user(msg) == LINK_CONFIG) { if (msg_user(msg) == LINK_CONFIG) {
u32 *raw = (u32 *)msg; u32 *raw = (u32 *)msg;
struct tipc_media_addr *orig = (struct tipc_media_addr *)&raw[5]; struct tipc_media_addr *orig = (struct tipc_media_addr *)&raw[5];
tipc_printf(buf, ":REQL(%u):", msg_req_links(msg));
tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg)); tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg));
tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg)); tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg));
tipc_media_addr_printf(buf, orig); tipc_media_addr_printf(buf, orig);
......
...@@ -567,16 +567,6 @@ static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n) ...@@ -567,16 +567,6 @@ static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n)
msg_set_bits(m, 1, 16, 0x1fff, n); msg_set_bits(m, 1, 16, 0x1fff, n);
} }
static inline u32 msg_req_links(struct tipc_msg *m)
{
return msg_bits(m, 1, 16, 0xfff);
}
static inline void msg_set_req_links(struct tipc_msg *m, u32 n)
{
msg_set_bits(m, 1, 16, 0xfff, n);
}
/* /*
* Word 2 * Word 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment