From: Eric Dumazet <eric.dumazet@gmail.com>
To: Santiago Leon <santil@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org, brking@linux.vnet.ibm.com, anton@samba.org
Subject: Re: [patch 03/21] ibmveth: Remove LLTX
Date: Sat, 04 Sep 2010 08:41:36 +0200 [thread overview]
Message-ID: <1283582496.2320.4.camel@edumazet-laptop> (raw)
In-Reply-To: <20100904042815.2655.71537.sendpatchset@jupiter1-ltc-lp2.austin.ibm.com>
Le vendredi 03 septembre 2010 à 23:28 -0500, Santiago Leon a écrit :
> The ibmveth adapter needs locking in the transmit routine to protect
> the bounce_buffer but it sets LLTX and forgets to add any of its own
> locking.
>
> Just remove the deprecated LLTX option. Remove the stats lock in the process.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
> ---
>
> Index: net-next-2.6/drivers/net/ibmveth.c
> ===================================================================
> --- net-next-2.6.orig//drivers/net/ibmveth.c 2010-09-03 22:18:39.000000000 -0500
> +++ net-next-2.6/drivers/net/ibmveth.c 2010-09-03 22:18:40.000000000 -0500
> @@ -903,7 +903,6 @@ static netdev_tx_t ibmveth_start_xmit(st
> union ibmveth_buf_desc desc;
> unsigned long lpar_rc;
> unsigned long correlator;
> - unsigned long flags;
> unsigned int retry_count;
> unsigned int tx_dropped = 0;
> unsigned int tx_bytes = 0;
Why dont you remove these local variables then ?
tx_dropped, tx_bytes, tx_packets ?
> @@ -965,20 +964,18 @@ static netdev_tx_t ibmveth_start_xmit(st
> } else {
> tx_packets++;
> tx_bytes += skb->len;
> - netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
> }
>
> if (!used_bounce)
> dma_unmap_single(&adapter->vdev->dev, data_dma_addr,
> skb->len, DMA_TO_DEVICE);
>
> -out: spin_lock_irqsave(&adapter->stats_lock, flags);
> +out:
> netdev->stats.tx_dropped += tx_dropped;
> netdev->stats.tx_bytes += tx_bytes;
> netdev->stats.tx_packets += tx_packets;
> adapter->tx_send_failed += tx_send_failed;
> adapter->tx_map_failed += tx_map_failed;
> - spin_unlock_irqrestore(&adapter->stats_lock, flags);
>
> dev_kfree_skb(skb);
> return NETDEV_TX_OK;
> @@ -1290,8 +1287,6 @@ static int __devinit ibmveth_probe(struc
> netdev->netdev_ops = &ibmveth_netdev_ops;
> netdev->ethtool_ops = &netdev_ethtool_ops;
> SET_NETDEV_DEV(netdev, &dev->dev);
> - netdev->features |= NETIF_F_LLTX;
> - spin_lock_init(&adapter->stats_lock);
>
> memcpy(netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
>
> Index: net-next-2.6/drivers/net/ibmveth.h
> ===================================================================
> --- net-next-2.6.orig//drivers/net/ibmveth.h 2010-09-03 22:18:39.000000000 -0500
> +++ net-next-2.6/drivers/net/ibmveth.h 2010-09-03 22:18:40.000000000 -0500
> @@ -158,7 +158,6 @@ struct ibmveth_adapter {
> u64 rx_no_buffer;
> u64 tx_map_failed;
> u64 tx_send_failed;
> - spinlock_t stats_lock;
> };
>
> struct ibmveth_buf_desc_fields {
> --
next prev parent reply other threads:[~2010-09-04 6:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-04 4:27 [patch 00/21] ibmveth updates Santiago Leon
2010-09-04 4:28 ` [patch 01/21] ibmveth: Remove integer divide caused by modulus Santiago Leon
2010-09-04 4:28 ` [patch 02/21] ibmveth: batch rx buffer replacement Santiago Leon
2010-09-04 4:28 ` [patch 03/21] ibmveth: Remove LLTX Santiago Leon
2010-09-04 6:41 ` Eric Dumazet [this message]
2010-09-04 4:28 ` [patch 04/21] ibmveth: Add tx_copybreak Santiago Leon
2010-09-04 4:28 ` [patch 05/21] ibmveth: Add rx_copybreak Santiago Leon
2010-09-04 4:28 ` [patch 06/21] ibmveth: Use lighter weight read memory barrier in ibmveth_poll Santiago Leon
2010-09-04 4:28 ` [patch 07/21] ibmveth: Add scatter-gather support Santiago Leon
2010-09-04 4:28 ` [patch 08/21] ibmveth: Add optional flush of rx buffer Santiago Leon
2010-09-04 4:28 ` [patch 09/21] ibmveth: Remove duplicate checksum offload setup code Santiago Leon
2010-09-04 4:28 ` [patch 10/21] ibmveth: Enable IPv6 checksum offload Santiago Leon
2010-09-04 4:28 ` [patch 11/21] ibmveth: remove procfs code Santiago Leon
2010-09-04 4:29 ` [patch 12/21] ibmveth: Convert to netdev_alloc_skb Santiago Leon
2010-09-04 4:29 ` [patch 13/21] ibmveth: Remove redundant function prototypes Santiago Leon
2010-09-04 4:29 ` [patch 14/21] ibmveth: Convert driver specific debug to netdev_dbg Santiago Leon
2010-09-04 4:29 ` [patch 15/21] ibmveth: Convert driver specific error functions to netdev_err Santiago Leon
2010-09-04 4:29 ` [patch 16/21] ibmveth: Some formatting fixes Santiago Leon
2010-09-04 4:29 ` [patch 17/21] ibmveth: Coding style fixes Santiago Leon
2010-09-04 4:29 ` [patch 18/21] ibmveth: Return -EINVAL on all ->probe errors Santiago Leon
2010-09-04 4:29 ` [patch 19/21] ibmveth: Convert driver specific assert to BUG_ON Santiago Leon
2010-09-04 4:29 ` [patch 20/21] ibmveth: Remove some unnecessary include files Santiago Leon
2010-09-04 4:29 ` [patch 21/21] ibmveth: Update module information and version Santiago Leon
2010-09-07 1:22 ` [patch 00/21] ibmveth updates David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283582496.2320.4.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=anton@samba.org \
--cc=brking@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=santil@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox