History

net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for PPE offload

This allows offload entries to be created from user space

Felix Fietkau committed 4 years ago

Commit bb14c191 parent 817b2fd1 file · +6 −3Browse files

Unified · Split

drivers/net/ethernet/mediatek/mtk_ppe_offload.c+6−3
@@ -563,10 +563,13 @@ mtk_eth_setup_tc_block(struct net_device *dev, struct flow_block_offload *f) · 562 unmodified lines
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)