qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>
Cc: "eddie . dong" <eddie.dong@intel.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>
Subject: Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection
Date: Thu, 28 Jul 2016 10:04:57 +0800	[thread overview]
Message-ID: <7f5188b9-01e3-1d33-110b-89fa94042352@redhat.com> (raw)
In-Reply-To: <3fe7364f-4835-ec6c-2077-7d38901c874a@cn.fujitsu.com>



On 2016年07月27日 17:05, Zhang Chen wrote:
>>> +    if (((tcp_pkt->th_flags & (TH_ACK | TH_SYN)) == TH_ACK)) {
>>> +        if (conn->syn_flag) {
>>> +            /* offset = secondary_seq - primary seq */
>>> +            conn->offset -= (ntohl(tcp_pkt->th_ack) - 1);
>>
>> The code here is conflict with your comment above. Why need - 1 here?
>
> (ntohl(tcp_pkt->th_ack) - 1) is the primary seq
> So, we need -1 here.
>
> Thanks
> Zhang Chen

Aha, right. Since we can't get the syn,ack packet sent by guest from 
primary node.

Better add a comment to explain this.

Thanks

  reply	other threads:[~2016-07-28  2:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 10:29 [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter Zhang Chen
2016-07-05 10:29 ` [Qemu-devel] [RFC PATCH V3 1/3] filter-rewriter: introduce filter-rewriter initialization Zhang Chen
2016-07-27  7:02   ` Jason Wang
2016-07-27  7:45     ` Zhang Chen
2016-07-05 10:29 ` [Qemu-devel] [RFC PATCH V3 2/3] filter-rewriter: track connection and parse packet Zhang Chen
2016-07-05 10:29 ` [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection Zhang Chen
2016-07-27  7:03   ` Jason Wang
2016-07-27  9:05     ` Zhang Chen
2016-07-28  2:04       ` Jason Wang [this message]
2016-07-27  2:32 ` [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter Zhang Chen
2016-07-27  2:50   ` Jason Wang
2016-07-27  5:49     ` Zhang Chen
2016-07-27  7:05       ` Jason Wang
2016-07-27  7:52         ` Zhang Chen
2016-07-28  1:52           ` Jason Wang

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=7f5188b9-01e3-1d33-110b-89fa94042352@redhat.com \
    --to=jasowang@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhangchen.fnst@cn.fujitsu.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).