From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org,
thomas@monjalon.net, harry.van.haaren@intel.com,
hemant.agrawal@nxp.com, nipun.gupta@nxp.com,
narender.vangati@intel.com, erik.g.carrillo@intel.com,
abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com
Subject: Re: [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter
Date: Thu, 5 Oct 2017 13:42:59 +0530 [thread overview]
Message-ID: <840c1f48-1d74-56bc-b295-4c20693f5217@intel.com> (raw)
In-Reply-To: <20171003135248.GA10493@jerin>
On 10/3/2017 7:22 PM, Jerin Jacob wrote:
> -----Original Message-----
>> Date: Sun, 24 Sep 2017 23:46:51 +0530
>> From: "Rao, Nikhil" <nikhil.rao@intel.com>
>> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>> CC: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org,
>> thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com,
>> nipun.gupta@nxp.com, narender.vangati@intel.com,
>> erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com,
>> santosh.shukla@caviumnetworks.com
>> Subject: Re: [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter
>> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
>> Thunderbird/52.3.0
>>
>>
>> OK, Thanks for the detailed review. Will add the programmer guide to RC1.
>
> OK. Thanks.
>
>>
>>>
>>>
>>>
>> Yes, if create() and queue_add() are called from different processes, it
>> wouldn't work.
>>
>>>> +
>>>> +static uint8_t default_rss_key[] = {
>>>> + 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
>>>> + 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0,
>>>> + 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4,
>>>> + 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
>>>> + 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa,
>>>> +};
>>>
>>> Looks like the scope of this array is only for rte_event_eth_rx_adapter_init,
>>> if so please move it to stack.
>>>
>> OK.
>>
>>>
>>>> +static uint8_t *rss_key_be;
>>>
>>> Can we remove this global variable add it in in adapter memory?
>>>
>>
>> There is currently struct rte_event_eth_rx_adapter
>> **rte_event_eth_rx_adapter that is an array of pointers to the adapters.
>> rss_key_be points to memory after this array.
>>
>> are you thinking of something like:
>>
>> struct {
>> struct rte_event_eth_rx_adapter **rte_event_eth_rx_adapter
>> uint8_t *rss_key_be;
>> } global;
>
> I was thinking, to hold 40B in struct rte_event_eth_rx_adapter for
> rss_key_be and initialize per rx_adapter to avoid global variable
> as fill_event_buffer() has access to rte_event_eth_rx_adapter.
>
> Something like below as rough idea.
> ➜ [dpdk-next-eventdev] $ git diff
> lib/librte_eventdev/rte_event_eth_rx_adapter.c
> diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> index cd19e7c28..ba6148931 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> @@ -37,6 +37,7 @@ struct rte_eth_event_enqueue_buffer {
> };
>
> struct rte_event_eth_rx_adapter {
> + uint8_t rss_key[40];
> /* event device identifier */
> uint8_t eventdev_id;
> /* per ethernet device structure */
OK.
>>>> +
>>>> +static int
>>>> +default_conf_cb(uint8_t id, uint8_t dev_id,
>>>> + struct rte_event_eth_rx_adapter_conf *conf, void *arg)
>>>> +{
>>>> +
>>>> + ret = rte_event_port_setup(dev_id, port_id, port_conf);
>>>> + if (ret) {
>>>> + RTE_EDEV_LOG_ERR("failed to setup event port %u\n",
>>>> + port_id);
>>>
>>> return or add goto to exit from here to avoid calling rte_event_dev_start below
>>>
>> Could do the return but I wanted to leave the device in the same state as it
>> was at entry into this function. Thoughts ?
>
> Will calling rte_event_dev_start() down(in case if wont return) change
> the state? if not, it is fine.
>
OK, will put in the return. if the device were configured with an
additional port and the setup for this port fails. The
rte_event_dev_start() call will dereference a NULL ptr.
Nikhil
> No another comments. Looks good to me.
>
>
next prev parent reply other threads:[~2017-10-05 8:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 21:17 [dpdk-dev] [PATCH v4 0/4] eventdev: cover letter: ethernet Rx queue event adapter Nikhil Rao
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 1/4] eventdev: Add caps API and PMD callbacks for rte_event_eth_rx_adapter Nikhil Rao
2017-09-21 15:46 ` Jerin Jacob
2017-09-24 12:14 ` Rao, Nikhil
2017-10-02 8:48 ` Jerin Jacob
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 2/4] eventdev: Add ethernet Rx adapter caps function to eventdev SW PMD Nikhil Rao
2017-09-22 2:49 ` Jerin Jacob
2017-09-22 5:27 ` santosh
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter Nikhil Rao
2017-09-21 15:43 ` Pavan Nikhilesh Bhagavatula
2017-09-23 11:35 ` Rao, Nikhil
2017-10-03 9:09 ` Pavan Nikhilesh Bhagavatula
2017-09-22 6:08 ` santosh
2017-10-02 10:20 ` Rao, Nikhil
2017-09-22 9:10 ` Jerin Jacob
2017-09-24 18:16 ` Rao, Nikhil
2017-09-25 2:59 ` Rao, Nikhil
2017-10-02 10:28 ` Rao, Nikhil
2017-10-02 10:39 ` Jerin Jacob
2017-10-05 8:54 ` Rao, Nikhil
2017-10-03 13:52 ` Jerin Jacob
2017-10-05 8:12 ` Rao, Nikhil [this message]
2017-09-21 21:17 ` [dpdk-dev] [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs Nikhil Rao
2017-09-22 12:12 ` Jerin Jacob
2017-09-24 18:24 ` Rao, Nikhil
2017-10-02 10:31 ` Jerin Jacob
2017-10-04 11:28 ` Rao, Nikhil
2017-10-03 11:36 ` Pavan Nikhilesh Bhagavatula
2017-10-05 5:57 ` Rao, Nikhil
2017-10-05 8:08 ` Pavan Nikhilesh Bhagavatula
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=840c1f48-1d74-56bc-b295-4c20693f5217@intel.com \
--to=nikhil.rao@intel.com \
--cc=abhinandan.gujjar@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=erik.g.carrillo@intel.com \
--cc=gage.eads@intel.com \
--cc=harry.van.haaren@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=narender.vangati@intel.com \
--cc=nipun.gupta@nxp.com \
--cc=santosh.shukla@caviumnetworks.com \
--cc=thomas@monjalon.net \
/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).