Looks good. Thanks! Acked-by: Jay Jayatheerthan <jay.jayatheert...@intel.com>
-Jay > -----Original Message----- > From: Naga Harish K, S V <s.v.naga.haris...@intel.com> > Sent: Monday, February 14, 2022 10:40 PM > To: Jayatheerthan, Jay <jay.jayatheert...@intel.com>; jer...@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.haris...@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