forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lukasz M
committed
Sep 26, 2024
1 parent
dfb1638
commit 86c8168
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
target/linux/generic/pending-5.15/739-add-software-padding-ethernet-tx-path.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c | ||
index 31968b8..d93d7fa 100644 | ||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c | ||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c | ||
@@ -1523,6 +1523,13 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev, | ||
int queue = skb_get_queue_mapping(skb); | ||
int k = 0; | ||
|
||
+ if (skb->len <= 40) { | ||
+ if (skb_put_padto(skb, 60)) | ||
+ return -ENOMEM; | ||
+ txd_info.size = skb_headlen(skb); | ||
+ txd_info.last = !skb_is_nonlinear(skb); | ||
+ } | ||
+ | ||
txq = netdev_get_tx_queue(dev, queue); | ||
itxd = ring->next_free; | ||
itxd_pdma = qdma_to_pdma(ring, itxd); |