LGTM, one comment below,
> - if ((dpif->epoll_fd >= 0) == enable) {
> - return 0;
> - }
> -
> - if (!enable) {
> - destroy_channels(dpif);
> - } else {
> - struct dpif_port_dump port_dump;
> - struct dpif_port port;
> -
> + /* To start with, we need an epoll fd. */
> + if (dpif->epoll_fd < 0) {
> + dpif->epoll_fd = epoll_create(10);
> if (dpif->epoll_fd < 0) {
> dpif->epoll_fd = epoll_create(10);
> if (dpif->epoll_fd < 0) {
> return errno;
> }
> }
> + }
>
Do we need two "if (dpif->epoll_fd < 0)" ?
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev