LS1043ARDB Complex scenario: sharing a MAC device between Linux stack and user space framework besides offloading some traffic

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

LS1043ARDB Complex scenario: sharing a MAC device between Linux stack and user space framework besides offloading some traffic

599 Views
patronixys
Contributor I

I’m trying to understand how can I take advantage of the DPAA1 features on a LS1043ARDB board using LSDK 19.06 in order to share a MAC device between the Linux network stack and a user space framework that bypasses the Linux stack (considering a single Linux partition). Moreover, I have to offload a part of the traffic between two ports directly in FMan without involving any CPU core (as described in this post https://community.nxp.com/message/1188817 “Ethernet port cross-connect using FMC”, but in my case might not be appropriate the Private/Upstream DPAA Ethernet driver because some packet processing was intended to be done in user space).

I found in older LSDKs a couple of DPAA Ethernet drivers which are not described any more in LSDK 19.06. I’m referring especially to the Shared and the Proxy DPAA Ethernet Drivers, even though the latter appears implicitly in the 9.2.4.2 paragraph (it is specified as a device tree parameter needed to be set for running DPDK: compatible = "fsl,dpa-ethernet-init").

Please help me understand if it is possible with LSDK 19.06 to configure/implement separately or in parallel the two purposes (sharing a MAC device and the traffic offload)!


In order to describe my current understanding of some possible first steps, I will disregard the sharing part. I’ll consider a scenario in which the most of the packets are forwarded in user space between two MAC ports, while a specific part of the traffic is directly offloaded in FMan. Let’s say DPDK is the solution for bypassing the Linux network stack (DPDK being the recommended solution for replacing the old USDPAA).

In order to prepare my questions I’ll include two base_TX_*_mac specific parameters in the following part of the device tree configuration (considering “Proxy DPAA Ethernet Driver”, a static buffer pool and one static defined standard TX queue per port intended to be used by the offloading part):

bp1: buffer-pool@1 {
  compatible = ""fsl,bpool";
  fsl,bpid = <1>;
  fsl,bpool-ethernet-cfg = <0 0 0 192 0 0xdeadbeef>;
  fsl,bpool-thresholds = <0x400 0xc00 0x0 0x0>;
  dma-coherent;
};

fsl,dpaa { ...
  ethernet@1 {
    compatible = "fsl,dpa-ethernet-init";
    fsl,bman-buffer-pools = <&bp1>;
    fsl,qman-frame-queues-rx = <0x52 1 0x53 1>;
    fsl,qman-frame-queues-tx = <0x72 1 0x73 1 base_TX_first_mac 1>;
  };
  ethernet@2 {
    compatible = "fsl,dpa-ethernet-init";
    fsl,bman-buffer-pools = <&bp1>;
    fsl,qman-frame-queues-rx = <0x5a 1 0x5b 1>;
    fsl,qman-frame-queues-tx = <0x7a 1 0x7b 1 base_TX_second_mac 1>;
  };
};
“.


Now in the policy file I consider the first distribution assigned to DPDK and the default one (second one) to the offloading part:

<distribution name="dpdk_first">
  <queue count="1" base="0x400"/>
    <key>
      <fieldref name="ipv4.src"/>
      <fieldref name="ipv4.dst"/>
    </key>
</distribution>

<distribution name="default_offload_first">
  <queue count="1" base="base_TX_second_mac"/>
</distribution>

<policy name="policy_name_first_mac">
  <dist_order>
    <distributionref name="dpdk_first"/>
    <distributionref name="default_offload_first"/>
  </dist_order>
</policy>
“.


Help me please regarding the following questions:


Q1:
Considering that I tested some DPDK applications/examples with the “dpdk_first” distribution and everything worked fine (with a default distribution with the same FQID base 0x400, namely a generic default distribution instead of “default_offload_first”), is it correct and is it enough to use the "default_offload_first" distribution for offloading the forwarding of the remaining traffic that did not fall in the "dpdk_first" distribution? So the purpose is to use FMan only (no CPU cycles involved) to forward the remaining traffic come on the RX port of the first MAC to the TX port of the second MAC by offload.


Q2:
Should I take into account a specific range address in line with the defined buffer pool for setting the base_TX_second_mac?


Q3:
Considering that the offloading part is mandatory and the sharing part is optional, is any possibility to do the sharing part in conjunction with/besides the offloading part? I’m asking this especially because LSDK 19.06 doesn’t mention the Shared DPAA Ethernet Driver.


Best regards,
Florin

0 Kudos
1 Reply

520 Views
bpe
NXP Employee
NXP Employee


All advanced DPAA Ethernet drivers except for Private Ethernet, are
no longer supported in the free LSDK. The driver code that implements
these features is retained, however, support to custom use scenarios
that utilize them is only provided via  Paid Support services:

https://www.nxp.com/support/support/nxp-engineering-services:SW-SUPPORT


Have a great day,
Platon

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos