Skip to content

Commit 5fc9edc

Browse files
committed
port: remove tap link status workaround
Remove the workaround that assumed tap interfaces are always running. This was needed when tap interfaces were moved to network namespaces, which caused the kernel to signal them as down even though they could still transmit and receive packets. Since the DPDK tap drive now supports netns change, we no longer need this workaround. Signed-off-by: Robin Jarry <[email protected]> Reviewed-by: Christophe Fontaine <[email protected]>
1 parent e909fb8 commit 5fc9edc

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

modules/infra/control/port.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -751,19 +751,6 @@ static void link_event_cb(evutil_socket_t, short /*what*/, void * /*priv*/) {
751751

752752
port = iface_info_port(iface);
753753

754-
// XXX: net_tap devices are signaled down by the kernel when they
755-
// are moved to another netns although they still can receive and
756-
// transmit packets. Ignore link status updates for this driver and
757-
// always assume they are running.
758-
if (strncmp(port->devargs, "net_tap", strlen("net_tap")) == 0) {
759-
if (!(iface->state & GR_IFACE_S_RUNNING)) {
760-
LOG(INFO, "%s: link status up", iface->name);
761-
iface->state |= GR_IFACE_S_RUNNING;
762-
gr_event_push(GR_EVENT_IFACE_STATUS_UP, iface);
763-
}
764-
continue;
765-
}
766-
767754
if (rte_eth_link_get_nowait(qmap->port_id, &link) < 0) {
768755
LOG(WARNING, "rte_eth_link_get_nowait: %s", strerror(rte_errno));
769756
continue;

0 commit comments

Comments
 (0)