}
for (let zone in this.zones())
- for (let device in zone.match_devices)
+ for (let device in zone.related_physdevs)
push(devices, ...resolve_lower_devices(devstatus, device));
devices = uniq(devices);
this.warn('Hardware flow offloading unavailable, falling back to software offloading');
this.state.defaults.flow_offloading_hw = false;
- }
- devices = [];
+ devices = [];
+ }
for (let zone in this.zones())
for (let device in zone.match_devices)
let net = {
up: ifc.up,
device: ifc.l3_device,
+ physdev: ifc.device,
zone: ifc.data?.zone
};
zone.auto_helper = false;
let match_devices = [];
+ let related_physdevs = [];
let related_subnets = [];
let related_ubus_networks = [];
let match_subnets, masq_src_subnets, masq_dest_subnets;
});
}
+ if (net.physdev && !e.invert)
+ push(related_physdevs, net.physdev);
+
push(related_subnets, ...(net.ipaddrs || []));
}
}
zone.match_subnets = map(filter(related_subnets, s => !s.invert && s.bits != -1), this.cidr);
zone.related_subnets = related_subnets;
+ zone.related_physdevs = related_physdevs;
if (zone.masq || zone.masq6)
zone.dflags.snat = true;
flowtable ft {
hook ingress priority 0;
- devices = { "eth0" };
+ devices = { "eth0", "eth1" };
flags offload;
}
[call] ctx.call object <network.device> method <status> args <null>
[call] fs.opendir path </sys/class/net/br-lan>
[call] fs.opendir path </sys/class/net/eth0>
-[call] fs.opendir path </sys/class/net/pppoe-wan>
-[call] fs.opendir path </sys/class/net/pppoe-wan>
-[call] system command </usr/sbin/nft -c 'add table inet fw4-hw-offload-test; add flowtable inet fw4-hw-offload-test ft { hook ingress priority 0; devices = { "eth0" }; flags offload; }' 2>/dev/null> timeout <null>
+[call] fs.opendir path </sys/class/net/eth1>
+[call] system command </usr/sbin/nft -c 'add table inet fw4-hw-offload-test; add flowtable inet fw4-hw-offload-test ft { hook ingress priority 0; devices = { "eth0", "eth1" }; flags offload; }' 2>/dev/null> timeout <null>
[call] fs.popen cmdline </usr/sbin/nft --terse --json list flowtables inet> mode <r>
[call] fs.open path </sys/class/net/br-lan/flags> mode <r>
[call] fs.open path </sys/class/net/br-lan/flags> mode <r>