From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0066.outbound.protection.outlook.com [104.47.38.66]) by dpdk.org (Postfix) with ESMTP id D4AACDED for ; Tue, 28 Aug 2018 12:44:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MUxa5jwnOe0bZV4T4wcBMy2B6K0uf2bLFDe1VWIV93Y=; b=dbTUZwwbi3T4Eseke2WEYXm5W1KPlEgBufdvw7oNQ7Olb0/rgMqRB11yIvwiCBy6N9LjkImf56QqOJJ8cWAk/tgkY53/NrUoJ7aH/WeW89COwV6Ou65Hjpbl5SoNkqH69PRlB7JX3eLj6MglhbXxDzrsA8P6lbay6JzRYGyhBbM= Received: from BYAPR07MB4950.namprd07.prod.outlook.com (52.135.238.203) by BYAPR07MB4727.namprd07.prod.outlook.com (52.135.205.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.14; Tue, 28 Aug 2018 10:43:59 +0000 Received: from BYAPR07MB4950.namprd07.prod.outlook.com ([fe80::521:cb43:9ff3:4118]) by BYAPR07MB4950.namprd07.prod.outlook.com ([fe80::521:cb43:9ff3:4118%4]) with mapi id 15.20.1080.015; Tue, 28 Aug 2018 10:43:59 +0000 From: "Kokkilagadda, Kiran" To: Gavin Hu , Ferruh Yigit , "Jacob, Jerin" CC: "dev@dpdk.org" , Honnappa Nagarahalli Thread-Topic: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization Thread-Index: AQHUNUdHkUZ+sZgtUU2iOsEQID7R1KTTtAyAgAAZ24CAAT5a2Q== Date: Tue, 28 Aug 2018 10:43:59 +0000 Message-ID: References: <1533810233-7706-1-git-send-email-kkokkilagadda@caviumnetworks.com> <1534413317-644-1-git-send-email-kkokkilagadda@caviumnetworks.com> <649064d2-430c-d761-44ce-453e1a14031a@intel.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Kiran.Kokkilagadda@cavium.com; x-originating-ip: [49.205.220.218] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BYAPR07MB4727; 6:DvwmG3LzEZ61lUiTLZowXOhtCEMAY/Zg0UzsbECxntFcfAyf9PuMd0Jof1ywxCrSURcztMXHrshcIZlsKf9aP/zHKH9IvAf2LhrxxfzZP8W39YMp/H+Rgy8ke/XFaaow1AKrFVhBr90PzybNzjffsiwgJ18SUlfdnkHvmaN42iuo3bsrPsg+BtJk7ImdB8DWFoEvxvoeQkQRurV3xEGukhv/1Dv9gd0QfklDWXBxikzdmLwHnAqb9jadX0A9BjsaEAa0AVmUEnhpnzaVxnyNHdcS/dAJI9t5Cs0gjFgKgoG4LU5saEz0KOlhswcZ8cRGXsSuQE6XanzlM2Ha1VT+gbkV4A9ETq02yrvsBEZRNdAkETqFRGyeItL3KhpohSDf5bbtjJ2yVYWqEKSeO8CbHp+NWZFbdhm5dKFYho7/sdRvjamdvpwUMnPmnXvQ8vZPWw0rrJSRW264KsGL2LZTXA==; 5:5OdCowozFp6OXroAexDsxUbv5/0k6HY0z0b7pQgvGpqG1KzjsZ+vJwIoaFscSEIIpSl9rEyG0WtsPskb0PcDBygFtrIlbxcqjswCs7Ska1GzhtDbz/KHt3QXBrir21fHV1wuYqLxPPT8NyMvQovNIoLI8PT1uJ0pQ0T6z1ld05g=; 7:luHn3Gun4ZpfLXfeTEz8TEZdO2ChWsLD3ZF4SqOEeqT3Rl6Fp19DibyoAtGwpMkazdFEdYZ91OJZ8xnaYVY35a0MSPKEiNXBv1NzcOyhanX/QymP7LaTlkS5HOnw8GjBGcc1FwNSZPlG+64+ECtyqE8mNP5vzAWFydHS0inmj12ZtRlMR0Gcks6xVbtYuhoFYKkWI794OYeEG5Mqxu6D3H6mucAJzbuwvsP4iek+4J1dWjOtChowYD1so652Wkcm x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(136003)(39860400002)(366004)(40434004)(189003)(199004)(13464003)(476003)(68736007)(26005)(25786009)(19627405001)(478600001)(97736004)(7696005)(93886005)(76176011)(53936002)(54896002)(11346002)(486006)(5250100002)(5024004)(14444005)(256004)(9686003)(102836004)(446003)(110136005)(54906003)(316002)(53546011)(186003)(6506007)(86362001)(99286004)(2900100001)(6246003)(74316002)(5660300001)(2906002)(6116002)(7736002)(55016002)(3846002)(14454004)(33656002)(6436002)(8936002)(4326008)(106356001)(72206003)(105586002)(8676002)(81166006)(81156014)(229853002)(6636002)(6606003)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4727; H:BYAPR07MB4950.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-correlation-id: a3bc9558-9c35-4c85-0b2c-08d60cd3297c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4727; x-ms-traffictypediagnostic: BYAPR07MB4727: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201708071742011)(7699016); SRVR:BYAPR07MB4727; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4727; x-forefront-prvs: 077884B8B5 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: CgpK/fDIWJTXCXz50+gHCcy4GgiffYDcaKQqagiuCQOdzW5KH4rBZFYT0GDSLS+eudwwXzclKwEeZYafSF/1K7ysTP5UJ+JNo5ODW6X2dM3Fu1NyDpFpmKsiNLEeWcPPFtZ/q/mczrtvsIGu6CkP+5Ix96VETcgtSJeu0yJVz1Gt7+yYc3mBvAAaVMY9biaJkhenwhYDMhCSxRHKwkU7iJaCJx/1dR5Jasz5riPupPfffzXrWzzMq+4DHrSUYy9yS8dE3/xGtf5bFe0oEo3JRmw6M9JWAtQWPhqay0GuUBG8SsTLmRAJrD6fuGtenrTh9WWj05UgFNVKlDGjJCc9rBsCRacuHOz8NSktem9EtDs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3bc9558-9c35-4c85-0b2c-08d60cd3297c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2018 10:43:59.2351 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4727 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchronization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 10:44:02 -0000 In this instance there won't be any problem, as until the value of fifo->wr= ite changes, this loop won't get executed. As of now we didn't see any issu= e with it and for performance reasons, we don't want to keep read barrier. ________________________________ From: Gavin Hu Sent: Monday, August 27, 2018 9:10 PM To: Ferruh Yigit; Kokkilagadda, Kiran; Jacob, Jerin Cc: dev@dpdk.org; Honnappa Nagarahalli Subject: RE: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchroniz= ation External Email This fix is not complete, kni_fifo_get requires a read fence also, otherwis= e it probably gets stale data on a weak ordering platform. > -----Original Message----- > From: dev On Behalf Of Ferruh Yigit > Sent: Monday, August 27, 2018 10:08 PM > To: Kiran Kumar ; > jerin.jacob@caviumnetworks.com > Cc: 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 > > Acked-by: Jerin Jacob > > Acked-by: Ferruh Yigit IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease 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.