[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FB4E34F.2050004@linutronix.de>
Date: Thu, 17 May 2012 13:38:55 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC: davem@...emloft.net, netdev@...r.kernel.org, gospo@...hat.com,
sassmann@...hat.com
Subject: Re: [net-next 3/4] e1000: look in the page and not in skb->data for
the last byte
On 05/17/2012 01:27 PM, Jeff Kirsher wrote:
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index fefbf4d..6ac80c8 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -4066,7 +4066,11 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
> /* errors is only valid for DD + EOP descriptors */
> if (unlikely((status& E1000_RXD_STAT_EOP)&&
> (rx_desc->errors& E1000_RXD_ERR_FRAME_ERR_MASK))) {
> - u8 last_byte = *(skb->data + length - 1);
> + u8 *mapped;
> + u8 last_byte;
> +
> + mapped = kmap_atomic(buffer_info->page);
> + last_byte = *(mapped + length - 1);
> if (TBI_ACCEPT(hw, status, rx_desc->errors, length,
> last_byte)) {
> spin_lock_irqsave(&adapter->stats_lock,
This is not what I've sent. My original patch [0] hat a unmap as well.
One comment was, that kmap_atomic() is too much overhead because the
page can never be highmem. So I changed it to page_address() [1].
[0] http://permalink.gmane.org/gmane.linux.drivers.e1000.devel/10008
[1] http://permalink.gmane.org/gmane.linux.drivers.e1000.devel/10012
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists