Skip to content

Commit bb14c19

Browse files
nbd168davem330
authored andcommitted
net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for PPE offload
This allows offload entries to be created from user space Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 817b2fd commit bb14c19

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/net/ethernet/mediatek/mtk_ppe_offload.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,13 @@ mtk_eth_setup_tc_block(struct net_device *dev, struct flow_block_offload *f)
563563
int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
564564
void *type_data)
565565
{
566-
if (type == TC_SETUP_FT)
566+
switch (type) {
567+
case TC_SETUP_BLOCK:
568+
case TC_SETUP_FT:
567569
return mtk_eth_setup_tc_block(dev, type_data);
568-
569-
return -EOPNOTSUPP;
570+
default:
571+
return -EOPNOTSUPP;
572+
}
570573
}
571574

572575
int mtk_eth_offload_init(struct mtk_eth *eth)

0 commit comments

Comments
 (0)