LS1043 dpaa core affinity

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LS1043 dpaa core affinity

1,054 次查看
jiafang
Contributor I

Hi,

My fm1-emac2 works as Linux kernel driver, I want that all the ipv4 packet from fm1-emac2 is handled by cpu core 3.

Right now, I use the fsl-ls1043a-rdb-usdpaa.dtb and I removed the device tree node.

ethernet@1 { compatible = "fsl,dpa-ethernet-init";...) 

Do you know what else setting need to do ?

Thanks

0 项奖励
回复
7 回复数

1,007 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Yes, If removed the ethernet node that corresponds to fm1-mac2 in fsl-ls1043a-rdb-usdpaa.dtb, fm1-mac2 port will be assigned to Linux.
Also need to modify the usdpaa_config_ls1046.xml by removing the corresponding port entry as below.
<port type="MAC" number="3" policy="hash_ipsec_src_dst_spi_policy_mac2"/>

All ipv4 packet from fm1-mac2 is handled by core 3, maybe try to do IRQ interrupts affinity to core 3.

0 项奖励
回复

999 次查看
jiafang
Contributor I
Hi, thanks for your reply.
>IRQ interrupts affinity to core 3
Do you mean which IRQ ?
From the /proc/interrupt result:
32: 0 0 0 17600 GICv2 216 Level QMan portal 3
33: 0 0 17623 0 GICv2 218 Level QMan portal 2
34: 0 17642 0 0 GICv2 220 Level QMan portal 1
35: 17613 0 0 0 GICv2 222 Level QMan portal 0
It seems like the cpu 3 will handle "QMan portal 3", how can I set my flow to use the "QMan portal 3" ?
0 项奖励
回复

879 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please use below pcd configurations
config file:
<port type="MAC" number="2" policy="fm_policy_2"/>

policy file:

<distribution name="ipv4eth2">
<queue count="1" base="0x3883"/>
<key>
<fieldref name="ipv4.src"/>
<fieldref name="ipv4.dst"/>
<fieldref name="ipv4.tos"/>
</key>
</distribution>


here is my test log:

19:33:54 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
19:33:55 all 0.00 0.00 0.00 0.00 0.75 10.03 0.00 0.00 0.00 89.22
19:33:55 0 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 99.00
19:33:55 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:55 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:55 3 0.00 0.00 0.00 0.00 2.02 40.40 0.00 0.00 0.00 57.58

19:33:55 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
19:33:56 all 0.00 0.00 0.00 0.00 0.50 10.03 0.00 0.00 0.00 89.47
19:33:56 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:56 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:56 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:56 3 0.00 0.00 0.00 0.00 2.02 40.40 0.00 0.00 0.00 57.58

19:33:56 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
19:33:57 all 0.00 0.00 0.00 0.00 0.50 10.03 0.00 0.00 0.00 89.47
19:33:57 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:57 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:57 2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
19:33:57 3 0.00 0.00 0.00 0.00 2.02 40.40 0.00 0.00 0.00 57.58

0 项奖励
回复

873 次查看
jiafang
Contributor I
Thanks for your suggestion.
If I use "<queue count="128" base="14464"/>", would it be working ?
0 项奖励
回复

869 次查看
yipingwang
NXP TechSupport
NXP TechSupport

The base is dedicated for each fman port, see details in LSDK UG.

Interface FQID base LS1043A LS1046A
fm1-mac1 0x3800 Y
fm1-mac2 0x3880 Y

Actually, if using single core, one queue is enough.

BTW, the FQ base should be complied with below code

#define DPAA_ETH_PCD_FQ_BASE(device_addr) \
(((device_addr) & 0x1fffff) >> 6)

0 项奖励
回复

862 次查看
jiafang
Contributor I
>Actually, if using single core, one queue is enough.
since I want to "All ipv4 packet from fm1-mac2 is handled by only core 3", then I should use one queue, right ?
>fm1-mac2 0x3880 Y
One more question, why you use 0x3883(14467), not 0x3880(14464) ?
0 项奖励
回复

825 次查看
yipingwang
NXP TechSupport
NXP TechSupport

The 4 cores will be steered from 0x3880, that's mean 0x3880 will be used for core 0, 0x3881 for core 1, 0x3882 for core 2, 0x3883 for core 3, 0x3884 for core 0...

0 项奖励
回复