* [dpdk-stable] [PATCH] app/testbbdev: fix inputs mbuf creation issue
@ 2018-08-17 7:19 Kamil Chalupnik
2018-08-17 9:39 ` [dpdk-stable] [dpdk-dev] " Peng, Yuan
2018-08-23 13:54 ` Akhil Goyal
0 siblings, 2 replies; 4+ messages in thread
From: Kamil Chalupnik @ 2018-08-17 7:19 UTC (permalink / raw)
To: amr.mokhtar, pablo.de.lara.guarch; +Cc: dev, stable, Kamil Chalupnik
Omitting inputs and outputs mbuf creation for BaseBand Null Device
as inputs and outputs data do not exist for Null Device
Fixes: b2a4654f082b ("mempool: check for zero size creation")
Cc: pablo.de.lara.guarch@intel.com
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 6861edc..fbe6cc9 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -267,12 +267,13 @@ typedef int (test_case_function)(struct active_device *ad,
static int
create_mempools(struct active_device *ad, int socket_id,
- enum rte_bbdev_op_type op_type, uint16_t num_ops)
+ enum rte_bbdev_op_type org_op_type, uint16_t num_ops)
{
struct rte_mempool *mp;
unsigned int ops_pool_size, mbuf_pool_size = 0;
char pool_name[RTE_MEMPOOL_NAMESIZE];
const char *op_type_str;
+ enum rte_bbdev_op_type op_type = org_op_type;
struct op_data_entries *in = &test_vector.entries[DATA_INPUT];
struct op_data_entries *hard_out =
@@ -289,6 +290,9 @@ typedef int (test_case_function)(struct active_device *ad,
OPS_CACHE_SIZE + 1)),
OPS_POOL_SIZE_MIN));
+ if (org_op_type == RTE_BBDEV_OP_NONE)
+ op_type = RTE_BBDEV_OP_TURBO_ENC;
+
op_type_str = rte_bbdev_op_type_str(op_type);
TEST_ASSERT_NOT_NULL(op_type_str, "Invalid op type: %u", op_type);
@@ -303,6 +307,10 @@ typedef int (test_case_function)(struct active_device *ad,
socket_id);
ad->ops_mempool = mp;
+ /* Do not create inputs and outputs mbufs for BaseBand Null Device */
+ if (org_op_type == RTE_BBDEV_OP_NONE)
+ return TEST_SUCCESS;
+
/* Inputs */
mbuf_pool_size = optimal_mempool_size(ops_pool_size * in->nb_segments);
mp = create_mbuf_pool(in, ad->dev_id, socket_id, mbuf_pool_size, "in");
@@ -1058,14 +1066,14 @@ typedef int (test_case_function)(struct active_device *ad,
rte_bbdev_info_get(ad->dev_id, &info);
socket_id = GET_SOCKET(info.socket_id);
- if (op_type == RTE_BBDEV_OP_NONE)
- op_type = RTE_BBDEV_OP_TURBO_ENC;
f_ret = create_mempools(ad, socket_id, op_type,
get_num_ops());
if (f_ret != TEST_SUCCESS) {
printf("Couldn't create mempools");
goto fail;
}
+ if (op_type == RTE_BBDEV_OP_NONE)
+ op_type = RTE_BBDEV_OP_TURBO_ENC;
f_ret = init_test_op_params(op_params, test_vector.op_type,
test_vector.expected_status,
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue
2018-08-17 7:19 [dpdk-stable] [PATCH] app/testbbdev: fix inputs mbuf creation issue Kamil Chalupnik
@ 2018-08-17 9:39 ` Peng, Yuan
2018-08-17 10:34 ` Mokhtar, Amr
2018-08-23 13:54 ` Akhil Goyal
1 sibling, 1 reply; 4+ messages in thread
From: Peng, Yuan @ 2018-08-17 9:39 UTC (permalink / raw)
To: Chalupnik, KamilX, Mokhtar, Amr, De Lara Guarch, Pablo
Cc: dev, stable, Chalupnik, KamilX, Peng, Yuan
Tested-by: Peng, Yuan <yuan.peng@intel.com>
> NIC Fortville 4*10G
> ethtool -i ens785f1
> driver: i40e
> version: 2.4.10
> firmware-version: 6.01 0x80003205 1.1691.0 DPDK version: 18.11-rc0
> commit 76b9d9de5c7d747c381027156aac07735cb1bc0c
> FlexRAN-1.6.0
> Os: 4.4.0-62-generic
> ICC:parallel_studio_xe_2018_update1_professional_edition_for_cpp
> Set ``CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y``
> cat /proc/cmdline
> BOOT_IMAGE=/boot/vmlinuz-4.4.0-62-generic root=UUID=673a4478-afa5-
> 463a-afa2-40681423994e ro hugepagesz=1G hugepages=16
> default_hugepagesz=1G isolcpus=1-43 intel_iommu=on nohz_full=1-43
> rcu_nocbs=1-43 iommu=pt
>
> ./usertools/dpdk-devbind.py -b vfio-pci 05:00.0 05:00.1
> ./app/test-bbdev/test-bbdev.py -e="--
> vdev=baseband_null,socket_id=0,max_nb_queues=8"
>
> the case can passed.
>
> Thanks.
> Yuan.
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kamil Chalupnik
Sent: Friday, August 17, 2018 3:19 PM
To: Mokhtar, Amr <amr.mokhtar@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
Cc: dev@dpdk.org; stable@dpdk.org; Chalupnik, KamilX <kamilx.chalupnik@intel.com>
Subject: [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue
Omitting inputs and outputs mbuf creation for BaseBand Null Device as inputs and outputs data do not exist for Null Device
Fixes: b2a4654f082b ("mempool: check for zero size creation")
Cc: pablo.de.lara.guarch@intel.com
Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
---
app/test-bbdev/test_bbdev_perf.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 6861edc..fbe6cc9 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -267,12 +267,13 @@ typedef int (test_case_function)(struct active_device *ad,
static int
create_mempools(struct active_device *ad, int socket_id,
- enum rte_bbdev_op_type op_type, uint16_t num_ops)
+ enum rte_bbdev_op_type org_op_type, uint16_t num_ops)
{
struct rte_mempool *mp;
unsigned int ops_pool_size, mbuf_pool_size = 0;
char pool_name[RTE_MEMPOOL_NAMESIZE];
const char *op_type_str;
+ enum rte_bbdev_op_type op_type = org_op_type;
struct op_data_entries *in = &test_vector.entries[DATA_INPUT];
struct op_data_entries *hard_out =
@@ -289,6 +290,9 @@ typedef int (test_case_function)(struct active_device *ad,
OPS_CACHE_SIZE + 1)),
OPS_POOL_SIZE_MIN));
+ if (org_op_type == RTE_BBDEV_OP_NONE)
+ op_type = RTE_BBDEV_OP_TURBO_ENC;
+
op_type_str = rte_bbdev_op_type_str(op_type);
TEST_ASSERT_NOT_NULL(op_type_str, "Invalid op type: %u", op_type);
@@ -303,6 +307,10 @@ typedef int (test_case_function)(struct active_device *ad,
socket_id);
ad->ops_mempool = mp;
+ /* Do not create inputs and outputs mbufs for BaseBand Null Device */
+ if (org_op_type == RTE_BBDEV_OP_NONE)
+ return TEST_SUCCESS;
+
/* Inputs */
mbuf_pool_size = optimal_mempool_size(ops_pool_size * in->nb_segments);
mp = create_mbuf_pool(in, ad->dev_id, socket_id, mbuf_pool_size, "in"); @@ -1058,14 +1066,14 @@ typedef int (test_case_function)(struct active_device *ad,
rte_bbdev_info_get(ad->dev_id, &info);
socket_id = GET_SOCKET(info.socket_id);
- if (op_type == RTE_BBDEV_OP_NONE)
- op_type = RTE_BBDEV_OP_TURBO_ENC;
f_ret = create_mempools(ad, socket_id, op_type,
get_num_ops());
if (f_ret != TEST_SUCCESS) {
printf("Couldn't create mempools");
goto fail;
}
+ if (op_type == RTE_BBDEV_OP_NONE)
+ op_type = RTE_BBDEV_OP_TURBO_ENC;
f_ret = init_test_op_params(op_params, test_vector.op_type,
test_vector.expected_status,
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue
2018-08-17 9:39 ` [dpdk-stable] [dpdk-dev] " Peng, Yuan
@ 2018-08-17 10:34 ` Mokhtar, Amr
0 siblings, 0 replies; 4+ messages in thread
From: Mokhtar, Amr @ 2018-08-17 10:34 UTC (permalink / raw)
To: Peng, Yuan, Chalupnik, KamilX, De Lara Guarch, Pablo
Cc: dev, stable, Chalupnik, KamilX
> -----Original Message-----
> From: Peng, Yuan
> Sent: Friday 17 August 2018 10:39
> To: Chalupnik, KamilX <kamilx.chalupnik@intel.com>; Mokhtar, Amr
> <amr.mokhtar@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>; Peng, Yuan <yuan.peng@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation
> issue
>
> Tested-by: Peng, Yuan <yuan.peng@intel.com>
>
> > NIC Fortville 4*10G
> > ethtool -i ens785f1
> > driver: i40e
> > version: 2.4.10
> > firmware-version: 6.01 0x80003205 1.1691.0 DPDK version: 18.11-rc0
> > commit 76b9d9de5c7d747c381027156aac07735cb1bc0c
> > FlexRAN-1.6.0
> > Os: 4.4.0-62-generic
> > ICC:parallel_studio_xe_2018_update1_professional_edition_for_cpp
> > Set ``CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y``
> > cat /proc/cmdline
> > BOOT_IMAGE=/boot/vmlinuz-4.4.0-62-generic root=UUID=673a4478-
> afa5-
> > 463a-afa2-40681423994e ro hugepagesz=1G hugepages=16
> > default_hugepagesz=1G isolcpus=1-43 intel_iommu=on nohz_full=1-43
> > rcu_nocbs=1-43 iommu=pt
> >
> > ./usertools/dpdk-devbind.py -b vfio-pci 05:00.0 05:00.1
> > ./app/test-bbdev/test-bbdev.py -e="--
> > vdev=baseband_null,socket_id=0,max_nb_queues=8"
> >
> > the case can passed.
> >
> > Thanks.
> > Yuan.
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kamil Chalupnik
> Sent: Friday, August 17, 2018 3:19 PM
> To: Mokhtar, Amr <amr.mokhtar@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>
> Subject: [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue
>
> Omitting inputs and outputs mbuf creation for BaseBand Null Device as
> inputs and outputs data do not exist for Null Device
>
> Fixes: b2a4654f082b ("mempool: check for zero size creation")
> Cc: pablo.de.lara.guarch@intel.com
>
> Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue
2018-08-17 7:19 [dpdk-stable] [PATCH] app/testbbdev: fix inputs mbuf creation issue Kamil Chalupnik
2018-08-17 9:39 ` [dpdk-stable] [dpdk-dev] " Peng, Yuan
@ 2018-08-23 13:54 ` Akhil Goyal
1 sibling, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2018-08-23 13:54 UTC (permalink / raw)
To: Kamil Chalupnik, amr.mokhtar, pablo.de.lara.guarch; +Cc: dev, stable
On 8/17/2018 12:49 PM, Kamil Chalupnik wrote:
> Omitting inputs and outputs mbuf creation for BaseBand Null Device
> as inputs and outputs data do not exist for Null Device
>
> Fixes: b2a4654f082b ("mempool: check for zero size creation")
> Cc: pablo.de.lara.guarch@intel.com
>
> Signed-off-by: Kamil Chalupnik <kamilx.chalupnik@intel.com>
> ---
> app/test-bbdev/test_bbdev_perf.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
>
Applied to dpdk-next-crypto
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-23 13:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-17 7:19 [dpdk-stable] [PATCH] app/testbbdev: fix inputs mbuf creation issue Kamil Chalupnik
2018-08-17 9:39 ` [dpdk-stable] [dpdk-dev] " Peng, Yuan
2018-08-17 10:34 ` Mokhtar, Amr
2018-08-23 13:54 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).