aboutsummaryrefslogtreecommitdiff
path: root/lib/netlink-socket.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-07-10 09:53:21 -0700
committerBen Pfaff <blp@nicira.com>2013-07-15 11:07:25 -0700
commitbef30838592ebe816f0d8e8003bfa0e6fc806f79 (patch)
tree91ae80006ea3d23c0b3c18b22db54a04b39f7d74 /lib/netlink-socket.c
parentc649fe54427ea6e6c53e0c832314d999ec11e4e9 (diff)
stress: Remove essentially unused library.
The "stress" library was introduced years ago. We intended at the time to start using it to provoke errors in testing, to make sure that Open vSwitch was resilient against those errors. The intention was good, but there were few actual implementations of stress options, and the testing never materialized. Rather than adapt the stress library for thread safety, this seems like a good opportunity to remove it, so this commit does so. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/netlink-socket.c')
-rw-r--r--lib/netlink-socket.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index dfe39ac9..aa7fca2f 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -31,7 +31,6 @@
#include "ofpbuf.h"
#include "poll-loop.h"
#include "socket-util.h"
-#include "stress.h"
#include "util.h"
#include "vlog.h"
@@ -309,15 +308,6 @@ nl_sock_send_seq(struct nl_sock *sock, const struct ofpbuf *msg,
return nl_sock_send__(sock, msg, nlmsg_seq, wait);
}
-/* This stress option is useful for testing that OVS properly tolerates
- * -ENOBUFS on NetLink sockets. Such errors are unavoidable because they can
- * occur if the kernel cannot temporarily allocate enough GFP_ATOMIC memory to
- * reply to a request. They can also occur if messages arrive on a multicast
- * channel faster than OVS can process them. */
-STRESS_OPTION(
- netlink_overflow, "simulate netlink socket receive buffer overflow",
- 5, 1, -1, 100);
-
static int
nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, bool wait)
{
@@ -373,10 +363,6 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, bool wait)
return EPROTO;
}
- if (STRESS(netlink_overflow)) {
- return ENOBUFS;
- }
-
buf->size = MIN(retval, buf->allocated);
if (retval > buf->allocated) {
COVERAGE_INC(netlink_recv_jumbo);