Re: [PATCH v2 - RESEND]: [CCID 3]: Track RX/TX packet size `s' using moving-average

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Arnaldo Carvalho de Melo:
|  On 11/23/06, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
|  
|  > @@ -1022,6 +1047,9 @@ static void ccid3_hc_rx_packet_recv(stru
|  >         if (DCCP_SKB_CB(skb)->dccpd_type == DCCP_PKT_ACK)
|  >                 return;
|  >
|  > +       payload_size = skb->len - dccp_hdr(skb)->dccph_doff * 4;
|  
|  Should't we use (skb->len - dccp_hdr_len(skb)) to take into account
|  the different DCCP packet size header lengths? We can get payload in
|  other kinds of packets than just DATA, and even on DATAACK we should
|  not compute the sizeof(struct dccp_hdr_ack_bits) bytes into the
|  payload, no?
It would do the same. The above code is in the receiver side, dccph_doff*4 gives 
the header length including options. So for calculating the payload size it is not
necessary (although it is possible that payload_size = 0).
Or did you mean to swap the above statements?
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux