From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0988B432BC; Mon, 6 Nov 2023 20:34:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 86C67402BA; Mon, 6 Nov 2023 20:34:36 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 4F5CC402B6 for ; Mon, 6 Nov 2023 20:34:35 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1cc9784dbc1so27440585ad.2 for ; Mon, 06 Nov 2023 11:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699299274; x=1699904074; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6CuY/tzP4crlPB6JrVuBEpzHHnLiWq6yHkc3djGOhOg=; b=AOk9AjNFBiIRfHJdPGV13tz4Jwp0l4q4lpcdJ9PUxhKuAwTdjAbT3lfylJsHPQMfeR s74dlv22v73K2yROXQFZKnNnQJWmxDHqFXJX05nPB89NLzS8LCohX8EiCIx11syFO6YZ EQ6sjld8HOWRemttRXOZrcOX40b6TF1h3HIiPOYSjiN+IVYp/Hr2HsPySa48AKEa8bvP JgVuA4XJJ9HrLXVx53Ls1RwGWnlNieIRMhPyQW6045GxAQo9aA9CZf07ZRpeZJ07TmEC BVXNS15SyGkQJw4Vec9u0AnxskJHcHAVjRVRUfu0xYyE8PjK6SFjpMlsZhAjlN/19uyX nyuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699299274; x=1699904074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6CuY/tzP4crlPB6JrVuBEpzHHnLiWq6yHkc3djGOhOg=; b=kWegxWvhA6ASfZ9YXgt5ScO+YMhNPeonoA91cAYKRIZT69HoFmgaNog1l2bRxRlLx6 /bCZKggKSWjd7D8dkVmdFC1+TNJgB5owYMJd5s2Hvfc8Wuit4FqM4sENk9Vf8Xwjr+UA uaAMRujYlBEqL4iDg16ZagaHR7wJHDXjJtMyHrCVVbG+1ja/JRbSXTMtAvtFQ/ZmhzuI Zo5ITyTBPQTqCVGm7RgVk16XRqrsyiCwg92ZMCuGIhCZtBlP7+pVFIS4cr4a1NO5hXLQ /Y/GVmxvAbp/a1ayYk7N74H1Caduie8+YtwFp2dvSLJX0atjXRx1NmTxaGZKMkL1LNmU 4ilg== X-Gm-Message-State: AOJu0YwwqvwFVy9naX5MMCkd2dVWt0SqPknnhkIINJQLqoQTW0YnZ7Vi T/fBPzR1s4aMiq4gEsBpjid6Jokhu4YBjV/6Quw= X-Google-Smtp-Source: AGHT+IEHDT+B0pGvvqE0+/Ciu1lHxeAKafBrPTHXt2ywDxqw5JUgEvxrDBMvslCZpRp8ERo8oj7tLQ== X-Received: by 2002:a17:902:d512:b0:1cc:4b1b:2759 with SMTP id b18-20020a170902d51200b001cc4b1b2759mr22782263plg.63.1699299273998; Mon, 06 Nov 2023 11:34:33 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id jh7-20020a170903328700b001bb9d6b1baasm6175268plb.198.2023.11.06.11.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 11:34:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v2] dumpcap: fix mbuf pool ring type Date: Mon, 6 Nov 2023 11:34:23 -0800 Message-Id: <20231106193423.12292-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230804161604.61050-1-stephen@networkplumber.org> References: <20230804161604.61050-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The internal buffer pool used for copies of mbufs captured needs to be thread safe. If capturing on multiple interfaces or multiple queues, the same pool will be used (consumers). And if the capture ring gets full, the queues will need to put back the capture buffer which leads to multiple producers. Since this is the same use case as normal drivers and the default pool time can not be overridden on dumpcap command line, it is OK to use the default pool type. Bugzilla ID: 1271 Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application") Signed-off-by: Stephen Hemminger --- v2 - reword commit message app/dumpcap/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c index 64294bbfb3e6..991174e95022 100644 --- a/app/dumpcap/main.c +++ b/app/dumpcap/main.c @@ -691,10 +691,9 @@ static struct rte_mempool *create_mempool(void) data_size = mbuf_size; } - mp = rte_pktmbuf_pool_create_by_ops(pool_name, num_mbufs, - MBUF_POOL_CACHE_SIZE, 0, - data_size, - rte_socket_id(), "ring_mp_sc"); + mp = rte_pktmbuf_pool_create(pool_name, num_mbufs, + MBUF_POOL_CACHE_SIZE, 0, + data_size, rte_socket_id()); if (mp == NULL) rte_exit(EXIT_FAILURE, "Mempool (%s) creation failed: %s\n", pool_name, -- 2.39.2