Skip to content

Commit 33da486

Browse files
PavanNikhileshJerin Jacob
authored andcommitted
event/cnxk: add CN20K event port profile switch
Add CN20K event port profile switch. Signed-off-by: Pavan Nikhilesh <[email protected]>
1 parent 638fe88 commit 33da486

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

drivers/event/cnxk/cn20k_eventdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ cn20k_sso_fp_fns_set(struct rte_eventdev *event_dev)
124124
if (dev->deq_tmo_ns)
125125
event_dev->dequeue_burst = cn20k_sso_hws_tmo_deq_burst;
126126

127+
event_dev->profile_switch = cn20k_sso_hws_profile_switch;
127128
#else
128129
RTE_SET_USED(event_dev);
129130
#endif

drivers/event/cnxk/cn20k_worker.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,17 @@ cn20k_sso_hws_enq_fwd_burst(void *port, const struct rte_event ev[], uint16_t nb
383383
return 1;
384384
}
385385

386+
int __rte_hot
387+
cn20k_sso_hws_profile_switch(void *port, uint8_t profile)
388+
{
389+
struct cn20k_sso_hws *ws = port;
390+
391+
ws->gw_wdata &= ~(0xFFUL);
392+
ws->gw_wdata |= (profile + 1);
393+
394+
return 0;
395+
}
396+
386397
uint16_t __rte_hot
387398
cn20k_sso_hws_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks)
388399
{

drivers/event/cnxk/cn20k_worker.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ uint16_t __rte_hot cn20k_sso_hws_enq_new_burst(void *port, const struct rte_even
145145
uint16_t nb_events);
146146
uint16_t __rte_hot cn20k_sso_hws_enq_fwd_burst(void *port, const struct rte_event ev[],
147147
uint16_t nb_events);
148+
int __rte_hot cn20k_sso_hws_profile_switch(void *port, uint8_t profile);
148149

149150
uint16_t __rte_hot cn20k_sso_hws_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks);
150151
uint16_t __rte_hot cn20k_sso_hws_deq_burst(void *port, struct rte_event ev[], uint16_t nb_events,

0 commit comments

Comments
 (0)