[dpdk-dev] [PATCH v2 2/4] eventdev: add caps API and PMD callbacks for eth Tx adapter

Rao, Nikhil nikhil.rao at intel.com
Wed Aug 22 15:34:55 CEST 2018


On 8/21/2018 2:41 PM, Jerin Jacob wrote:
> -----Original Message-----
>> Date: Tue, 21 Aug 2018 14:22:15 +0530
>> From: "Rao, Nikhil" <nikhil.rao at intel.com>
>> To: Jerin Jacob <jerin.jacob at caviumnetworks.com>
>> CC: olivier.matz at 6wind.com, dev at dpdk.org, nikhil.rao at intel.com
>> Subject: Re: [PATCH v2 2/4] eventdev: add caps API and PMD callbacks for
>>   eth Tx adapter
>> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
>>   Thunderbird/60.0
>>
>> External Email
>>
>> On 8/19/2018 4:15 PM, Jerin Jacob wrote:
>>> -----Original Message-----
>>>> Date: Fri, 17 Aug 2018 09:50:50 +0530
>>>> From: Nikhil Rao <nikhil.rao at intel.com>
>>>> To: jerin.jacob at caviumnetworks.com, olivier.matz at 6wind.com
>>>> CC: dev at dpdk.org, Nikhil Rao <nikhil.rao at intel.com>
>>>> Subject: [PATCH v2 2/4] eventdev: add caps API and PMD callbacks for eth Tx
>>>>    adapter
>>>> X-Mailer: git-send-email 1.8.3.1
>>>>
>>>>
>>>> The caps API allows the application to query if the transmit
>>>> stage is implemented in the eventdev PMD or uses the common
>>>> rte_service function. The PMD callbacks support the
>>>> eventdev PMD implementation of the adapter.
>>>>
>>>> Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>
>>>> ---
>>>> +
>>>>    static inline int
>>>>    rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues)
>>>>    {
>>>> @@ -1275,6 +1300,15 @@ int rte_event_dev_selftest(uint8_t dev_id)
>>>>           return RTE_EVENT_MAX_DEVS;
>>>>    }
>>>>
>>>> @@ -1295,6 +1329,9 @@ struct rte_eventdev *
>>>>
>>>>           eventdev = &rte_eventdevs[dev_id];
>>>>
>>>> +       if (eventdev->txa_enqueue == NULL)
>>>
>>> Is this check required, it will be always NULL. Right? if so,
>>> Can't we write eventdev->txa_enqueue directly?
>>>
>>>> +               eventdev->txa_enqueue = rte_event_tx_adapter_enqueue;
>>>> +
>>>
>>
>> The thought was that if the PMD supports txa_enqueue then it wouldn't be
>> NULL.
> 
> 
> Yes that's true. But in rte_event_pmd_allocate(), eventdev->txa_enqueue
> it will be NULL. Right? Do we need to add the if (eventdev->txa_enqueue == NULL) check?

OK, got it.

Nikhil



More information about the dev mailing list