From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700058.outbound.protection.outlook.com [40.107.70.58]) by dpdk.org (Postfix) with ESMTP id BA9D82BB1 for ; Tue, 28 Aug 2018 12:51:24 +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=YxHdeK7Y4WT13t49GP4Jpr+f28JXqZxh5ld8lvigRgY=; b=n169zdTIQMaMKeGd+6YuGkZ/XsDQ4PE+qqG5xpQ/XldkZB0KNAYkjvdNc7E1HMacqcChlHtiUolhCXe6JYIQxen3VKKgXp7vl8VXQFPQinDe6Yu2BAxsbekzy2fhshifG2vMA+3OyenQZ1Xv0ouHsjY4Is0Q9e9GEz71VMC5GRU= Received: from BYAPR07MB4950.namprd07.prod.outlook.com (52.135.238.203) by BYAPR07MB5000.namprd07.prod.outlook.com (52.135.238.217) 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:51:22 +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:51:22 +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+sZgtUU2iOsEQID7R1KTTtAyAgAAZ24CAAT5a2YAAAsKw Date: Tue, 28 Aug 2018 10:51:22 +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; BYAPR07MB5000; 6:ei8H4wfQhVLZP4WqUV1A09Y6Oae+Sa0yJ+OYU+2sblAua3jgAeBmJ1EuGGsTv1BhrD/bWUfucPX402/d9TMHRIiR8Q3Mse0SaWL/ARly0/dPRcnDHMeTYQtRBhgM152IKmYUiU+nIDg6CwdeDSUrfTKi7IzUvJJZ2/oJ5dKdBHrUwWvkLKHXck7CvIGnsglpZwJhtepdZkUFs+PsGNL1Xu4OCO2ZdPLCh0/Qc6jBS06IIfdyOHyJw421qXUP+qzNh+hz9ue+AoetkZe1rokjU5N0iyJsuj/rEBm7cbJgQSlyWeIT2vtsNTwpic4GH7bUp08Vld2CHBVXCkOhY2YV7lFzaF7K1edmFDdEEr0WRp/VbnOGt6OdJTmKd6RTzwrIo30sS0Hb9wF05KzYuFMJsPgCG9L0sf581N0TxvK7DULa6N9dOtfjCPbO4W4/z7b1DU7aInX3pWF5Ln+zkrKQeQ==; 5:q/X4v16OOaaUneoj8Hwlp71oXXb5iqsOwKo6Y9b8hCXfBzAB1IbtEvPNjFZm9v1ykPGJ2zln8fkS4O8wexZowTlERI8B5Q9Vh8TWs5NHN3tgReKnRVJ8K2pd6rt+QnxQyfGBsQZDarL0Tv5dPCHSlUh6NxdLmokGynaTtDbLKdw=; 7:xnA+dgBCD4VI+S2Gj+cqwnP4zMleFIJcrq+zS3Ts7USzpSgOtaOs57XhcopNo7GCqX9Q5Tpqxvp+XKM756OlWAOcCsEmg36VvEmId7TdDNV66IuBqGfxDYmNXZ+uWpxWJy40og6t9EO7dAHNVOvGOaXZJOCEHYJ2k/UPSa7YBgt0BiEp0AfGJ6VniZDHpmacBnHj0+16OST8b8kPl9Qn+eswuUMkYMOEjJRF7wQqihQBF7jTOc1SFl/qcH3b18OU x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(366004)(376002)(136003)(39860400002)(396003)(346002)(40434004)(13464003)(189003)(199004)(25786009)(68736007)(4326008)(2906002)(6246003)(6116002)(3846002)(8676002)(81166006)(81156014)(97736004)(86362001)(19627405001)(8936002)(2900100001)(5250100002)(33656002)(14454004)(478600001)(72206003)(7696005)(5024004)(14444005)(106356001)(256004)(105586002)(93886005)(66066001)(26005)(74316002)(186003)(2940100002)(229853002)(54896002)(6606003)(6636002)(99286004)(9686003)(53546011)(55016002)(6506007)(76176011)(93156006)(316002)(53936002)(476003)(7736002)(110136005)(486006)(446003)(5660300001)(11346002)(102836004)(54906003)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB5000; H:BYAPR07MB4950.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-correlation-id: c4a65345-4ab2-4c37-ada4-08d60cd4319d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB5000; x-ms-traffictypediagnostic: BYAPR07MB5000: 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)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:BYAPR07MB5000; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB5000; x-forefront-prvs: 077884B8B5 received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: L9mMU4CLxMHJtBfV5pusBHjc/8qSzjw0dX2/W0nKXGRJIBJ9eLD3qTw6dnsu3n4HbxwhQ0jlja49Q84Q/tZ8q+d79HVNBWFFScx0ltSS0mj6zztRALKwGPFTaMrHflz3H2WWrz1Xcl4sOqpo1MLeccj22JxaAJlV3wDdr4G/1uWhPasYRiUY5Sa7mWYzn4izm99GoSgpAADAd0FFO022+qo72eZnOqos2+pNeWeUKelhqotwbSQpylPX6xtnm9NzCgp87nPXMN7TapBD2Oh1dEeBIPGtSRp10/UCENrJOvkHeuVMQmyoiQJ0Nw3Dmo+AU0B0HQTS3L9nHc6kD0p/P/LJAVBA5TtvBQDzRSly8p0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4a65345-4ab2-4c37-ada4-08d60cd4319d X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2018 10:51:22.3480 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB5000 Content-Type: text/plain; charset="us-ascii" 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:51:25 -0000 I need to add the same write barrier change in kernel side kni_fifo_put. I = will add it and will send v3. ________________________________ From: Kokkilagadda, Kiran Sent: Tuesday, August 28, 2018 4:13:59 PM To: Gavin Hu; Ferruh Yigit; Jacob, Jerin Cc: dev@dpdk.org; Honnappa Nagarahalli Subject: Re: [dpdk-dev] [PATCH v2] kni: fix kni Rx fifo producer synchroniz= ation 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.