[ovs-dev] [PATCHv11] netdev-afxdp: add new netdev type for AF_XDP.

William Tu u9012063 at gmail.com
Tue Jun 18 22:28:54 UTC 2019


>
> I guess, this crash caused by trying to destroy unallocated queue.
>
> Following change could help:
> ---
> diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c
> index a6543e8f5..6e1431dce 100644
> --- a/lib/netdev-afxdp.c
> +++ b/lib/netdev-afxdp.c
> @@ -249,7 +249,7 @@ xsk_configure_all(struct netdev *netdev)
>      ifindex = linux_get_ifindex(netdev_get_name(netdev));
>
>      n_rxq = netdev_n_rxq(netdev);
> -    dev->xsks = xmalloc(n_rxq * sizeof(struct xsk_socket_info *));
> +    dev->xsks = xzalloc(n_rxq * sizeof(struct xsk_socket_info *));
>
>      /* configure each queue */
>      for (i = 0; i < n_rxq; i++) {
> ---
>
> This should prevent OVS from crash, however, I don't know why socket
> creation fails in your case.
>
Hi Ilya,

Thanks, I will add this into my next version.

@Eelco
When using ovs-ctl restart, it still fails, but this is because userspace
datapath need extra "--cleanup" argument, s.t like
#ovs-appctl -t ovs-vswitchd --cleanup

We should add it to stop_daemon() at utilities/ovs-lib.in

Regards,
William


More information about the dev mailing list