In our project, we would like to share a single ethernet port with the same IP address and MAC address (efuse MAC) for all cores (ARM & DSP) and then use the Packet Accelerator to route packets to specific cores based on different criteria such as UDP port #s and custom header data.
But in our initial testing, we are seeing that the Linux kernel running on the ARM (Processor SDK 03.00.00.04) is setting it's own rules in the Packet Accelerator to basically send all packets with the destination MAC address matching the efuse MAC address into its own RX queue. Here is an excerpt from the Linux kernel logs (with dynamic debug printing enabled) showing PA rules being set for the efuse MAC address:
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: pa_open() called for port: 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: configuring data receive flow 22, queue 528
...
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: ethss adding address ff:ff:ff:ff:ff:ff, type 4
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: pa_add_addr, port 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: add mac, index 0, smac (null), dmac ff:ff:ff:ff:ff:ff, rule 2,
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: type 0000, port 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: buflen = 164(a4), cmd_size 120
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: waiting for command transmit complete
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: ethss adding address b4:99:4c:91:52:71, type 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: command response complete
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: pa_rx_compl_work_handler - end
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: pa_add_addr, port 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: add mac, index 1, smac (null), dmac b4:99:4c:91:52:71, rule 1,
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: type 0800, port 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: buflen = 164(a4), cmd_size 120
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: waiting for command transmit complete
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: add mac, index 2, smac (null), dmac b4:99:4c:91:52:71, rule 1,
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: command response complete
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: type 86dd, port 1
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: pa_rx_compl_work_handler - end
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: buflen = 164(a4), cmd_size 120
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: waiting for command transmit complete
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: add mac, index 3, smac (null), dmac b4:99:4c:91:52:71, rule 2,
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: command response complete
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: pa_rx_compl_work_handler - end
Jul 08 23:07:53 k2l-evm kernel: netcp-1.0 2620110.netcp: type 0000, port 1
So when our application code runs on either the ARM or DSP cores and calls into the PA LLD to set its own rules using this same efuse MAC address, they will always be ignored since the rules set by the Linux kernel are set first.
So is there any way to be able to insert our PA rules ahead of the rules set by the kernel so that they can be used to route packets into our own Rx queues?
Or is there some other preferred method for using the PA to route packets to the various cores when Linux is running on the ARM?