X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet-brg.c;h=999adcd2b3575cdcb16566b26381d878b772fd2f;hb=a1e79c2d8ac8ae6ee326c207a83562e7de025ef8;hp=309171d5624356ec714fb384f6b8ffee5be7966e;hpb=7ca1f3f6bcb065c7c28b98f049d4abbca21a7bc1;p=palacios.git diff --git a/linux_module/palacios-vnet-brg.c b/linux_module/palacios-vnet-brg.c index 309171d..999adcd 100644 --- a/linux_module/palacios-vnet-brg.c +++ b/linux_module/palacios-vnet-brg.c @@ -32,9 +32,9 @@ #define VNET_SERVER_PORT 9000 -#define VNET_NOPROGRESS_LIMIT 1000 - -#define VNET_YIELD_TIME_USEC 1000 +#define VNET_ADAPTIVE_BRIDGE 0 // set this to one to have bridge go to sleep if there nothing to do... +#define VNET_NOPROGRESS_LIMIT 1000 // ... after this many iterations +#define VNET_YIELD_TIME_USEC 1000 // ... and go to sleep for this long struct vnet_link { uint32_t dst_ip; @@ -472,7 +472,7 @@ static int _udp_server(void * arg) { // adaptively select yielding strategy depending on // whether we are making progress - if (noprogress_count < VNET_NOPROGRESS_LIMIT) { + if ((!VNET_ADAPTIVE_BRIDGE) || (noprogress_count < VNET_NOPROGRESS_LIMIT)) { // Likely making progress, do fast yield so we // come back immediately if there is no other action palacios_yield_cpu();