From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D4F42A0524; Tue, 25 Feb 2020 00:11:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C90EC1BE85; Tue, 25 Feb 2020 00:11:38 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 2C0FA2C39 for ; Tue, 25 Feb 2020 00:11:36 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id 2so6117298pfg.12 for ; Mon, 24 Feb 2020 15:11:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PQlbfNcexSAMqRVMxtDKfMnmJy0pZ9cMNKws4GqrO0I=; b=dhXDDwPui+6j+iSjnyFhCy1nS+47RBEnm/Jz7tFS01MFX6FawFZN/uD7TBfM/4ueo0 ht6yFAchofDVM+G1LjVpuVO03i3V5wteIH9TWAGWNxwHcRvgYjYbntk6sBuUXkrgmVab i0FqPTuTlJR+b4XalDRh3Hme9sJhmUB8Zo6vq4bOj54AeCeN6ZHW4HqTo2TbTexOKrYM ITDnjUWLSanuZDa1lqGGOQT6avivehfhWxLRZYbD+CVucAO9Lx9uEe/DWv8v3h6GtTes 98w9nccnceqXAfI5iO5JaWMEFfM9Uc/3KE7/siaAQmbrvlM9rQnrQpgWe8Ae3pV7yg6L CSSw== 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:mime-version :content-transfer-encoding; bh=PQlbfNcexSAMqRVMxtDKfMnmJy0pZ9cMNKws4GqrO0I=; b=l4ToVRqcQo6GK7LC4FyUYZsWKFk08u/yNkt8U5MGgGltN5wQGoh4ACq8szWN20IkLA Nedzrd6DoPDbuJjKRc7a4fLE9CRixb8QdGx+vgkBuDnjhG8BmpDzLPB6N1hO7be+GTwt gyDr5BA86Fmtna4dxuwdqmUeogNDY71WM8si6nMIrmWD8eWaPXY0ycS9o6UrZLxaH1MN 7CEcw+eV4v+4KREl0QRK8PsENd3aP1ChXuZzs2kDjrdpQNfw4LF9/zoxfEsqw47Cyyos J1CQWbDtLVNVcYoYrMisu5pGqjskyNzpjIorjGorTNe19R6c3JUUMVJ9VUhEvT8IvMUm m5wA== X-Gm-Message-State: APjAAAW0qgiclZ+vYSsqSflEnmDJBYLU3BVE3dGXRLHdv9FOHVTM6P29 zUl0JsiGVoMrN+OwgdJN/hMr4tcwEl8= X-Google-Smtp-Source: APXvYqwSXIf5ArSrwcKkm8Y9KsJq2HSU/mxRqKx/36kxMTRuvxAev6jPfdSU0ijWZqCB7aCJs5EqVw== X-Received: by 2002:a63:7a1a:: with SMTP id v26mr11208355pgc.152.1582585895497; Mon, 24 Feb 2020 15:11:35 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 64sm13997764pfd.48.2020.02.24.15.11.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 15:11:34 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 24 Feb 2020 15:11:18 -0800 Message-Id: <20200224231117.16354-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] af_packet: allow configuring number of rings 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The maximum number of rings in af_packet is hard coded as 16. The user should be able to configure this as part of DPDK config. Signed-off-by: Stephen Hemminger --- config/common_base | 1 + drivers/net/af_packet/rte_eth_af_packet.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/config/common_base b/config/common_base index 6ea9c63cc36b..dd154a474b57 100644 --- a/config/common_base +++ b/config/common_base @@ -468,6 +468,7 @@ CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n # Compile software PMD backed by AF_PACKET sockets (Linux only) # CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n +CONFIG_RTE_PMD_AF_PACKET_MAX_RINGS=16 # # Compile software PMD backed by AF_XDP sockets (Linux only) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index f5806bf42c46..6e90d231ca4f 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -6,6 +6,7 @@ * All rights reserved. */ +#include #include #include #include @@ -37,7 +38,9 @@ #define DFLT_FRAME_SIZE (1 << 11) #define DFLT_FRAME_COUNT (1 << 9) +#ifndef RTE_PMD_AF_PACKET_MAX_RINGS #define RTE_PMD_AF_PACKET_MAX_RINGS 16 +#endif struct pkt_rx_queue { int sockfd; -- 2.20.1