DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gavin Hu <Gavin.Hu@arm.com>
To: "Kokkilagadda, Kiran" <Kiran.Kokkilagadda@cavium.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	"Jacob,  Jerin" <Jerin.JacobKollanukkaran@cavium.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	nd <nd@arm.com>, Ola Liljedahl <Ola.Liljedahl@arm.com>,
	Steve Capper <Steve.Capper@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization
Date: Tue, 28 Aug 2018 19:30:54 +0000	[thread overview]
Message-ID: <VI1PR08MB3167751502A039043C424C718F0A0@VI1PR08MB3167.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <BYAPR07MB495006817D97094249331ADDE60A0@BYAPR07MB4950.namprd07.prod.outlook.com>

Assuming reader and writer may execute on different CPU's, this become standard multithreaded programming.
We are concerned about that update the reader pointer too early(weak ordering may reorder it before reading from the slots), that means the slots are released and may immediately overwritten by the writer then you get "too new" data and get lost of the old data.

From: Kokkilagadda, Kiran <Kiran.Kokkilagadda@cavium.com>
Sent: Tuesday, August 28, 2018 6:44 PM
To: Gavin Hu <Gavin.Hu@arm.com>; Ferruh Yigit <ferruh.yigit@intel.com>; Jacob, Jerin <Jerin.JacobKollanukkaran@cavium.com>
Cc: dev@dpdk.org; Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization


In this instance there won't be any problem, as until the value of fifo->write changes, this loop won't get executed. As of now we didn't see any issue with it and for performance reasons, we don't want to keep read barrier.



________________________________
From: Gavin Hu <Gavin.Hu@arm.com<mailto:Gavin.Hu@arm.com>>
Sent: Monday, August 27, 2018 9:10 PM
To: Ferruh Yigit; Kokkilagadda, Kiran; Jacob, Jerin
Cc: dev@dpdk.org<mailto:dev@dpdk.org>; Honnappa Nagarahalli
Subject: RE: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization

External Email

This fix is not complete, kni_fifo_get requires a read fence also, otherwise it probably gets stale data on a weak ordering platform.

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> On Behalf Of Ferruh Yigit
> Sent: Monday, August 27, 2018 10:08 PM
> To: Kiran Kumar <kkokkilagadda@caviumnetworks.com<mailto:kkokkilagadda@caviumnetworks.com>>;
> jerin.jacob@caviumnetworks.com<mailto:jerin.jacob@caviumnetworks.com>
> Cc: dev@dpdk.org<mailto:dev@dpdk.org>
> Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer
> synchronization
>
> On 8/16/2018 10:55 AM, Kiran Kumar wrote:
> > With existing code in kni_fifo_put, rx_q values are not being updated
> > before updating fifo_write. While reading rx_q in kni_net_rx_normal,
> > This is causing the sync issue on other core. So adding a write
> > barrier to make sure the values being synced before updating fifo_write.
> >
> > Fixes: 3fc5ca2f6352 ("kni: initial import")
> >
> > Signed-off-by: Kiran Kumar <kkokkilagadda@caviumnetworks.com<mailto:kkokkilagadda@caviumnetworks.com>>
> > Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com<mailto:jerin.jacob@caviumnetworks.com>>
>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com<mailto:ferruh.yigit@intel.com>>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  parent reply	other threads:[~2018-08-28 19:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 10:23 [dpdk-dev] [PATCH] kni: fix kni rx " Kiran Kumar
2018-08-09 11:30 ` Ferruh Yigit
2018-08-16  6:52   ` Jerin Jacob
2018-08-16 12:28     ` Ferruh Yigit
2018-08-16  9:01 ` Jerin Jacob
2018-08-16  9:55 ` [dpdk-dev] [PATCH v2] kni: fix kni Rx " Kiran Kumar
2018-08-27 14:07   ` Ferruh Yigit
2018-08-27 15:40     ` Gavin Hu
2018-08-28 10:43       ` Kokkilagadda, Kiran
2018-08-28 10:51         ` Kokkilagadda, Kiran
2018-08-28 19:30         ` Gavin Hu [this message]
2018-08-29  4:59           ` Honnappa Nagarahalli
2018-08-29  5:49             ` Kokkilagadda, Kiran
2018-08-29  7:34               ` Ola Liljedahl
2018-08-29  8:28                 ` Jerin Jacob
2018-08-29  8:47                   ` Ola Liljedahl
2018-08-29  8:57                     ` Jerin Jacob
2018-09-13 17:40                       ` Honnappa Nagarahalli
2018-09-13 17:51                         ` Jerin Jacob
2018-09-13 23:45                           ` Honnappa Nagarahalli
2018-09-14  2:45                             ` Jerin Jacob
2018-09-18 15:53                               ` Ferruh Yigit
2018-09-19  5:37                                 ` Honnappa Nagarahalli

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=VI1PR08MB3167751502A039043C424C718F0A0@VI1PR08MB3167.eurprd08.prod.outlook.com \
    --to=gavin.hu@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Jerin.JacobKollanukkaran@cavium.com \
    --cc=Kiran.Kokkilagadda@cavium.com \
    --cc=Ola.Liljedahl@arm.com \
    --cc=Steve.Capper@arm.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=nd@arm.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).