From: Jerin Jacob <jerinjacobk@gmail.com>
To: "Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>
Cc: "Naga Harish K, S V" <s.v.naga.harish.k@intel.com>,
"jerinj@marvell.com" <jerinj@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v2] eventdev/eth_rx: fix queue config get logic
Date: Fri, 18 Feb 2022 19:27:17 +0530 [thread overview]
Message-ID: <CALBAE1OEEZHGQkpP7wbsjDhFEYo8X_GjOKW7SvSBNryXec4-fQ@mail.gmail.com> (raw)
In-Reply-To: <DM6PR11MB4348B529F8751E0CBDDCD1C1FD349@DM6PR11MB4348.namprd11.prod.outlook.com>
On Tue, Feb 15, 2022 at 10:24 PM Jayatheerthan, Jay
<jay.jayatheerthan@intel.com> wrote:
>
> Looks good. Thanks!
>
> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Applied to dpdk-next-net-eventdev/for-main. Thanks
> -Jay
>
>
>
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> > Sent: Monday, February 14, 2022 10:40 PM
> > To: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>; jerinj@marvell.com
> > Cc: dev@dpdk.org
> > Subject: [PATCH v2] eventdev/eth_rx: fix queue config get logic
> >
> > remove the memcpy usage in queue config get function for
> > `event` variable which is 8 byte size and use direct copy.
> > Also provide vector information and event buffer size in the
> > queue config info.
> >
> > Fixes: da781e6488 ("eventdev/eth_rx: support Rx queue config get")
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> > ---
> > v2:
> > * remove memcpy usage
> > also provide vector data and event buffer size info
> > ---
> > lib/eventdev/rte_event_eth_rx_adapter.c | 16 +++++++++++++---
> > 1 file changed, 13 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
> > index ae1e260c08..28388d3abb 100644
> > --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> > @@ -3194,11 +3194,11 @@ rte_event_eth_rx_adapter_queue_conf_get(uint8_t id,
> > uint16_t rx_queue_id,
> > struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
> > {
> > +#define TICK2NSEC(_ticks, _freq) (((_ticks) * (1E9)) / (_freq))
> > struct rte_eventdev *dev;
> > struct event_eth_rx_adapter *rx_adapter;
> > struct eth_device_info *dev_info;
> > struct eth_rx_queue_info *queue_info;
> > - struct rte_event *qi_ev;
> > int ret;
> >
> > if (rxa_memzone_lookup())
> > @@ -3229,7 +3229,6 @@ rte_event_eth_rx_adapter_queue_conf_get(uint8_t id,
> > }
> >
> > queue_info = &dev_info->rx_queue[rx_queue_id];
> > - qi_ev = (struct rte_event *)&queue_info->event;
> >
> > memset(queue_conf, 0, sizeof(*queue_conf));
> > queue_conf->rx_queue_flags = 0;
> > @@ -3238,7 +3237,18 @@ rte_event_eth_rx_adapter_queue_conf_get(uint8_t id,
> > RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID;
> > queue_conf->servicing_weight = queue_info->wt;
> >
> > - memcpy(&queue_conf->ev, qi_ev, sizeof(*qi_ev));
> > + queue_conf->ev.event = queue_info->event;
> > +
> > + queue_conf->vector_sz = queue_info->vector_data.max_vector_count;
> > + queue_conf->vector_mp = queue_info->vector_data.vector_pool;
> > + /* need to be converted from ticks to ns */
> > + queue_conf->vector_timeout_ns = TICK2NSEC(
> > + queue_info->vector_data.vector_timeout_ticks, rte_get_timer_hz());
> > +
> > + if (queue_info->event_buf != NULL)
> > + queue_conf->event_buf_size = queue_info->event_buf->events_size;
> > + else
> > + queue_conf->event_buf_size = 0;
> >
> > dev = &rte_eventdevs[rx_adapter->eventdev_id];
> > if (dev->dev_ops->eth_rx_adapter_queue_conf_get != NULL) {
> > --
> > 2.23.0
>
prev parent reply other threads:[~2022-02-18 13:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 5:09 [PATCH] eventdev/eth_rx: fix queue config get API Naga Harish K S V
2022-02-14 15:28 ` Jerin Jacob
2022-02-14 17:09 ` Jayatheerthan, Jay
2022-02-14 17:13 ` Naga Harish K, S V
2022-02-14 17:10 ` [PATCH v2] eventdev/eth_rx: fix queue config get logic Naga Harish K S V
2022-02-15 16:54 ` Jayatheerthan, Jay
2022-02-18 13:57 ` Jerin Jacob [this message]
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=CALBAE1OEEZHGQkpP7wbsjDhFEYo8X_GjOKW7SvSBNryXec4-fQ@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=jay.jayatheerthan@intel.com \
--cc=jerinj@marvell.com \
--cc=s.v.naga.harish.k@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
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).