[dpdk-dev] [PATCH v3 12/15] ether: extract function eth_dev_get_intr_handle

Panu Matilainen pmatilai at redhat.com
Fri Sep 16 09:17:28 CEST 2016


On 09/15/2016 05:05 PM, Thomas Monjalon wrote:
> 2016-09-15 14:02, Hunt, David:
>> On 9/9/2016 9:43 AM, Shreyansh Jain wrote:
>>> +static inline
>>> +struct rte_intr_handle *eth_dev_get_intr_handle(struct rte_eth_dev *dev)
>>> +{
>>> +	if (dev->pci_dev) {
>>> +		return &dev->pci_dev->intr_handle;
>>> +	}
>>> +
>>> +	RTE_VERIFY(0);
>>
>> Rather than RTE_VERIFY(0), might I suggest using rte_panic with a more
>> relevant error message?
>
> RTE_ASSERT is preferred.
> We must stop adding some rte_panic calls except for debug.

+1

It wouldn't hurt to make that a hard rule.

	- Panu -




More information about the dev mailing list