Hi Abhnandan, > > > > In case an event from a previous stage is required to be forwarded to a > > crypto adapter and PMD supports internal event port in crypto adapter, > > exposed via capability > > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD, we do not > > have a way to check in the API rte_event_enqueue_burst(), whether it is for > > crypto adapter or for eth tx adapter. > I may be missing something here. Crypto adapter is an atomic stage has a > port which is setup during the adapter configuration. > So, application enqueuing events will end up sending to the crypto adapter > (As the adapter dequeues from a specific port). > Still wondering why there is requirement for new API.
While we do rte_event_enqueue_burst(), we do not have a way to identify whether The event is for crypto adapter or the eth adaptor. At the application layer, we know where to send the event, but in the event lib We do not know which port it need to be sent. IMO, event port is specifically designed to work for OP_NEW mode. I did not find a way to make it land into crypto adapter. Please let me know in case there is a better option other than adding a new API. > > > > > Hence we need a new API similar to rte_event_eth_tx_adapter_enqueue(), > > which can send to a crypto adapter. > > > > Note that RTE_EVENT_TYPE_* cannot be used to make that decision, as it is > > meant for event source and not event destination. > > And event port designated for crypto adapter is designed to be used for > > OP_NEW mode. > > > > Hence, in order to support an event PMD which has an internal event port > in > > crypto adapter (RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD mode), > > exposed via capability > > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD, > > application should use rte_event_crypto_adapter_enqueue() API to > > enqueue events. > > > > When internal port is not > available(RTE_EVENT_CRYPTO_ADAPTER_OP_NEW > > mode), application can use API rte_event_enqueue_burst() as it was doing > > earlier, i.e. retrieve event port used by crypto adapter and bind its event > > queues to that port and enqueue events using the API > > rte_event_enqueue_burst(). > > > > Signed-off-by: Akhil Goyal <gak...@marvell.com>