Re: [tipc-discussion] [net-next 1/1] tipc: rename function msg_get_wrapped() to msg_inner_hdr()

2019-06-25 Thread David Miller
From: Jon Maloy 
Date: Tue, 25 Jun 2019 19:37:00 +0200

> We rename the inline function msg_get_wrapped() to the more
> comprehensible msg_inner_hdr().
> 
> Signed-off-by: Jon Maloy 

Applied, thanks Jon.


___
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion


Re: [tipc-discussion] [net-next 1/1] tipc: eliminate unnecessary skb expansion during retransmission

2019-06-25 Thread David Miller
From: Jon Maloy 
Date: Tue, 25 Jun 2019 18:08:13 +0200

> We increase the allocated headroom for the buffer copies to be
> retransmitted. This eliminates the need for the lower stack levels
> (UDP/IP/L2) to expand the headroom in order to add their own headers.
> 
> Signed-off-by: Jon Maloy 

Applied.


___
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion


Re: [tipc-discussion] [net-next 1/1] tipc: simplify stale link failure criteria

2019-06-25 Thread David Miller
From: Jon Maloy 
Date: Tue, 25 Jun 2019 17:36:43 +0200

> In commit a4dc70d46cf1 ("tipc: extend link reset criteria for stale
> packet retransmission") we made link retransmission failure events
> dependent on the link tolerance, and not only of the number of failed
> retransmission attempts, as we did earlier. This works well. However,
> keeping the original, additional criteria of 99 failed retransmissions
> is now redundant, and may in some cases lead to failure detection
> times in the order of minutes instead of the expected 1.5 sec link
> tolerance value.
> 
> We now remove this criteria altogether.
> 
> Acked-by: Ying Xue 
> Signed-off-by: Jon Maloy 

Applied.


___
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion


[tipc-discussion] [net-next 1/1] tipc: rename function msg_get_wrapped() to msg_inner_hdr()

2019-06-25 Thread Jon Maloy
We rename the inline function msg_get_wrapped() to the more
comprehensible msg_inner_hdr().

Signed-off-by: Jon Maloy 
---
 net/tipc/bcast.c | 4 ++--
 net/tipc/link.c  | 2 +-
 net/tipc/msg.h   | 4 ++--
 net/tipc/node.c  | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 6c997d4..1336f3c 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -323,7 +323,7 @@ static int tipc_mcast_send_sync(struct net *net, struct 
sk_buff *skb,
 
hdr = buf_msg(skb);
if (msg_user(hdr) == MSG_FRAGMENTER)
-   hdr = msg_get_wrapped(hdr);
+   hdr = msg_inner_hdr(hdr);
if (msg_type(hdr) != TIPC_MCAST_MSG)
return 0;
 
@@ -392,7 +392,7 @@ int tipc_mcast_xmit(struct net *net, struct sk_buff_head 
*pkts,
skb = skb_peek(pkts);
hdr = buf_msg(skb);
if (msg_user(hdr) == MSG_FRAGMENTER)
-   hdr = msg_get_wrapped(hdr);
+   hdr = msg_inner_hdr(hdr);
msg_set_is_rcast(hdr, method->rcast);
 
/* Switch method ? */
diff --git a/net/tipc/link.c b/net/tipc/link.c
index aa79bf8..f8bf63b 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -732,7 +732,7 @@ static void link_profile_stats(struct tipc_link *l)
if (msg_user(msg) == MSG_FRAGMENTER) {
if (msg_type(msg) != FIRST_FRAGMENT)
return;
-   length = msg_size(msg_get_wrapped(msg));
+   length = msg_size(msg_inner_hdr(msg));
}
l->stats.msg_lengths_total += length;
l->stats.msg_length_counts++;
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index 8de02ad..da509f0 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -308,7 +308,7 @@ static inline unchar *msg_data(struct tipc_msg *m)
return ((unchar *)m) + msg_hdr_sz(m);
 }
 
-static inline struct tipc_msg *msg_get_wrapped(struct tipc_msg *m)
+static inline struct tipc_msg *msg_inner_hdr(struct tipc_msg *m)
 {
return (struct tipc_msg *)msg_data(m);
 }
@@ -486,7 +486,7 @@ static inline void msg_set_prevnode(struct tipc_msg *m, u32 
a)
 static inline u32 msg_origport(struct tipc_msg *m)
 {
if (msg_user(m) == MSG_FRAGMENTER)
-   m = msg_get_wrapped(m);
+   m = msg_inner_hdr(m);
return msg_word(m, 4);
 }
 
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 550581d..324a1f9 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1649,7 +1649,7 @@ static bool tipc_node_check_state(struct tipc_node *n, 
struct sk_buff *skb,
int usr = msg_user(hdr);
int mtyp = msg_type(hdr);
u16 oseqno = msg_seqno(hdr);
-   u16 iseqno = msg_seqno(msg_get_wrapped(hdr));
+   u16 iseqno = msg_seqno(msg_inner_hdr(hdr));
u16 exp_pkts = msg_msgcnt(hdr);
u16 rcv_nxt, syncpt, dlv_nxt, inputq_len;
int state = n->state;
-- 
2.1.4



___
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion