From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0086.outbound.protection.outlook.com [104.47.40.86]) by dpdk.org (Postfix) with ESMTP id 9A4612661 for ; Thu, 9 Aug 2018 12:24:13 +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=Vj9t0AvrOvpktvwOawhs2MHxGQ4+08uY2fg+m6w+ca4=; b=BIsPgPzEBoEavnG1j+xcUvNxBKCkdkUcU72HD7r++8S3QD3XNCRVpZojUp5MjT+QPsMlcHKPkq25yKMtoBSXjXqcpxlZme0oau9UEpHCNCLhzQmAqThfB78TD2oBsE8pfELpnN2ZJIGTGjpZ4rieSrcv3pos3TPMKGwMVPaXHqw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Kiran.Kokkilagadda@cavium.com; Received: from kkokkilagadda.caveonetworks.com (111.93.218.67) by DM6PR07MB4953.namprd07.prod.outlook.com (2603:10b6:5:25::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.21; Thu, 9 Aug 2018 10:24:10 +0000 From: Kiran Kumar To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Kiran Kumar Date: Thu, 9 Aug 2018 15:53:53 +0530 Message-Id: <1533810233-7706-1-git-send-email-kkokkilagadda@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM6PR08CA0023.namprd08.prod.outlook.com (2603:10b6:5:80::36) To DM6PR07MB4953.namprd07.prod.outlook.com (2603:10b6:5:25::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef3b78b6-0776-4d27-a9ec-08d5fde23fcb X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4953; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4953; 3:+5k7RtIalzXOt501KjZSXpqZGjIUe37lvPrJmn9Ldn66gPzQR6PtF+SwLWAQ5DxPVGhX2F+rrYtFGwUlqyzM7UGtC0OMQ1F1ZJEHD5LNgay/y9yKkG/RnaOl3ZVwKCyYM43FIJxLPI9rgaettEwEoVknAP35/ffYZXuv4I/V6BdQYfuPPzFMWlK3z0n7FrqvnxBKRW84LISxhT/mQ1Csi9yoMwq58loY2AhxstCIRYsQWGcmMnKaXvDB8zan4JxQ; 25:qiPjK1ga8aVMsctKu+08AC+eoJtow+NW63uoHjWUd5H2MTosDEYLvD+30rdbc3KSN4pG2189DsDQe1HD0/Y9sdKb3V5hR4q2I05WqKXtPGS+CEHDSahHLoFal5MFVsv0Eftaf2YXkSit+Neqex8sQ93uB5qyy35Wxw3ByuqjL7bfEpSwewz0Iuq58uipRBHZv0ljgRFvs/5G7nOeeCfdNLPFsvnhL9eSQkfaPRyuYDxbCtIk801kDkMPvvHYvFj1bp5o7sisVRtQxIucRdn02gk2wRcI9JDyqLcp6nnusCAE91ZJ35WCcWWkDcvby6mVcxX/A74Gf51nYp5E3Gm8ig==; 31:ErYbpd0Nr0azJOOPeRjKAkKeGhr+wRJAx2LfXhDVn57275WL/KEOsrvpcQkWF86bydvczewb39+oxeBK/QVoA7qucKfWygbMjVDC6K0SYcizKiI0h+tb/+3gd9ou+RAkrANDKamHjMjPsTob/htLWyw3TEcv9jU1gT4SE8/rhpJzMx1qRgPa76vtSqbgIsYXNqmMQ/QwLwM+X3E2Ow3nANxDgfI8BkEL5lya4v+V5PA= X-MS-TrafficTypeDiagnostic: DM6PR07MB4953: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4953; 20:NXAp0oH7qixoIpRPS00A2j+45LvUFwinQLmflLvWaUHELQsc49NP1ST1VKAyzgcM58zbMNq6M7o9SM2kaHnfDzXEFmmxjtPzSFHdN1A8IHzmqe8qLqoUTjIbMys1DuTtpBeTlLgp9qG0LJ9DuKGUSNnzu7q/o8TCPT9etf70y00srxEMflKKTq7/xPkQPL9707mRVj08rPKldjzevSP9+zEJEGNoIuQRosEJ56LTUjlvwRh2etFvnztB8DCVW3fwDVSpJV8rfSTsxd0AXqEKk/u6m/fBmhLtZeL9qp56dion+yAX6+1Z+BFC7IA9uZUUs4YsOyaLQaaD14katE30kE6tPpqAn/w62e++px5eoyNJj+y+T5rejEB4aTviW0kLHRa8HYft4Xv/wTMSqvJ/h5m4uWaUNM3yTjUuHjmtDcnb/zVWd3Q8y9HiGilX5wv6W2KYw5OQP0+28Wk2ST55R4stOKS0zbuLijRZbV1dTt+tcEo8JZhi27hhTtnL9mCGgfnxVYM0X24R9QTFgK9BhmTaLFJeER39tRBrVhHl2LZMX8a1fc6A3p6NjFXXq6KFS16Bvr0g0W/8VGX2zDt8bNkRA8NdmUoMupTkPb5TRuE=; 4:VrskfMuPKUflCtQLNPUa3yHmE0OIUSRp4iEkxyZXQyQMfUGsH+8ce+F57WwCERgm7Pr6ZTxUbRyXZRtzPGU+7eCFQKCRpQ+hYNty/Nv6M6HompXCC5m3slorDDf7721zB56PpYY6uYOtQvXVGBSXjkWzNtbl1A+EHDOZIb99u6IktMXw0Dxx2OxReMxKu3k6SHWbK7JbsD0Cze7YPnxOZa/ufFRHxOtyPp6aLACojzdUJ+8e66u5GBgjSt6dmf7vZkgS5y3I/2OrmdWLX+mjWQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4953; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4953; X-Forefront-PRVS: 0759F7A50A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(366004)(396003)(136003)(199004)(189003)(50226002)(105586002)(486006)(53416004)(386003)(2351001)(6506007)(316002)(478600001)(2361001)(16586007)(7736002)(5660300001)(81166006)(106356001)(8676002)(5009440100003)(26005)(1857600001)(68736007)(6116002)(3846002)(8936002)(305945005)(66066001)(81156014)(47776003)(97736004)(42882007)(4326008)(25786009)(69596002)(51416003)(956004)(6512007)(6666003)(16526019)(186003)(6916009)(2906002)(53936002)(2616005)(6486002)(50466002)(72206003)(36756003)(48376002)(476003)(52116002)(107886003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4953; H:kkokkilagadda.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4953; 23:ldA0auU64UP3SvhPA9YYkTamUF6f2kBUVNfyYNYUh?= =?us-ascii?Q?9CW3VJStYOCbaKCUNfKNKC7CXdxr0Sdh/H/jtw4ay3Zxex+XFujBKb/ZkjtH?= =?us-ascii?Q?eGZarDDnteCwOBYFKe4H1CYW38J21QsWi77gB5/tp1wfkja4DE+cHxTx0Aom?= =?us-ascii?Q?iZEFTIzJqe182/cKSvySp7oFYH3+ZZrJKqgFKtlD24gPcBPAtUv06k9bbssO?= =?us-ascii?Q?EzCiAvzC/GT2Ja6jWiurS1VgvwIUl6Gfe3vpamSYPqL+mpIAWwGAvymtgzRV?= =?us-ascii?Q?9cxgFCP3yOnhROq+Ei3LrYaP/9ObI2ic4na2CyxyH/lgqgbj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gc1Uh97mEBb+mwVfnSmiNVGrXi6a40xrWqcnVQxgNJjYAs4BVSSg6uaZJTqoavLmJBIFk2k2lsnoR+yG5uyZvOYrcxxYUCEPPwhM0mlHJeK2/Qg6EFJpdeCuMaO4Lq0WLHcXHwffZStMXisOZ1RcsmlzPfhgs1H8HsUY=; 7:i+wmnaskDe7/ZY60H2JPT7sOFd20lY9VX+UBhAjq+omaQPDZ90dXCuIf0TuauvqUekGAag9HTyLoSKIFH4auyzlbYmC4ElLxCkDW5Y6bfTcBu9ReqqethPHpunlTuvXWFVac/dKEhjFbZFB4mViLAEY7QkYNwVjN3dI20EWduc+2Al9NqdOsrAAx1RhVo17NctwR9d76UO0GqHC4Ox0HoRkeP+26ilmarQab6oinLlkkBZQU517VJMy7KNsUOz4h SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2018 10:24:10.4832 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef3b78b6-0776-4d27-a9ec-08d5fde23fcb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4953 Subject: [dpdk-dev] [PATCH] 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: Thu, 09 Aug 2018 10:24:14 -0000 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 --- lib/librte_kni/rte_kni_fifo.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_kni/rte_kni_fifo.h b/lib/librte_kni/rte_kni_fifo.h index ac26a8c..4d6b33e 100644 --- a/lib/librte_kni/rte_kni_fifo.h +++ b/lib/librte_kni/rte_kni_fifo.h @@ -39,6 +39,7 @@ kni_fifo_put(struct rte_kni_fifo *fifo, void **data, unsigned num) fifo->buffer[fifo_write] = data[i]; fifo_write = new_write; } + rte_smp_wmb(); fifo->write = fifo_write; return i; } -- 2.7.4