From: Stephen Hemminger <stephen@networkplumber.org>
To: Jiayu Hu <jiayu.hu@intel.com>
Cc: dev@dpdk.org, konstantin.ananyev@intel.com,
jianfeng.tan@intel.com, junjie.j.chen@intel.com,
john.mcnamara@intel.com, matvejchikov@gmail.com
Subject: Re: [dpdk-dev] [PATCH v2 2/2] gro: support VxLAN GRO
Date: Wed, 13 Dec 2017 19:02:39 -0800 [thread overview]
Message-ID: <20171213190239.5154c571@xeon-e3> (raw)
In-Reply-To: <1513219779-100115-3-git-send-email-jiayu.hu@intel.com>
On Thu, 14 Dec 2017 10:49:39 +0800
Jiayu Hu <jiayu.hu@intel.com> wrote:
> + /* Don't merge packets whose outer DF bits are different. */
> + if (item->outer_is_atomic ^ outer_is_atomic)
unlikely() here?
> + return 0;
> +
> + l2_offset = pkt->outer_l2_len + pkt->outer_l3_len;
> + cmp = check_seq_option(&item->inner_item, tcp_hdr, sent_seq, ip_id,
> + tcp_hl, tcp_dl, l2_offset, is_atomic);
> + if ((cmp == 1) && (outer_is_atomic || (outer_ip_id ==
> + item->outer_ip_id +
> + item->inner_item.nb_merged)))
More readable if you break the line at the ||
> + /* Append the packet. */
> + return 1;
> + else if ((cmp == -1) && (outer_is_atomic || (outer_ip_id + 1 ==
> + item->outer_ip_id)))
else unecessary after return. Similar line break for readabilty.
> + /* Prepend the packet. */
> + return -1;
> + else
> + return 0;
> +}
> +
maybe?
if (cmp == 1) {
if (outer_is_atomic ||
outer_ip_id == item->outer_ip_id + item->inner_item.nb_merged)
return 1;
} else if (cmp == -1) {
if (uter_is_atomic || outer_ip_id + 1 == item->outer_ip_id)
return -1;
}
return 0;
next prev parent reply other threads:[~2017-12-14 3:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-25 3:17 [dpdk-dev] [PATCH 0/2] Support " Jiayu Hu
2017-11-25 3:17 ` [dpdk-dev] [PATCH 1/2] gro: TCP/IPV4 GRO codes cleanup Jiayu Hu
2017-11-25 3:17 ` [dpdk-dev] [PATCH 2/2] gro: support VxLAN GRO Jiayu Hu
2017-12-14 2:49 ` [dpdk-dev] [PATCH v2 0/2] Support " Jiayu Hu
2017-12-14 2:49 ` [dpdk-dev] [PATCH v2 1/2] gro: code cleanup Jiayu Hu
2017-12-14 2:49 ` [dpdk-dev] [PATCH v2 2/2] gro: support VxLAN GRO Jiayu Hu
2017-12-14 2:58 ` Stephen Hemminger
2017-12-14 3:02 ` Stephen Hemminger [this message]
2017-12-14 4:37 ` Hu, Jiayu
2017-12-22 7:25 ` [dpdk-dev] [PATCH v3 0/2] Support " Jiayu Hu
2017-12-22 7:25 ` [dpdk-dev] [PATCH v3 1/2] gro: code cleanup Jiayu Hu
2017-12-29 3:53 ` Chen, Junjie J
2018-01-02 11:26 ` Bruce Richardson
2018-01-03 1:07 ` Tan, Jianfeng
2018-01-03 1:27 ` Stephen Hemminger
2017-12-22 7:25 ` [dpdk-dev] [PATCH v3 2/2] gro: support VxLAN GRO Jiayu Hu
2017-12-22 8:17 ` Chen, Junjie J
2017-12-25 6:36 ` Jiayu Hu
2017-12-29 3:53 ` Chen, Junjie J
2017-12-29 3:52 ` [dpdk-dev] [PATCH v3 0/2] Support " Chen, Junjie J
2018-01-05 6:12 ` [dpdk-dev] [PATCH v4 " Jiayu Hu
2018-01-05 6:12 ` [dpdk-dev] [PATCH v4 1/2] gro: code cleanup Jiayu Hu
2018-01-08 1:15 ` Yao, Lei A
2018-01-10 0:09 ` Thomas Monjalon
2018-01-10 1:55 ` Hu, Jiayu
2018-01-05 6:12 ` [dpdk-dev] [PATCH v4 2/2] gro: support VxLAN GRO Jiayu Hu
2018-01-10 14:03 ` [dpdk-dev] [PATCH v5 0/3] Support " Jiayu Hu
2018-01-10 14:03 ` [dpdk-dev] [PATCH v5 1/3] gro: codes cleanup Jiayu Hu
2018-01-10 14:03 ` [dpdk-dev] [PATCH v5 2/3] gro: comply RFC 6864 to process IPv4 ID Jiayu Hu
2018-01-10 14:03 ` [dpdk-dev] [PATCH v5 3/3] gro: support VxLAN GRO Jiayu Hu
2018-01-11 22:15 ` [dpdk-dev] [PATCH v5 0/3] Support " Thomas Monjalon
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=20171213190239.5154c571@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=jiayu.hu@intel.com \
--cc=john.mcnamara@intel.com \
--cc=junjie.j.chen@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=matvejchikov@gmail.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).