mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user