1950d81ebbacfdea8752c0fa419e24b06032b2b8
[openwrt/staging/xback.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Mon, 21 Feb 2022 15:37:21 +0100
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for
4 PPE offload
5
6 This allows offload entries to be created from user space
7
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 ---
10
11 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
12 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
13 @@ -564,10 +564,13 @@ mtk_eth_setup_tc_block(struct net_device
14 int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
15 void *type_data)
16 {
17 - if (type == TC_SETUP_FT)
18 + switch (type) {
19 + case TC_SETUP_BLOCK:
20 + case TC_SETUP_FT:
21 return mtk_eth_setup_tc_block(dev, type_data);
22 -
23 - return -EOPNOTSUPP;
24 + default:
25 + return -EOPNOTSUPP;
26 + }
27 }
28
29 int mtk_eth_offload_init(struct mtk_eth *eth)