On 2/17/2023 3:03 PM, Andrew Rybchenko wrote:
> On 2/17/23 16:41, Jiawei(Jonny) Wang wrote:
>> Hi Andrew,
>>
>>> -----Original Message-----
>>> From: Andrew Rybchenko <[email protected]>
>>> Sent: Friday, February 17, 2023 8:57 PM
>>> To: Jiawei(Jonny) Wang <[email protected]>; Slava Ovsiienko
>>> <[email protected]>; Ori Kam <[email protected]>; NBU-Contact-
>>> Thomas Monjalon (EXTERNAL) <[email protected]>;
>>> [email protected]; Aman Singh <[email protected]>; Yuying
>>> Zhang <[email protected]>
>>> Cc: [email protected]; Raslan Darawsheh <[email protected]>
>>> Subject: Re: [PATCH v6 1/2] ethdev: add Tx queue mapping of
>>> aggregated ports
>>>
>> [snip]
>>>> --- a/lib/ethdev/rte_ethdev.c
>>>> +++ b/lib/ethdev/rte_ethdev.c
>>>> @@ -6946,6 +6946,78 @@
>>> rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t
>>> *ptypes
>>>>        return j;
>>>>    }
>>>>
>>>> +int rte_eth_dev_count_aggr_ports(uint16_t port_id) {
>>>> +    struct rte_eth_dev *dev;
>>>> +    int ret;
>>>> +
>>>> +    RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
>>>> +    dev = &rte_eth_devices[port_id];
>>>> +
>>>> +    if (*dev->dev_ops->count_aggr_ports == NULL)
>>>
>>> Is it OK that tracing is long in this case?
>>>
>>
>> Do you mean that we don't need tracing in this case?
> 
> Sorry for typo. I'm asking if it is OK that tracing is *lost* in this case.
> 

It is not black & white, but I think it is OK since there is no dev_ops
called.

Adding tracing here can make it unnecessary complex and for many cases
tracing is limited only to success path.

>>
>>>> +        return 0;
>>>> +    ret = eth_err(port_id,
>>>> (*dev->dev_ops->count_aggr_ports)(port_id));
>>>> +
>>>> +    rte_eth_trace_count_aggr_ports(port_id, ret);
>>>> +
>>>> +    return ret;
>>>> +}
>>>> +
>>>
>>> [snip]
>>
> 

Reply via email to