From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 97EE53195 for ; Tue, 24 Jul 2018 18:09:16 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id o11-v6so3083191wmh.2 for ; Tue, 24 Jul 2018 09:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K6Z0RRITgGqRIRCve1cmm3qY9o8wJXlMed2020Zn/fE=; b=jbnGEmN6nkYtegYDKj53s/vo+f8bpYP5S4febEHQ97pnjKLj11JTGLsh2pBk1Ljeme 0J4v9Ay0N9MUtLFHmgnhsDpyhTFFbbjrRK9dTq+IdO430+mldVQLCLwTdLaQz9tB+p0V +IPw2vkYVoiiwJVR7sl5b+XddxezsccWYMf1c30CNavQEhXfjDW2zIomc+lvHA+8Zl+Z 6zTDfR2PVAAumcqS//YIM9gGKrec8KsEC5y1T81X1q/ElOIVcvjW/ebDi5kCFDC6D78U 4opr6CwNKd3nIxhi04/HmKZb32iEktYbnMQo2Papdwbjf6GGIJpvOCoQt4LVULtCvkKB 5I2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K6Z0RRITgGqRIRCve1cmm3qY9o8wJXlMed2020Zn/fE=; b=LbRcDSuVUSSq7h8GZbQ7JjzPmmIuwJZqhtsARmT6Tvoslu7Znr0B8RCRjAP68qh+w+ d7ofk+ldFdRCesgF9oX6T30vcVl9b8NXvu+IhafgL0Ve7Wu5bs67TOE+xO7CPaCq2jrj alGbqlQRZKj1wI7DvU/JoGDR+d74Rnt9188UxI2TAJ2pYxUHMDcDEFKlz7ldJb/heFhS x1ya/8zmIBy5KyTEqz9klk0w4cHog45rW4yiSrSYRoP7cKCZh0q6yQyAgRyGSypaCV7e cd91VlsxTPBCecNZ+6dgfwo4v0z1Y4jDzgx16KluXt3PNzMz2JiVWgmbVZIEE78QtM19 Hk6g== X-Gm-Message-State: AOUpUlHzg9pZufuVogTQrvpvCZ+CSUmvW6kA+/kPPeIhWHmrb7u4NkNr V5L3/NrAhpCrpU4HFG1IbM0= X-Google-Smtp-Source: AAOMgpeQg6B2/aZrGALxN2Kp/R0WcgOVfG0FgD2a2HYfxfIC9X5KDuP8Z4G9LygsCmbJp247CzNxkw== X-Received: by 2002:a1c:8414:: with SMTP id g20-v6mr2584018wmd.90.1532448556369; Tue, 24 Jul 2018 09:09:16 -0700 (PDT) Received: from localhost ([2a00:23c5:be94:4600:7b12:f8a0:fd52:f87d]) by smtp.gmail.com with ESMTPSA id l12-v6sm1299456wmh.0.2018.07.24.09.09.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 09:09:15 -0700 (PDT) From: luca.boccassi@gmail.com To: Yipeng Wang Cc: Pablo de Lara , dpdk stable Date: Tue, 24 Jul 2018 17:07:47 +0100 Message-Id: <20180724160752.20287-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724160752.20287-1-luca.boccassi@gmail.com> References: <20180724160752.20287-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' has been queued to LTS release 16.11.8 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 16:09:16 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 4c56b4113f37cb7d0332dceb98108014de628ce5 Mon Sep 17 00:00:00 2001 From: Yipeng Wang Date: Tue, 10 Jul 2018 09:59:54 -0700 Subject: [PATCH] hash: fix multiwriter lock memory allocation [ upstream commit 27c813679ea961b94d3184c09e50a055ad726da3 ] When malloc for multiwriter_lock, the align should be RTE_CACHE_LINE_SIZE rather than LCORE_CACHE_SIZE. Also there should be check to verify the success of rte_malloc. Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX") Signed-off-by: Yipeng Wang Acked-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index fb462d69e..bfc6f9773 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -303,7 +303,10 @@ rte_hash_create(const struct rte_hash_parameters *params) h->add_key = ADD_KEY_MULTIWRITER; h->multiwriter_lock = rte_malloc(NULL, sizeof(rte_spinlock_t), - LCORE_CACHE_SIZE); + RTE_CACHE_LINE_SIZE); + if (h->multiwriter_lock == NULL) + goto err_unlock; + rte_spinlock_init(h->multiwriter_lock); } } else -- 2.18.0