netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] r8169: Filtered data on Rx descriptor status context
@ 2015-08-09 11:57 Corcodel Marian
  2015-08-09 12:41 ` Sergei Shtylyov
  2015-08-09 22:09 ` Francois Romieu
  0 siblings, 2 replies; 4+ messages in thread
From: Corcodel Marian @ 2015-08-09 11:57 UTC (permalink / raw)
  To: netdev; +Cc: Corcodel Marian

 We want to start evaluate an RES Receive error summary only 
 when LS (LastFrag) occurred but without FirstFrag


Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 8bf8c3f..0ee0107 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7305,12 +7305,15 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 		if (status & DescOwn)
 			break;
 
+		if (!(status & LastFrag))
+			break;
+
 		/* This barrier is needed to keep us from reading
 		 * any other fields out of the Rx descriptor until
 		 * we know the status of DescOwn
 		 */
 		dma_rmb();
-
+               if (!(status & FirstFrag)) {
 		if (unlikely(status & RxRES)) {
 			netif_info(tp, rx_err, dev, "Rx ERROR. status = %08x\n",
 				   status);
@@ -7323,6 +7326,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
 				rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
 				dev->stats.rx_fifo_errors++;
 			}
+	       }
 			if ((status & (RxRUNT | RxCRC)) &&
 			    !(status & (RxRWT | RxFOVF)) &&
 			    (dev->features & NETIF_F_RXALL))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] r8169: Filtered data on Rx descriptor status context
  2015-08-09 11:57 [PATCH] r8169: Filtered data on Rx descriptor status context Corcodel Marian
@ 2015-08-09 12:41 ` Sergei Shtylyov
  2015-08-09 22:09 ` Francois Romieu
  1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2015-08-09 12:41 UTC (permalink / raw)
  To: Corcodel Marian, netdev

Hello.

On 8/9/2015 2:57 PM, Corcodel Marian wrote:

>   We want to start evaluate an RES Receive error summary only
>   when LS (LastFrag) occurred but without FirstFrag


> Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>

> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 8bf8c3f..0ee0107 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -7305,12 +7305,15 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
>   		if (status & DescOwn)
>   			break;
>
> +		if (!(status & LastFrag))
> +			break;
> +
>   		/* This barrier is needed to keep us from reading
>   		 * any other fields out of the Rx descriptor until
>   		 * we know the status of DescOwn
>   		 */
>   		dma_rmb();
> -
> +               if (!(status & FirstFrag)) {
>   		if (unlikely(status & RxRES)) {
>   			netif_info(tp, rx_err, dev, "Rx ERROR. status = %08x\n",
>   				   status);
> @@ -7323,6 +7326,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
>   				rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
>   				dev->stats.rx_fifo_errors++;
>   			}
> +	       }

    This won't do, you should reindent the code.

MBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] r8169: Filtered data on Rx descriptor status context
  2015-08-09 11:57 [PATCH] r8169: Filtered data on Rx descriptor status context Corcodel Marian
  2015-08-09 12:41 ` Sergei Shtylyov
@ 2015-08-09 22:09 ` Francois Romieu
       [not found]   ` <CAGg4U=GQwTUcZhNv-mJPZ8JxO4JSLw_1UwQSorYfCv38u1uuUg@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Francois Romieu @ 2015-08-09 22:09 UTC (permalink / raw)
  To: Corcodel Marian; +Cc: netdev

Corcodel Marian <corcodel.marian@gmail.com> :
>  We want to start evaluate an RES Receive error summary only 
>  when LS (LastFrag) occurred but without FirstFrag

No.

The driver does not care about fragmented rx frames (hint: RxMaxSize).

-- 
Ueimor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] r8169: Filtered data on Rx descriptor status context
       [not found]   ` <CAGg4U=GQwTUcZhNv-mJPZ8JxO4JSLw_1UwQSorYfCv38u1uuUg@mail.gmail.com>
@ 2015-08-10 19:24     ` Francois Romieu
  0 siblings, 0 replies; 4+ messages in thread
From: Francois Romieu @ 2015-08-10 19:24 UTC (permalink / raw)
  To: Marian Corcodel; +Cc: netdev

Marian Corcodel <corcodel.marian@gmail.com> :
> This is specified on data sheet  only when LS  is set must evaluate
> RES   bit very important patch.Whi say no here not undestand .Please
> read Data sheet for more info.

Your patch ignores the following fact: the driver works with maximally
sized receive buffers to avoid fragmented packets - see git log for an
enlightning journey through the history of the r8169 driver.

Beyond blind datasheet compliance, have you been able to experience
FirstFrag = 0 or LastFrag = 0 receive descriptors with the current
in-kernel driver ?

-- 
Ueimor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-10 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-09 11:57 [PATCH] r8169: Filtered data on Rx descriptor status context Corcodel Marian
2015-08-09 12:41 ` Sergei Shtylyov
2015-08-09 22:09 ` Francois Romieu
     [not found]   ` <CAGg4U=GQwTUcZhNv-mJPZ8JxO4JSLw_1UwQSorYfCv38u1uuUg@mail.gmail.com>
2015-08-10 19:24     ` Francois Romieu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).