DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: Sunil Kumar Kori <skori@marvell.com>
To: <thomas@monjalon.net>, <ferruh.yigit@intel.com>,
	<arybchenko@solarflare.com>, <wenzhuo.lu@intel.com>,
	<jingjing.wu@intel.com>, <bernard.iremonger@intel.com>
Cc: <dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>
Subject: [dpdk-dev] [PATCH 1/2] lib/librte_ethdev: add in default value of rte_eth_dev_info
Date: Mon, 27 May 2019 14:05:28 +0530
Message-ID: <1558946129-5816-2-git-send-email-skori@marvell.com> (raw)
In-Reply-To: <1558946129-5816-1-git-send-email-skori@marvell.com>

rte_eth_dev_info structure exposes, nb_seg_max & nb_mtu_seg_max
to provide maximum number of supported segments for a given platform.

Defining UINT16_MAX as default value of above mentioned variables to
expose support of infinite/maximum segments.

Based on above values, application can decide best size for buffers
while creating mbuf pool.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 lib/librte_ethdev/rte_ethdev.c | 2 ++
 lib/librte_ethdev/rte_ethdev.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index d7cfa3d..6933757 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2543,6 +2543,8 @@ struct rte_eth_dev *
 		.nb_max = UINT16_MAX,
 		.nb_min = 0,
 		.nb_align = 1,
+		.nb_seg_max = UINT16_MAX,
+		.nb_mtu_seg_max = UINT16_MAX,
 	};
 
 	RTE_ETH_VALID_PORTID_OR_RET(port_id);
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 1f35e1d..6bd30b1 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2333,6 +2333,8 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
  *      .nb_max = UINT16_MAX,
  *      .nb_min = 0,
  *      .nb_align = 1,
+ *	.nb_seg_max = UINT16_MAX,
+ *	.nb_mtu_seg_max = UINT16_MAX,
  *  };
  *
  * device = dev->device
-- 
1.8.3.1


  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  8:35 [dpdk-dev] [PATCH 0/2] Enabling default mbuf segments support Sunil Kumar Kori
2019-05-27  8:35 ` Sunil Kumar Kori [this message]
2019-06-09 14:33   ` [dpdk-dev] [PATCH 1/2] lib/librte_ethdev: add in default value of rte_eth_dev_info Andrew Rybchenko
2019-06-10 17:35     ` Ferruh Yigit
2019-06-14  5:31   ` Mo, YufengX
2019-06-14 16:51     ` Ferruh Yigit
2019-06-14 17:21       ` Ferruh Yigit
2019-06-17  1:38         ` Mo, YufengX
2019-05-27  8:35 ` [dpdk-dev] [PATCH 2/2] app/testpmd: creating mbuf pool based on maximum supported segments Sunil Kumar Kori
2019-06-10 17:45   ` Ferruh Yigit

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558946129-5816-2-git-send-email-skori@marvell.com \
    --to=skori@marvell.com \
    --cc=arybchenko@solarflare.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox