Experimental IFF_ONE_QUEUE support for Linux

This commit is contained in:
Brandon L Black 2010-11-13 12:05:48 -06:00 committed by Guus Sliepen
parent 9e3ca39773
commit 3f410e2f8f
2 changed files with 10 additions and 0 deletions

View file

@ -52,6 +52,7 @@ static uint64_t device_total_out = 0;
bool setup_device(void) {
struct ifreq ifr;
bool t1q = false;
if(!get_config_string(lookup_config(config_tree, "Device"), &device))
device = xstrdup(DEFAULT_DEVICE);
@ -84,6 +85,12 @@ bool setup_device(void) {
device_info = "Linux tun/tap device (tap mode)";
}
#ifdef IFF_ONE_QUEUE
/* Set IFF_ONE_QUEUE flag... */
if(get_config_bool(lookup_config(config_tree, "IffOneQueue"), &t1q) && t1q)
ifr.ifr_flags |= IFF_ONE_QUEUE;
#endif
if(iface)
strncpy(ifr.ifr_name, iface, IFNAMSIZ);