mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
netdev-linux: Return correct error codes on receive.
netdev_linux_receive was returning positive error codes while the interface specifies that it should be returning negative errors. This difference causes a huge increase in (non-existant) packet processing with the userspace datapath.
This commit is contained in:
@@ -370,7 +370,7 @@ netdev_linux_recv(struct netdev *netdev_, void *data, size_t size)
|
||||
|
||||
if (netdev->tap_fd < 0) {
|
||||
/* Device was opened with NETDEV_ETH_TYPE_NONE. */
|
||||
return EAGAIN;
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@@ -382,7 +382,7 @@ netdev_linux_recv(struct netdev *netdev_, void *data, size_t size)
|
||||
VLOG_WARN_RL(&rl, "error receiving Ethernet packet on %s: %s",
|
||||
strerror(errno), netdev_get_name(netdev_));
|
||||
}
|
||||
return errno;
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user