DPDK patches and discussions
 help / color / mirror / Atom feed
From: "jiangheng (G)" <jiangheng14@huawei.com>
To: "users@dpdk.org" <users@dpdk.org>,
	"jiayu.hu@intel.com" <jiayu.hu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: [GRO] check whether ip_id continuity needs to be checked when two TCP packets are merged.
Date: Sat, 15 Apr 2023 14:45:39 +0000	[thread overview]
Message-ID: <3bec4e84b0dc406887e9df08ddfd91ad@huawei.com> (raw)

Hi jiayu.hu

It cannot be guaranteed that 16bit identification field of ip packets in the same tcp stream will be continuous.
Please help check whether ip_id continuity needs to be checked when two TCP packets are merged?
Seems to modify the following code, gro will aggregate better, and work better:

diff --git a/lib/gro/gro_tcp4.h b/lib/gro/gro_tcp4.h
index 212f97a042..06faead7b5 100644
--- a/lib/gro/gro_tcp4.h
+++ b/lib/gro/gro_tcp4.h
@@ -291,12 +291,10 @@ check_seq_option(struct gro_tcp4_item *item,
        /* check if the two packets are neighbors */
        len = pkt_orig->pkt_len - l2_offset - pkt_orig->l2_len -
                pkt_orig->l3_len - tcp_hl_orig;
-       if ((sent_seq == item->sent_seq + len) && (is_atomic ||
-                               (ip_id == item->ip_id + 1)))
+       if (sent_seq == item->sent_seq + len)
                /* append the new packet */
                return 1;
-       else if ((sent_seq + tcp_dl == item->sent_seq) && (is_atomic ||
-                               (ip_id + item->nb_merged == item->ip_id)))
+       else if (sent_seq + tcp_dl == item->sent_seq)
                /* pre-pend the new packet */
                return -1;


             reply	other threads:[~2023-04-15 14:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 14:45 jiangheng (G) [this message]
2023-04-20  2:30 ` Hu, Jiayu
2023-04-20  2:45   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bec4e84b0dc406887e9df08ddfd91ad@huawei.com \
    --to=jiangheng14@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).