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 12:50:56 +0200 [thread overview]
Message-ID: <591AD990.901@aoifes.com> (raw)
In-Reply-To: <20170508123852.GI27709@lunn.ch>
On 08/05/17 14:38, Andrew Lunn wrote:
>>> static unsigned sky2_get_rx_threshold(struct sky2_port *sky2)
>>> {
>>> unsigned size;
>>>
>>> /* Space needed for frame data + headers rounded up */
>>> size = roundup(sky2->netdev->mtu + ETH_HLEN + VLAN_HLEN, 8);
>>>
>>> /* Stopping point for hardware truncation */
>>> return (size - 8) / sizeof(u32);
>>> }
>>>
>>> This is not going to be big enough for a frame with a DSA header.
>>>
>>
>> Then, would be a good fix add 8 bytes to the size variable in this function?
>
> Yes. Also look at the transmit code, is there again a limit based on
> the MTU.
Hi Andrew,
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).
The polling function of sky2 driver (sky2_poll) calls to the function
sky2_status_intr (with the parameter struct sky2_hw *hw). The
sky2_status_intr function gets the status of the list elements (struct
sky2_status_le) from the sky2_hw parameter and, from the sky2_status_le,
gets the maximum length (1518) and the status code (0x5f20010). When the
latter function (sky2_status_intr) calls to the sky2_receive function
with the parameters length and status, it reports about the error (rx
error, status 0x5f20010
length 1518).
I don't know who sets the maximum length (1518) and the status code
(0x5f20010) of the packets. Is it possible that these values to be set
outside the sky2 code?
Thanks,
Rafa
>
>> Settings for marvell:
>> Supported ports: [ TP ]
>> Supported link modes: 10baseT/Half 10baseT/Full
>> 100baseT/Half 100baseT/Full
>> 1000baseT/Half 1000baseT/Full
>> Supported pause frame use: No
>> Supports auto-negotiation: Yes
>> Advertised link modes: 10baseT/Half 10baseT/Full
>> 100baseT/Half 100baseT/Full
>> 1000baseT/Half 1000baseT/Full
>> Advertised pause frame use: No
>> Advertised auto-negotiation: No
>> Speed: 1000Mb/s
>> Duplex: Full
>> Port: Twisted Pair
>> PHYAD: 0
>> Transceiver: internal
>> Auto-negotiation: on
>> MDI-X: Unknown
>> Supports Wake-on: pg
>> Wake-on: d
>> Current message level: 0x000000ff (255)
>> drv probe link timer ifdown ifup
>> rx_err tx_err
>> Link detected: yes
>>
>
> So this suggests there is a real PHY there, and it is
> auto-negotiating.
>
> What we cannot see is the status for the PHY it connects to. But since
> this PHY has established a link, the other PHY is probably O.K. It is
> just a bit unsafe, since you are relying on reset behaviour. There is
> nothing in software configuring the second PHY to make it
> auto-negotiate.
>
> Andrew
>
>
next prev parent reply other threads:[~2017-05-16 10:51 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 [this message]
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
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=591AD990.901@aoifes.com \
--to=rafael.corvillo@aoifes.com \
--cc=andrew@lunn.ch \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.