diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-09-06 05:27:09 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-09-13 02:11:24 +0200 |
commit | 46ae4d0a489741565520195bddebc3414781e603 (patch) | |
tree | b364bb2c6808d4d1ae4e00c46c123caf7fffe618 /drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | |
parent | Merge branch 'add-support-for-open-alliance-10base-t1x-macphy-serial-interface' (diff) | |
parent | Merge tag 'net-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
download | linux-46ae4d0a489741565520195bddebc3414781e603.tar.xz linux-46ae4d0a489741565520195bddebc3414781e603.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts (sort of) and no adjacent changes.
This merge reverts commit b3c9e65eb227 ("net: hsr: remove seqnr_lock")
from net, as it was superseded by
commit 430d67bdcb04 ("net: hsr: Use the seqnr lock for frames received via interlink port.")
in net-next.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa/dpaa_eth.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 1d0208b5db7d..e15dd3d858df 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2273,12 +2273,12 @@ static netdev_tx_t dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev) { const int queue_mapping = skb_get_queue_mapping(skb); - bool nonlinear = skb_is_nonlinear(skb); struct rtnl_link_stats64 *percpu_stats; struct dpaa_percpu_priv *percpu_priv; struct netdev_queue *txq; struct dpaa_priv *priv; struct qm_fd fd; + bool nonlinear; int offset = 0; int err = 0; @@ -2288,6 +2288,13 @@ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev) qm_fd_clear_fd(&fd); + /* Packet data is always read as 32-bit words, so zero out any part of + * the skb which might be sent if we have to pad the packet + */ + if (__skb_put_padto(skb, ETH_ZLEN, false)) + goto enomem; + + nonlinear = skb_is_nonlinear(skb); if (!nonlinear) { /* We're going to store the skb backpointer at the beginning * of the data buffer, so we need a privately owned skb |