Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3dc93e85 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'xmit_more-softnet_data'



Florian Westphal says:

====================
net: move skb->xmit_more to percpu softnet data

Eric Dumazet mentioned we could place xmit_more hint in same
spot as device xmit recursion counter, instead of using
an sk_buff flag bit.

This series places xmit_recursion counter and xmit_more hint
in softnet data, filling a hole.

After this, skb->xmit_more is always zero.  Drivers are converted
to use "netdev_xmit_more()" helper instead.

Last patch removes the skb->xmit_more flag.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 74dcb4c1 4f296ede
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2236,7 +2236,7 @@ static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev)
		}
	}

	if (netif_xmit_stopped(txq) || !skb->xmit_more) {
	if (netif_xmit_stopped(txq) || !netdev_xmit_more()) {
		/* trigger the dma engine. ena_com_write_sq_doorbell()
		 * has a mb
		 */
+1 −1
Original line number Diff line number Diff line
@@ -1887,7 +1887,7 @@ static void xgbe_dev_xmit(struct xgbe_channel *channel)
	smp_wmb();

	ring->cur = cur_index + 1;
	if (!packet->skb->xmit_more ||
	if (!netdev_xmit_more() ||
	    netif_xmit_stopped(netdev_get_tx_queue(pdata->netdev,
						   channel->queue_index)))
		xgbe_tx_start_xmit(channel, ring);
+5 −3
Original line number Diff line number Diff line
@@ -404,6 +404,7 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
	unsigned int dma_len;
	unsigned int align;
	unsigned int next;
	bool xmit_more;

	if (atomic_read(&priv->tx_free) <= NB8800_DESC_LOW) {
		netif_stop_queue(dev);
@@ -423,9 +424,10 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
		return NETDEV_TX_OK;
	}

	xmit_more = netdev_xmit_more();
	if (atomic_dec_return(&priv->tx_free) <= NB8800_DESC_LOW) {
		netif_stop_queue(dev);
		skb->xmit_more = 0;
		xmit_more = false;
	}

	next = priv->tx_next;
@@ -450,7 +452,7 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
	desc->n_addr = priv->tx_bufs[next].dma_desc;
	desc->config = DESC_BTS(2) | DESC_DS | DESC_EOF | dma_len;

	if (!skb->xmit_more)
	if (!xmit_more)
		desc->config |= DESC_EOC;

	txb->skb = skb;
@@ -468,7 +470,7 @@ static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)

	priv->tx_next = next;

	if (!skb->xmit_more) {
	if (!xmit_more) {
		smp_wmb();
		priv->tx_chain->ready = true;
		priv->tx_chain = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
	prod = NEXT_TX(prod);
	txr->tx_prod = prod;

	if (!skb->xmit_more || netif_xmit_stopped(txq))
	if (!netdev_xmit_more() || netif_xmit_stopped(txq))
		bnxt_db_write(bp, &txr->tx_db, prod);

tx_done:
@@ -559,7 +559,7 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
	mmiowb();

	if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) {
		if (skb->xmit_more && !tx_buf->is_push)
		if (netdev_xmit_more() && !tx_buf->is_push)
			bnxt_db_write(bp, &txr->tx_db, prod);

		netif_tx_stop_queue(txq);
+1 −1
Original line number Diff line number Diff line
@@ -1665,7 +1665,7 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
	if (ring->free_bds <= (MAX_SKB_FRAGS + 1))
		netif_tx_stop_queue(txq);

	if (!skb->xmit_more || netif_xmit_stopped(txq))
	if (!netdev_xmit_more() || netif_xmit_stopped(txq))
		/* Packets are ready, update producer index */
		bcmgenet_tdma_ring_writel(priv, ring->index,
					  ring->prod_index, TDMA_PROD_INDEX);
Loading