From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin KaFai Lau Subject: Re: [RFC PATCH v2 net-next 2/7] tcp: Merge tx_flags/tskey/txstamp_ack in tcp_collapse_retrans Date: Tue, 19 Apr 2016 10:28:37 -0700 Message-ID: <20160419172837.GA37697@kafai-mba.local> References: <1461019569-3037369-1-git-send-email-kafai@fb.com> <1461019569-3037369-3-git-send-email-kafai@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , Eric Dumazet , Neal Cardwell , Soheil Hassas Yeganeh , Willem de Bruijn , Yuchung Cheng , Kernel Team To: Soheil Hassas Yeganeh Return-path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:57611 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbcDSR2s (ORCPT ); Tue, 19 Apr 2016 13:28:48 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Apr 19, 2016 at 01:32:14AM -0400, Soheil Hassas Yeganeh wrote: > > + TCP_SKB_CB(skb)->txstamp_ack = > > + !!(shinfo->tx_flags & SKBTX_ACK_TSTAMP); > > Maybe we can skip a conditional jump here (because of !!), by simply > using the cached bit in next_skb: > TCP_SKB_CB(skb)->txstamp_ack = TCP_SKB_CB(next_skb)->txstamp_ack; Recall the tx_flags are merged/combined (and so should be the txstamp_ack). Would there be a case that TCP_SKB_CB(skb)->txstamp_ack is 1 and TCP_SKB_CB(next_skb)->txstamp_ack is 0? I can change it like the following which may help in showing the intention: if (TCP_SKB_CB(next_skb)->txstamp_ack) TCP_SKB_CB(skb)->txstamp_ack = 1; A bit off topic, I feel like the SKBTX_ACK_TSTAMP and txstamp_ack are sort of redundant but I have not look into the details yet, so not completely sure. It wwould be a separate cleanup patch if it is the case.