diff options
| author | Jesse Gross <jesse@nicira.com> | 2009-10-02 10:31:20 -0700 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2009-10-02 10:36:41 -0700 |
| commit | c0e5f6cabeeb8153144fead66c1f37a5014d9060 (patch) | |
| tree | 9bb17e5a837ae73bde357c718504cf0af41e0e69 /lib | |
| parent | 3f3879d205ab0df085c6d2ec13a39ee5d8b6242c (diff) | |
| download | openvswitch-c0e5f6cabeeb8153144fead66c1f37a5014d9060.tar.gz | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/netdev-linux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 50a0d2da7..c71bdd492 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -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; } } } |
