Skip to contentSkip to conversation

netfilter: nft_flow_offload: Add DEV_PATH_MTK_WDMA to nft_dev_path_info()

PATCH New Eric Woudstra 1 participant 1 message Mar 17

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v12 1/1 netfilter: nft_flow_offload: Add DEV_PATH_MTK_WDMA to nft_dev_path_info()

In case of using mediatek wireless, in nft_dev_fill_forward_path(), the forward path is filled, ending with mediatek wlan1.

Because DEV_PATH_MTK_WDMA is unknown inside nft_dev_path_info() it returns with info.indev = NULL. Then nft_dev_forward_path() returns without setting the direct transmit parameters.

This results in a neighbor transmit, and direct transmit not possible.

So this patch adds DEV_PATH_MTK_WDMA to nft_dev_path_info() and makes direct transmission possible.

(Also needed for flow between bridged interfaces, maybe implemented later.)

[ Rebased; moved to nf_flow_table_path.c ]

---

Changes in v12:
-Split from [PATCH v11 nf-next] netfilter: fastpath fixes

Changes in v11: (results of testing with bridge_fastpath.sh)
- Dropped "No ingress_vlan forward info for dsa user port" patch.
- Added Introduce DEV_PATH_BR_VLAN_KEEP_HW, which changed from applying only in the bridge-fastpath to all fastpaths. Added a better explanation to the description.

Changes in v10:
- Split from patch-set: bridge-fastpath and related improvements v9

 net/netfilter/nf_flow_table_path.c | 5 +++++
 1 file changed, 5 insertions(+)
net/netfilter/nf_flow_table_path.c +5 -0
index 6bb9579dcc2a..f2d7822824bc 100644
@@ -103,6 +103,7 @@ static void nft_dev_path_info(const struct net_device_path_stack *stack,
 		switch (path->type) {
 		case DEV_PATH_ETHERNET:
 		case DEV_PATH_DSA:
+		case DEV_PATH_MTK_WDMA:
 		case DEV_PATH_VLAN:
 		case DEV_PATH_PPPOE:
 		case DEV_PATH_TUN:
@@ -116,6 +117,10 @@ static void nft_dev_path_info(const struct net_device_path_stack *stack,
 				i = stack->num_paths;
 				break;
 			}
+			if (path->type == DEV_PATH_MTK_WDMA) {
+				i = stack->num_paths;
+				break;
+			}
 
 			/* DEV_PATH_VLAN, DEV_PATH_PPPOE and DEV_PATH_TUN */
 			if (path->type == DEV_PATH_TUN) {
Signature · 1 line
2.53.0