From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730064.outbound.protection.outlook.com [40.107.73.64]) by dpdk.org (Postfix) with ESMTP id DBD1D2674 for ; Thu, 16 Aug 2018 11:55:34 +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=LLSOw+boeKheBR8AEu785x0OEvCZykDTm7VFJeKsC/0=; b=R9nZGcSoVS0HVgB8G8kh0xAQG8sbeJcWReSS7NoEbzRcpZR4BNJHDyHzbZkHN1WO1pYSXw6rgcC4WK2tNmp8G4iXcqVMVnVZNMMa0wEiE8BHOzRD36i0SqS/WIl63wWq1sBOg4Oac063QtnpcbZZifto3Mq4VkIR5I1ue1yOKXw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Kiran.Kokkilagadda@cavium.com; Received: from kkokkilagadda.caveonetworks.com (111.93.218.67) by BL0PR07MB4947.namprd07.prod.outlook.com (2603:10b6:208:49::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.22; Thu, 16 Aug 2018 09:55:30 +0000 From: Kiran Kumar To: ferruh.yigit@intel.com, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Kiran Kumar Date: Thu, 16 Aug 2018 15:25:17 +0530 Message-Id: <1534413317-644-1-git-send-email-kkokkilagadda@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533810233-7706-1-git-send-email-kkokkilagadda@caviumnetworks.com> References: <1533810233-7706-1-git-send-email-kkokkilagadda@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BYAPR07CA0033.namprd07.prod.outlook.com (2603:10b6:a02:bc::46) To BL0PR07MB4947.namprd07.prod.outlook.com (2603:10b6:208:49::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e5c04745-c926-46f1-065f-08d6035e6791 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BL0PR07MB4947; X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4947; 3:3ka6osECiJs5Utz1hea35Lhq4NQV0rNJebNoWKmoAsW0u3+xguGejv/O/r10ZwabvDJO9vwiC+wLNGGZWwBlFH28Pipxy/w+L60mtNjh1jlcXY2FEMO5EBtaey5+0dRssTImpHI2HV6nD77sTtpo8yXImOi6nAI5cAddVZqcGTKiZUf6l9RM6XCWU2IEVqaSrArcPWsRX3uALu+y59vCNqdqLoEHPIXiwltLfnPMRKN2QGNco+QesnIGlMf5isP2; 25:IyXmjgJy5mbOP/X7SCy92BXJEpAPrHCsYxvFxLloHoqP/2fmrI53QzjmqWe4FKgmmrCFz0aBQSA5EC8vz6mo2W7VhxRrXX6E+KBFlJfwjAzTQ9tJgTSKRVBGmx6xQfPYFlBN61ZIbc5P0cdd9Z4w+HFEJ7opIExEvrNn/kabU8T2h+qpz6P0xSYl0U3YCKonv2ENSaIpc9YKvVAM8qnVnIMcp7xiJyWDuUPifefxYIbFaPKk/z3M3kotfSWCK20Jau0IEWsQocoXFfVGXS4ZLpD4oVQoo2k8thT4rxMRci+x/YuMseo2XYGGh+/C1XDjuLNTl4IKlWu4JaJIFUAUag==; 31:DaKInTRXmE7Rtf2EuEvTKkjxx2b2caIG/GYwbnR7Hx4duA4R7QKNEABKR36RbJ3bnAlRF/CtqdpMX1SykN8gzhwTMRdZ0Vj2nc7HhzVMm+0UBqDAjUQIB6uv+s0irOEmlrI0ARK3o6ZAbMJI8+YL7E/UyDPRHGuBbclIYggvMxiB5oJqK6KJIIsKnr92mMqqE59DNrjUvGF+6ctKVFe+PKOxWZYAcwDVgDngAuv/j0k= X-MS-TrafficTypeDiagnostic: BL0PR07MB4947: X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4947; 20:fR+rsM2Ugshp8hTozbhwC11BX1SbWoqUFM01ghGDa7knhCdOaFcGcFV7sYpcBbYX7aojwT9NTglrSvBlahTc/w/bxuSSpuEd88lLFbWtYqNnhoh1tj9DkXuV1Jc7AV6BSjCkvGeTobXKfxy4JK8JfDo/IgjFytqEJ702+z5VOxar4TLdv4Uy2+j+XSSyPRYub74QBFwOjzyb7xgpQxT6f7fPhc2j5YEbz0Bd7mEZuh45/Xo9vNCgmzJTp6e9Nj+52aC4++1RAawpRddgfiB8+QR073o0OXmaO9Pb7WMz+K30nNmOCnBMyAahTBNmfkJYURJeAqzQhhwlwbfGzTk/UFveaesfbNa+3yRXorBqZ+bGS7ewPLHjNwHVibXyhePewwJGqHzu9Pf9d00/BMQoXM5I7Q9jdw/QOCPDS74I6EDU98+5DQhmq1Mbt0ekrdaFTMZVKPrX2AjbERWo757beMwPpSUuKTBfH6pw/gmBBCE2/r4rt2Jt/5INGbpn+l/bfeueE5geJSX+oPRnu7LJvg/i7cqE6X0aNJ3nJXicQcWNaMkzZV4vQljR1ZHRtbePN3ccFVxMM0AL1IOufGf+CXYczU8dAFjzusqSQnmrTjQ=; 4:sLHSVrkA1HC5Jk50tGNhFZ5FtMe2DGv54oOyAGuKMH3sysUsnFB59noC2mB8tT1DEw4nd1ztS0qy5ekFfyFF3xraLwUWjDsnVACbQI5MGkoWYvqEPFiM2Gr/31d+/lNpIXdsx6v/j2EOeUXFrv6SZlzKBWwOspoLn+KVfdm1MCuwiPUka6fohLgcjMBeErK8bklwqmUMyhXCek6SIdRW1pQV+akvLRhEIaJuIVI2E0Y1uGxVULECJt7l/USYqFbY5OBRBBQdDhWpmzuWICP6hQ== 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)(5005006)(8121501046)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(149027)(150027)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(201708071742011)(7699016); SRVR:BL0PR07MB4947; BCL:0; PCL:0; RULEID:; SRVR:BL0PR07MB4947; X-Forefront-PRVS: 07665BE9D1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(366004)(39860400002)(396003)(189003)(199004)(6116002)(5660300001)(8676002)(305945005)(48376002)(53416004)(7736002)(8936002)(3846002)(47776003)(50466002)(66066001)(36756003)(81166006)(52116002)(6506007)(6636002)(106356001)(386003)(6666003)(51416003)(76176011)(81156014)(105586002)(50226002)(2906002)(16586007)(1857600001)(16526019)(2616005)(26005)(446003)(97736004)(186003)(25786009)(68736007)(107886003)(6486002)(476003)(956004)(42882007)(6512007)(478600001)(5009440100003)(72206003)(53936002)(316002)(4326008)(69596002)(11346002)(486006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR07MB4947; H:kkokkilagadda.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL0PR07MB4947; 23:zQfKQbIgX31kaCc/FZnLpNckHSKjgAzMn3wuLq7E+?= =?us-ascii?Q?g7uy+bokR1M2FsuADe5S7lBajC9Gxue+voKdD/509NPyobBjEasG5rcwsN0+?= =?us-ascii?Q?bsS2W7JI6t6lEZAlMC1BdGxRWITOrtZ4kZzC4+97nUtgIFe5DelGmiRr9/wa?= =?us-ascii?Q?FIDtM8FXv2ZckMu/Kug8/VudRjApCkFU74Nq8pQvimEJTS1iaK47pW6Dk0J6?= =?us-ascii?Q?TxkErViGRrfGk0U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Q16j94tQbGx4zr2WRwpWL+9Gjs3reavxbqIbBXSz117bBCQowzLlMz+ym+5WfS2sF/RTpr14SxPAkKXj1Rp662c4zlAiCbfA5pHUxcdw==; 5:hDb63VLh6rOIyvvZJVlpd7mWcFs2wELQ7/+NCiXLZiYp3h2234hGk3/PyLsL2VxBMH6eZkBKtPioE1N9xR7JtuZvHWoPQStRQdTwHFonq3njiUxanMisrCNMe3IDApH6vzDUHdbqknebKqz6jBjFzv/R54M50lyFUK/GB6nwQgk=; 7:OisGx4uc4X8R1XhZzT/IdrEgYaVJgD8KYXdk53eddJ6W3zo6olDjuwNMNUKhKoS2B6W3eMNU4C2dhtojpYbAy5PGtDfRl6ftM8p+NN1V12/IAf3fgpY4cAIaDtPObDUHVtJHSm4/ZK0nRTA0bL6yRGb7V5+8dpfExVipzB5Ou8v0V2BBfob89sHB0bNu3DJMRf2xOYSHHAYkOI+4Edlltu49D4oqB8hLyVrZzmuNJQ+p86Us93Ceqa/02EjUiq0r SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 09:55:30.1568 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e5c04745-c926-46f1-065f-08d6035e6791 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR07MB4947 Subject: [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: Thu, 16 Aug 2018 09:55:35 -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 Acked-by: Jerin Jacob --- v2 changes: - Changed rx in headline 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