+
+ if (port_no < keep_channels_nbits) {
+ bitmap_set1(keep_channels, port_no);
+ }
+ continue;
+
+ error:
+ nl_sock_destroy(sock);
+ }
+ nl_dump_done(&dump);
+ ofpbuf_uninit(&buf);
+
+ /* Discard any saved channels that we didn't reuse. */
+ for (i = 0; i < keep_channels_nbits; i++) {
+ if (!bitmap_is_set(keep_channels, i)) {
+ nl_sock_destroy(dpif->channels[i].sock);
+ dpif->channels[i].sock = NULL;
+ }
+ }
+ free(keep_channels);
+
+ return retval;
+}
+
+static int
+dpif_linux_recv_set__(struct dpif *dpif_, bool enable)
+{
+ struct dpif_linux *dpif = dpif_linux_cast(dpif_);
+
+ if ((dpif->epoll_fd >= 0) == enable) {
+ return 0;
+ } else if (!enable) {
+ destroy_channels(dpif);
+ return 0;
+ } else {
+ return dpif_linux_refresh_channels(dpif_);