[dpdk-dev] [PATCH v3 1/2] librte_ether: add internal callback functions
Iremonger, Bernard
bernard.iremonger at intel.com
Mon Oct 3 17:29:59 CEST 2016
Hi Stephen,
From: Stephen Hemminger [mailto:stephen at networkplumber.org]
Sent: Sunday, October 2, 2016 10:13 AM
To: Iremonger, Bernard <bernard.iremonger at intel.com>
Cc: dev at dpdk.org; Lu, Wenzhuo <wenzhuo.lu at intel.com>; jerin.jacob at caviumnetworks.com; az5157 at att.com; Shah, Rahul R <rahul.r.shah at intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 1/2] librte_ether: add internal callback functions
I know callbacks are needed, in fact even more are necessary. That is why I don't like this design. It expands the API for each event. I think something like the Linux kernel netlink callback mechanism that passes an event and device handle.
The current rte_eth_dev_callback_register() function takes a parameter void *cb_arg. This allows the passing of a parameter to the callback. For the events RTE_ETH_EVENT_QUEUE_STATE, RTE_ETH_EVENT_INTR_RESET the callback parameter is not used. In some cases for the RTE_ETH_EVENT_INTR_LSC the call back parameter is used.
This patch adds a new event RTE_ETH_VF_MBOX and a parameter for this event struct rte_eth_mb_event_param{}. This parameter is only used with the RTE_ETH_VF_MBOX event and does not affect the other events.
The struct rte_eth_mb_event_param{} should probably not be in rte_eth_dev.h, I will send a v4.
Regards,
Bernard.
More information about the dev
mailing list