From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com,
anoob.joseph@caviumnetworks.com
Cc: dev@dpdk.org, "Rao, Nikhil" <nikhil.rao@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples/eventdev_pipeline: add Tx adapter support
Date: Thu, 20 Sep 2018 07:48:45 +0530 [thread overview]
Message-ID: <01beb974-608a-a059-ab44-304d7651ec1a@intel.com> (raw)
In-Reply-To: <20180919104116.GA17244@ltp-pvn>
On 9/19/2018 4:12 PM, Pavan Nikhilesh wrote:
> On Wed, Sep 19, 2018 at 08:24:01AM +0530, Rao, Nikhil wrote:
>> On 9/5/2018 7:15 PM, Pavan Nikhilesh wrote:
>>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
>>> ---
>>> This patch depends on the following series:
>>> http://patches.dpdk.org/project/dpdk/list/?series=1121
>>>
>>> examples/eventdev_pipeline/main.c | 62 ++--
>>> examples/eventdev_pipeline/pipeline_common.h | 31 +-
>>> .../pipeline_worker_generic.c | 273 +++++-------------
>>> .../eventdev_pipeline/pipeline_worker_tx.c | 130 +++++----
>>> 4 files changed, 186 insertions(+), 310 deletions(-)
>>>
>>> diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
>>> index 700bc696f..95531150b 100644
>>> --- a/examples/eventdev_pipeline/main.c
>>> +++ b/examples/eventdev_pipeline/main.c
>>>
>>>
>> </snip>
>>
>>> static void
>>> do_capability_setup(uint8_t eventdev_id)
>>> {
>>> + int ret;
>>> uint16_t i;
>>> - uint8_t mt_unsafe = 0;
>>> + uint8_t generic_pipeline = 0;
>>> uint8_t burst = 0;
>>>
>>> RTE_ETH_FOREACH_DEV(i) {
>>> - struct rte_eth_dev_info dev_info;
>>> - memset(&dev_info, 0, sizeof(struct rte_eth_dev_info));
>>> -
>>> - rte_eth_dev_info_get(i, &dev_info);
>>> - /* Check if it is safe ask worker to tx. */
>>> - mt_unsafe |= !(dev_info.tx_offload_capa &
>>> - DEV_TX_OFFLOAD_MT_LOCKFREE);
>>> + uint32_t caps = 0;
>>> +
>>> + ret = rte_event_eth_tx_adapter_caps_get(eventdev_id, i, &caps);
>>> + if (ret)
>>> + rte_exit(EXIT_FAILURE,
>>> + "Invalid capability for Tx adptr port %d\n", i);
>>> + generic_pipeline |= !(caps &
>>> + RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT);
>>> }
>>>
>>> struct rte_event_dev_info eventdev_info;
>>> @@ -406,10 +386,10 @@ do_capability_setup(uint8_t eventdev_id)
>>> burst = eventdev_info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE ? 1 :
>>> 0;
>>>
>>> - if (mt_unsafe)
>>> + if (generic_pipeline)
>>> set_worker_generic_setup_data(&fdata->cap, burst);
>>> else
>>> - set_worker_tx_setup_data(&fdata->cap, burst);
>>> + set_worker_tx_enq_setup_data(&fdata->cap, burst);
>>> }
>>
>> The generic_pipeline flag is set here and therefore, aren't the
>> subsequent checks in generic_opt_check() and worker_tx_enq_opt_check()
>> redundant ?
>
> The checks inside generic_opt_check, worker_tx_enq_opt_check are still required
> as different eventdevs opdl, DSW, dpaa, sw, octeontx might have different
> capabilities.
I should have mentioned in the previous reply, the checks was I
referring to were the checks for the
RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT flag.
Also, on second reading, I noticed these checks had
RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT not
RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT.
Thanks,
Nikhil
next prev parent reply other threads:[~2018-09-20 2:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 13:45 Pavan Nikhilesh
2018-09-17 14:17 ` Jerin Jacob
2018-09-19 2:54 ` Rao, Nikhil
2018-09-19 10:42 ` Pavan Nikhilesh
2018-09-20 2:18 ` Rao, Nikhil [this message]
2018-09-21 7:44 ` Rao, Nikhil
2018-09-24 9:51 ` Pavan Nikhilesh
2018-09-24 10:12 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh
2018-09-26 12:56 ` Rao, Nikhil
2018-09-28 11:15 ` Jerin Jacob
2018-10-03 8:47 ` Rao, Nikhil
Reply instructions:
You may reply publicly 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=01beb974-608a-a059-ab44-304d7651ec1a@intel.com \
--to=nikhil.rao@intel.com \
--cc=anoob.joseph@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=pbhagavatula@caviumnetworks.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).