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
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.
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
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)
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...