All of lore.kernel.org
 help / color / mirror / Atom feed
* A question about GRO neighbor packet matching
@ 2017-12-06 14:02 Ilya Matveychikov
  2017-12-06 18:12 ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: Ilya Matveychikov @ 2017-12-06 14:02 UTC (permalink / raw)
  To: dev; +Cc: jiayu.hu

Hello all,


My question is about neighbor packet matching algorithm for TCP. Is it
correct to expect that IP packets should have continuous ID enumeration
(i.e. iph-next.id = iph-prev.id + 1)?

~~~
lib/librte_gro/gro_tcp4.c:check_seq_option()
	...
	/* check if the two packets are neighbors */
	tcp_dl0 = pkt0->pkt_len - pkt0->l2_len - pkt0->l3_len - tcp_hl0;
	if ((sent_seq == (item->sent_seq + tcp_dl0)) &&
			(ip_id == (item->ip_id + 1)))
		/* append the new packet */
		return 1;
	else if (((sent_seq + tcp_dl) == item->sent_seq) &&
			((ip_id + item->nb_merged) == item->ip_id))
		/* pre-pend the new packet */
		return -1;
	else
		return 0;
~~~

As per RFC791:

  Identification:  16 bits

    An identifying value assigned by the sender to aid in assembling the
    fragments of a datagram.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-07  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 14:02 A question about GRO neighbor packet matching Ilya Matveychikov
2017-12-06 18:12 ` Stephen Hemminger
2017-12-06 18:38   ` Ilya Matveychikov
2017-12-06 23:15     ` Stephen Hemminger
2017-12-07  0:19       ` Ananyev, Konstantin
2017-12-07  1:01         ` Stephen Hemminger
2017-12-07  7:04           ` Ilya Matveychikov
2017-12-07  8:31           ` Hu, Jiayu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.