diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-12-18 17:10:04 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-12-18 18:10:52 +0100 |
commit | 6244b0b6c942a6257c612622a5761f05277025e9 (patch) | |
tree | f79a9b40f3deb50571edc5ee737ecb43a2b880fc /target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch | |
parent | fca0eb2d927c2c5587a3105108374abd7c97ca25 (diff) | |
download | upstream-6244b0b6c942a6257c612622a5761f05277025e9.tar.gz upstream-6244b0b6c942a6257c612622a5761f05277025e9.tar.bz2 upstream-6244b0b6c942a6257c612622a5761f05277025e9.zip |
kernel: improve skb hash on the mtk ethernet driver
The PPE only provides a 14 bit hash, however many uses of the skb hash
expect the hash to use the full 32 bit range.
Use jhash to extend the hash to the full size
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch')
-rw-r--r-- | target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch b/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch index 810eeda75c..f63ed28998 100644 --- a/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch +++ b/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch @@ -20,16 +20,16 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> +mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_offload.o --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -19,6 +19,8 @@ - #include <linux/interrupt.h> +@@ -20,6 +20,8 @@ #include <linux/pinctrl/devinfo.h> #include <linux/phylink.h> + #include <linux/jhash.h> +#include <linux/netfilter.h> +#include <net/netfilter/nf_flow_table.h> #include <net/dsa.h> #include "mtk_eth_soc.h" -@@ -1324,8 +1326,12 @@ static int mtk_poll_rx(struct napi_struc +@@ -1327,8 +1329,12 @@ static int mtk_poll_rx(struct napi_struc (trxd.rxd2 & RX_DMA_VTAG)) __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), RX_DMA_VID(trxd.rxd3)); @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> skip_rx: ring->data[idx] = new_data; -@@ -2858,6 +2864,25 @@ static int mtk_set_rxnfc(struct net_devi +@@ -2861,6 +2867,25 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> static const struct ethtool_ops mtk_ethtool_ops = { .get_link_ksettings = mtk_get_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings, -@@ -2889,6 +2914,7 @@ static const struct net_device_ops mtk_n +@@ -2892,6 +2917,7 @@ static const struct net_device_ops mtk_n #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = mtk_poll_controller, #endif @@ -78,7 +78,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> }; static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) -@@ -3154,6 +3180,10 @@ static int mtk_probe(struct platform_dev +@@ -3157,6 +3183,10 @@ static int mtk_probe(struct platform_dev eth->base + MTK_ETH_PPE_BASE, 2); if (err) goto err_free_dev; |