Thread (6 messages) flat view 6 messages, 2 authors, 2015-03-25

Re: [PATCH] net: tcp6: fix double call of tcp_v6_fill_cb()

From: Eric Dumazet <hidden>
Date: 2015-03-25 22:26:36

On Thu, 2015-03-26 at 00:25 +0300, Alexey Kodanev wrote:
Did various testing with exactly that change and hadn't found any 
"serious performance impact" on the stack (at least on my configuration).
Sure, but nobody will take the risk to make such change without serious
tests on multiple workloads and arches.
quoted hunk ↗ jump to hunk
Alright, what about other part of the patch, is it acceptable?

I came up with one more solution... not so radical :)
We can restore inet6_skb_parm with

     memmove(IP6CB(skb), &TCP_SKB_CB(skb)->header.h6, ...)

in the two places in tcp_v6_rcv(), before xfrm6_policy_check() + 
tcp_v6_fill_cb() are called again:

  static int tcp_v6_rcv(struct sk_buff *skb)
  {
         const struct tcphdr *th;
@@ -1543,6 +1552,7 @@ do_time_wait:
                         inet_twsk_deschedule(tw, &tcp_death_row);
                         inet_twsk_put(tw);
                         sk = sk2;
+                       tcp_v6_restore_cb(skb);
                         goto process;
                 }
                 /* Fall through to ACK */
@@ -1551,6 +1561,7 @@ do_time_wait:
                 tcp_v6_timewait_ack(sk, skb);
                 break;
         case TCP_TW_RST:
+               tcp_v6_restore_cb(skb);
                 goto no_tcp_socket;
         case TCP_TW_SUCCESS:
Looks good to me !
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help