public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Rafa Corvillo <rafael.corvillo@aoifes•com>
To: Andrew Lunn <andrew@lunn•ch>
Cc: Stephen Hemminger <stephen@networkplumber•org>, netdev@vger•kernel.org
Subject: Re: [ISSUE: sky2 - rx error] Link stops working under heavy traffic load connected to a mv88e6176
Date: Tue, 16 May 2017 17:50:26 +0200	[thread overview]
Message-ID: <591B1FC2.1090402@aoifes.com> (raw)
In-Reply-To: <20170516132116.GE5456@lunn.ch>

> On Tue, May 16, 2017 at 03:09:17PM +0200, Rafa Corvillo wrote:
>>>> Adding 8 bytes (sky2->netdev->mtu + ETH_HLEN + VLAN_HLEN + 8
>>>> (EDSA_HLEN)) does not fix the error, because the interface keep
>>>> having a maximum length of 1518 bytes (sky2->netdev->mtu + ETH_HLEN
>>>> + VLAN_HLEN).
>>>
>>> Did you check the value being written to here:
>>>
>>>          /*
>>>           * The receiver hangs if it receives frames larger than the
>>>           * packet buffer. As a workaround, truncate oversize frames, but
>>>           * the register is limited to 9 bits, so if you do frames > 2052
>>>           * you better get the MTU right!
>>>           */
>>>          thresh = sky2_get_rx_threshold(sky2);
>>>          if (thresh > 0x1ff)
>>>                  sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_OFF);
>>>          else {
>>>                  sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), thresh);
>>>                  sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON);
>>>          }
>>>
>>>
>>> What is thresh?
>>
>> The value of thresh is 380.
>
> So that is 1528.

Yes, this is the result of the roundup function.

>
> You could hack it and try 0x1ff.

I have forced the value of thresh to 0x1ff and the rx error still appears.

>
> Also, check that in sky2_rx_add(), le->length is set to 4K.
>

The value of le->length is set to 1520.

Rafa

  reply	other threads:[~2017-05-16 15:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 12:39 [ISSUE: sky2 - rx error] Link stops working under heavy traffic load connected to a mv88e6176 Rafa Corvillo
2017-04-24  6:45 ` Rafa Corvillo
2017-04-25 15:27 ` Stephen Hemminger
2017-04-27 12:05   ` Rafa Corvillo
2017-04-27 13:04     ` Andrew Lunn
2017-04-28 11:54       ` Rafa Corvillo
2017-04-28 12:22         ` Andrew Lunn
2017-05-08 12:03           ` Rafa Corvillo
2017-05-08 12:38             ` Andrew Lunn
2017-05-16 10:50               ` Rafa Corvillo
2017-05-16 12:47                 ` Andrew Lunn
2017-05-16 13:09                   ` Rafa Corvillo
2017-05-16 13:21                     ` Andrew Lunn
2017-05-16 15:50                       ` Rafa Corvillo [this message]
2017-05-16 15:58                         ` Andrew Lunn
2017-05-16 16:19                           ` Rafa Corvillo
2017-05-26 10:13                             ` Rafa Corvillo
2017-05-31 19:31                               ` Andrew Lunn

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=591B1FC2.1090402@aoifes.com \
    --to=rafael.corvillo@aoifes$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=stephen@networkplumber$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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