[dpdk-dev] [PATCH v2 1/2] eal: add uevent api for hot plug
Thomas Monjalon
thomas at monjalon.net
Wed Jul 5 01:45:09 CEST 2017
Hi,
This is an interesting step for hotplug in DPDK.
28/06/2017 13:07, Jeff Guo:
> + netlink_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
It is monitoring the whole system...
> +int
> +rte_uevent_get(int fd, struct rte_uevent *uevent)
> +{
> + int ret;
> + char buf[RTE_UEVENT_MSG_LEN];
> +
> + memset(uevent, 0, sizeof(struct rte_uevent));
> + memset(buf, 0, RTE_UEVENT_MSG_LEN);
> +
> + ret = recv(fd, buf, RTE_UEVENT_MSG_LEN - 1, MSG_DONTWAIT);
... and it is read from this function called by one driver.
It cannot work without a global dispatch.
It must be a global mechanism, probably a service core.
The question is also to know whether it should be a mandatory
service in DPDK or an optional helper?
More information about the dev
mailing list