Unverified Commit 53b0b153 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 643001da e06d5733
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -2277,12 +2277,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;

@@ -2292,6 +2292,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