patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Yicai Lu <luyicai@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	stable@dpdk.org,
	"zhoujingbin@huawei.com" <zhoujingbin@huawei.com>,
	"chenchanghu@huawei.com" <chenchanghu@huawei.com>,
	"jerry.lilijun@huawei.com" <jerry.lilijun@huawei.com>,
	"haifeng.lin@huawei.com" <haifeng.lin@huawei.com>,
	"guohongzhi1@huawei.com" <guohongzhi1@huawei.com>,
	"wangyunjian@huawei.com" <wangyunjian@huawei.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v6] ip_frag: remove padding length of fragment
Date: Fri, 15 Jan 2021 11:29:49 +0100	[thread overview]
Message-ID: <1911696.HhHb5bI1x5@thomas> (raw)
In-Reply-To: <BYAPR11MB3301E8D991652111ACCD32CE9AC30@BYAPR11MB3301.namprd11.prod.outlook.com>

> > In some situations, we would get several ip fragments, which total
> > data length is less than min_ip_len(64) and padding with zeros.
> > We simulated intermediate fragments by modifying the MTU.
> > To illustrate the problem, we simplify the packet format and
> > ignore the impact of the packet header.In namespace2,
> > a packet whose data length is 1520 is sent.
> > When the packet passes tap2, the packet is divided into two
> > fragments: fragment A and B, similar to (1520 = 1510 + 10).
> > When the packet passes tap3, the larger fragment packet A is
> > divided into two fragments A1 and A2, similar to (1510 = 1500 + 10).
> > Finally, the bond interface receives three fragments:
> > A1, A2, and B (1520 = 1500 + 10 + 10).
> > One fragmented packet A2 is smaller than the minimum Ethernet
> > frame length, so it needs to be padded.
> > 
> > |---------------------------------------------------|
> > |                      HOST                         |
> > | |--------------|   |----------------------------| |
> > | |      ns2     |   |      |--------------|      | |
> > | |  |--------|  |   |  |--------|    |--------|  | |
> > | |  |  tap1  |  |   |  |  tap2  | ns1|  tap3  |  | |
> > | |  |mtu=1510|  |   |  |mtu=1510|    |mtu=1500|  | |
> > | |--|1.1.1.1 |--|   |--|1.1.1.2 |----|2.1.1.1 |--| |
> > |    |--------|         |--------|    |--------|    |
> > |         |                 |              |        |
> > |         |-----------------|              |        |
> > |                                          |        |
> > |                                      |--------|   |
> > |                                      |  bond  |   |
> > |--------------------------------------|mtu=1500|---|
> >                                        |--------|
> > 
> > When processing the preceding packets above,
> > DPDK would aggregate fragmented packets A2 and B.
> > And error packets are generated, which padding(zero)
> > is displayed in the middle of the packet.
> > 
> > A2 + B:
> > 0000   fa 16 3e 9f fb 82 fa 47 b2 57 dc 20 08 00 45 00
> > 0010   00 33 b4 66 00 ba 3f 01 c1 a5 01 01 01 01 02 01
> > 0020   01 02 c0 c1 c2 c3 c4 c5 c6 c7 00 00 00 00 00 00
> > 0030   00 00 00 00 00 00 00 00 00 00 00 00 c8 c9 ca cb
> > 0040   cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db
> > 0050   dc dd de df e0 e1 e2 e3 e4 e5 e6
> > 
> > So, we would calculate the length of padding, and remove
> > the padding in pkt_len and data_len before aggregation.
> > And also we have the fix for both ipv4 and ipv6.
> > 
> > Fixes: 7f0983ee331c ("ip_frag: check fragment length of incoming packet")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Yicai Lu <luyicai@huawei.com>
> 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks




      reply	other threads:[~2021-01-15 10:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1605706193-17192-1-git-send-email-luyicai@huawei.com>
2020-12-12 11:05 ` [dpdk-stable] [dpdk-dev] [PATCH v5] " Yicai Lu
2020-12-14 14:44   ` Ananyev, Konstantin
2020-12-15  3:18     ` luyicai
2020-12-16 10:44       ` Ananyev, Konstantin
2020-12-16 10:54         ` luyicai
2020-12-16 13:36 ` [dpdk-stable] [dpdk-dev] [PATCH v6] " Yicai Lu
2020-12-18 11:41   ` Ananyev, Konstantin
2021-01-15 10:29     ` Thomas Monjalon [this message]

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=1911696.HhHb5bI1x5@thomas \
    --to=thomas@monjalon.net \
    --cc=chenchanghu@huawei.com \
    --cc=dev@dpdk.org \
    --cc=guohongzhi1@huawei.com \
    --cc=haifeng.lin@huawei.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=luyicai@huawei.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=zhoujingbin@huawei.com \
    /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).