SDK1.1 DPAA Ethernet Driver Tx packets overruns

cancel
Showing results for 
Search instead for 
Did you mean: 

SDK1.1 DPAA Ethernet Driver Tx packets overruns

878 Views
amrutkulkarni
Contributor II

Hi All,

Currently we are using SDK1.1 based source code  with P4040 processor which has DPAA Ethernet driver.

While we perform network stream 90 client @ 4.7 Mbps bitrtae (90 * 4.7 = 425 Mbps total) which is less then 1Gbps Driver starts dropping the Tx packets which causes stream to choppy

# ifconfig fm1-gb1

fm1-gb1    Link encap:Ethernet  HWaddr 00:06:CF:06:1E:A4

          inet addr:172.17.5.1  Bcast:172.17.255.255  Mask:255.255.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:18138121 errors:0 dropped:489339 overruns:0 frame:0

          TX packets:153820487 errors:0 dropped:9505426 overruns:9505426 carrier:0

          collisions:0 txqueuelen:16384

          RX bytes:2768709260 (2.5 GiB)  TX bytes:4289153048 (3.9 GiB)

          Memory:fe5e0000-fe5e0fff

ifconfig statistics reports a lot of Tx drop's (overruns) no error message is reported kernle log or no drop is reported from netstat information.

I think Tx packets are getting dropped at driver level.Unit has 4Gb of RAM and don't think its memory relate since lot of RAM is still available around 2GB.

Does this means driver is flooded with too much Tx packets but at seeing at bitrate it doesn't appears to be going too high.

Can someone please point what could be potential issue ??

Thank you for your time !!

Regards,

Amrut

Labels (1)
Tags (3)
5 Replies

194 Views
amrutkulkarni
Contributor II

Hi Yiping,

Here are log of the Ethernet interface when dropped packets were being observed :

# cat /sys/kernel/debug/powerpc/fsl_dpa/eth1

        irqs    rx      tx      recycle confirm tx err  rx err  bp count

0/0     5971904 2115102 19630064        56023   6078160 0       0       24

1/1     5971799 2117102 1907757 53361   6076498 0       0       56

2/2     5974105 2115360 1876213 53352   6077498 0       0       53

3/3     5973256 2113845 1886944 53479   6078905 0       0       59

Total   23891064        8461409 25300978        216215  24311061        0       0       192

# cat /sys/devices/fsl,dpaa.23/ethernet.25/net/egiga1/statistics/tx_fifo_errors

1304942

# cat /sys/devices/fsl,dpaa.23/ethernet.25/net/egiga1/statistics/tx_dropped

1311380

Thank you !

Regards,

Amrut

0 Kudos

194 Views
amrutkulkarni
Contributor II

Hi Yiping,

Thank you for your reply & Sorry for my late response

I was trying to understand the DTS for DPAA driver but i think i'm lost

I did not find "fsl,bpool-ethernet-cfg" in my DTS file and in DPA driver as well.

Current DTS has :

                buffer-pool@0 {

                        compatible = "fsl,p4080-bpool", "fsl,bpool";

                        fsl,bpid = <0>;

                       fsl,bpool-cfg = <0 0x100 0 1 0 0x100>;

                };

Driver Has dpaa_eth.c :

bpool_cfg = of_get_property(dev_node, "fsl,bpool-cfg", &lenp);

                if (bpool_cfg && (lenp == (2 * ns + na) * sizeof(*bpool_cfg))) {

                        dpa_bp[i].count = of_read_number(bpool_cfg, ns);

                        dpa_bp[i].size  = of_read_number(bpool_cfg + ns, ns);

                        dpa_bp[i].paddr =

                                of_read_number(bpool_cfg + 2 * ns, na);

Will this be following changes are OK :

fsl,bpool-cfg = <0 256 0 192 0 0x40000000>;

Can you please help to understand what this values means ? I did not found any Freescale document regarding the DTS details :smileysad:

Currently the outbound bit-rate is around 600Mbps with packet size is less then 1500 bytes

Thank you !

Regards,

Amrut

0 Kudos

194 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Amrut,

The node "fsl,bpool-ethernet-cfg" is used in new DPAA driver, in SDK 1.1 it should be "fsl,bpool-cfg".

The property has the following meaning:

fsl,bpool-cfg = <count size base_address>;

count - represents the number of buffers from the buffer pool;

size - buffer size;

base_address - physical address of the buffer pool.

For example

bp7: buffer-pool@7 {

compatible = "fsl,b4080-bpool", "fsl,bpool";

fsl,bpid = <7>;

fsl,bpool-ethernet-cfg = < 0 256 0 192 0 0x40000000>;

};

The example above declares a buffer pool with buffer pool ID 7, and describes a pool

with 256 192-byte buffers, occupying the memory region from 0x40000000 to

0x40000000 + 256*192. The reason there are two numbers per each of count, size, and

base_address is that we support 36-bit addresses on the P4080 (and 64-bit on P5020). It

should be noted that the size of those parameters should be set by the root node's

#address-cells and #size-cells properties.

If the static buffer tool is used for transmission in your dts file, please try whether increase the buffers count or enlarge buffer size could solve this problem.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

194 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Amrut,

You could use the following command to get more information.

$mount -t debugfs nodev /sys/kernel/debug

$cat /sys/kernel/debug/powerpc/fsl_dpa/eth*


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

194 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Amrut,

I think the probable reason is not allocating enough buffer pool in the device tree.

As I suggest you previous use static configuration information in device tree to define buffer pool nodes, for example as the following, probably the buffer pool number doesn't meet your requirement.

buffer-pool@1 {

compatible = "fsl,p4080-bpool", "fsl,bpool";

fsl,bpid = <1>;

fsl,bpool-ethernet-cfg = <0 256 0 192 0 0x40000000>;

};

In this case, you could use software to manage replenishment of buffer pool.

Add the following in buffer pool definition.

fsl,bpool-thresholds = <0x8 0x20 0x0 0x0>;

The pool will enter depletion when it drops below 8 "buffers" (in this case,

FQIDs), and exit depletion when it rises above 32, if the buffer pool number is less than threshold value, the interrupt will be triggered.

In order to confirm whether this error is caused by run out of buffer, you could refer to the statistics information from /sys/devices/ffe000000.soc/ffe400000.fman/ffe490000.port/statistics/.(Please adjust the port address according to your target).

But I think probably more investigation is needed about why buffer pools are not released normally, Would you please provide more detailed information, for example an average packet size, number of packets per burst, total burst size and interval between bursts.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos