DPAA+shared interface

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DPAA+shared interface

2,619 Views
sharath_dm
Contributor I

Hi,

I am trying to configure interface in shared mode on p2041 custom board

the transmission is getting faied and the error counters is incremented

boot time log

fsl_mac: mac.c:416:mac_load() fsl_mac: FSL FMan MAC API based driver ()
fsl_mac b04e0000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac b04e0000.ethernet: FMan MAC address: 00:00:0e:46:11:fd
fsl_mac b04e2000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac b04e2000.ethernet: FMan MAC address: 00:00:0e:46:12:fd
fsl_mac b04e4000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac b04e4000.ethernet: FMan MAC address: 00:00:0e:46:13:fd
fsl_mac b04e6000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac b04e6000.ethernet: FMan MAC address: 00:00:0e:46:14:fd
fsl_mac b04e8000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac b04e8000.ethernet: FMan MAC address: 00:00:0e:46:15:fd
fsl_dpa: FSL DPAA Ethernet driver ()
fsl_dpa: Probed interface eth0
fsl_dpa: Probed interface eth1
fsl_dpa_shared: FSL DPAA Shared Ethernet driver ()
fsl_dpa_shared: Probed shared interface eth2
fsl_dpa_proxy: FSL DPAA Proxy initialization driver ()
fsl_oh: FSL FMan Offline Parsing port driver ()
fsl_oh dpa-fman0-oh.17: Found OH node handle compatible with fsl,dpa-oh.
fsl_oh dpa-fman0-oh.17: OH port /soc@0b0000000/fman@400000/port@82000 has no buffer pool. Fragmentation will not be enabled
fsl_oh dpa-fman0-oh.17: OH port /soc@0b0000000/fman@400000/port@82000 enabled.
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.

ifconfig command run on the shared interface

root@p2041rdb:~# ifconfig eth2
eth2 Link encap:Ethernet HWaddr 00:00:0E:46:11:FD
inet addr:192.168.15.5 Bcast:192.168.15.255 Mask:255.255.255.0
inet6 addr: fe80::200:eff:fe46:11fd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:6 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:b04e0000-b04e0fff

root@p2041rdb:~#
root@p2041rdb:~#
root@p2041rdb:~# cat /sys/devices/fsl,dpaa.11/ethernet.12/net/eth2/device_type
root@p2041rdb:~#
root@p2041rdb:~# cat /sys/devices/fsl,dpaa.11/ethernet.12/net/eth2/device_type
sharedroot@p2041rdb:~#

DTB/DTS entry

ethernet@0 {
compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet-shared";
fsl,fman-mac = <0x24>;
fsl,bman-buffer-pools = <&bp17>;
fsl,qman-frame-queues-rx = <0x50 0x1 0x51 0x1 0x210 3>;
fsl,qman-frame-queues-tx = <0x0 0x1 0x0 0x1 0x200 8>;
};


bp17: buffer-pool@17 {
compatible = "fsl,p2041-bpool", "fsl,bpool";
fsl,bpid = <17>;
fsl,bpool-ethernet-cfg = <0 2048 0 1728 0 0>;
fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
};

can someone point how debug this issue

-Sharath

0 Kudos
Reply
3 Replies

1,936 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Sharath,

In the dts file, please refer to the following definition for the shared mac interface.

     compatible = "fsl,p2041-dpa-ethernet-shared", "fsl,dpa-ethernet-shared";

According to the Kernel boot log, it seem that the shared_mac interface has already been set up successfully.

How did you use the Shared_MAC interface? Have you set up the USDPAA application to seed the buffer pool.

Would you please display the buffer pool information with the following command?

# cat /sys/devices/platform/ffe000000.soc/ffe31a000.bman/pool_count/17

Here is an example about how to ping shared-mac interface on T2080RDB, please change the configuration and policy files according to your target board. Here fm1-mac9 is the shared_mac interface and the IP address has already been specified in the policy file.

root@t2080rdb:/usr/etc# ifconfig fm1-mac9 192.168.2.104
root@t2080rdb:/usr/etc# fmc -c usdpaa_config_t2_serdes_66_15_22g.xml -p usdpaa_policy_hash_shared_mac_ipv4.xml -a
root@t2080rdb:/usr/etc# ipfwd_app 7 -b 1600:1600:1600 -c usdpaa_config_t2_serdes_66_15_22g.xml -p usdpaa_policy_hash_shared_mac_ipv4.xml -d 0x10000000
Found /fsl,dpaa/ethernet@0, Tx Channel = 802, FMAN = 0, Port ID = 1
Found /fsl,dpaa/ethernet@1, Tx Channel = 803, FMAN = 0, Port ID = 2
Found /fsl,dpaa/ethernet@3, Tx Channel = 805, FMAN = 0, Port ID = 4
Found /fsl,dpaa/ethernet@9, Tx Channel = 801, FMAN = 0, Port ID = a
Found /fsl,dpaa/ethernet@2, Tx Channel = 804, FMAN = 0, Port ID = 3
Found /fsl,dpaa/ethernet@10, MAC-LESS node
Configuring for 3 network interfaces
Allocated DMA region size 0x10000000
cpu hotplug daemon not running: No such file or directory
ipfwd_app starting
Message queue to send: /mq_snd_1904
Message queue to receive: /mq_rcv_1904
Configured 1G port @ FMAN:0, MAC:4 as IF_IDX:4
Configured 10G port @ FMAN:0, MAC:10 as IF_IDX:90
Configured 1G port @ FMAN:0, MAC:3 as IF_IDX:3
Released 1600 bufs to BPID 7
Released 1600 bufs to BPID 8
Released 1600 bufs to BPID 9
Released 1600 bufs to BPID 17
Data stashing: Enabled
Thread uid:0 alive (on cpu 7)

ping from the PC:
b25805@star:~$ ping 192.168.2.104
PING 192.168.2.104 (192.168.2.104) 56(84) bytes of data.
64 bytes from 192.168.2.104: icmp_seq=10 ttl=64 time=0.504 ms
64 bytes from 192.168.2.104: icmp_seq=11 ttl=64 time=0.237 ms
64 bytes from 192.168.2.104: icmp_seq=12 ttl=64 time=0.188 ms
64 bytes from 192.168.2.104: icmp_seq=13 ttl=64 time=0.238 ms
64 bytes from 192.168.2.104: icmp_seq=14 ttl=64 time=0.238 ms


Have a great day,
TIC

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

0 Kudos
Reply

1,936 Views
sharath_dm
Contributor I

thanks for the reply Yiping

so currently just after the system boot, i am trying to ping using the shared interace.

i have not run fmc application. i have not run the usdpaa application

is it that ping will work only after running fmc and usdpaa application.

can you run "ifconfig fm1-mac9 192.168.2.104" and "ifconfig fm1-mac9" before running fmc and ipfwd_app and shared the output. do you see any errors in Tx counters?

root@p2041rdb:~# od -x /proc/device-tree/buffer-pool@17/fsl,bpool-thresholds
0000000 0000 0100 0000 0300 0000 0000 0000 0000
0000020
root@p2041rdb:~# od -x /proc/device-tree/buffer-pool@17/fsl,bpool-ethernet-cfg
0000000 0000 0000 0000 0800 0000 0000 0000 06c0
0000020 0000 0000 0000 0000
0000030
root@p2041rdb:~#
root@p2041rdb:~# cat /sys/devices/b0000000.soc/b031a000.bman/pool_count/17
0
root@p2041rdb:~#

root@p2041rdb:~# ifconfig eth2
eth2 Link encap:Ethernet HWaddr 00:00:0E:46:11:FD
inet addr:192.168.15.5 Bcast:192.168.15.255 Mask:255.255.255.0
inet6 addr: fe80::200:eff:fe46:11fd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:6 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:b04e0000-b04e0fff

buffer-pool@17 entry in dts

bp17: buffer-pool@17 {
compatible = "fsl,p2041-bpool", "fsl,bpool";
fsl,bpid = <17>;
fsl,bpool-ethernet-cfg = <0 2048 0 1728 0 0>;
fsl,bpool-thresholds = <0x100 0x300 0x0 0x0>;
};

0 Kudos
Reply

1,936 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello sharath kumar,

It is mandatory to run fmc and USDPAA application first to allocate and seed buffer pools for the shared MAC interface, then Linux side can use it.

In addition, the IP address for the shared MAC interface should be coincident with the shard-MAC policy section addressed in usdpaa_policy_hash_shared_mac_ipv4.xml.


Have a great day,
TIC

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

0 Kudos
Reply