S32G2 PFE-ETH Doubts

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

S32G2 PFE-ETH Doubts

1,609 Views
viswa_kondapall
Contributor IV

Hi ,

We are configuring PFE_MAC0/1/2 on M7.

are the below API's are correct or wrong?? please correct me.

1# HIF:

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_HIF3);  -- As 3 MACs are using then 2 different MACs need to use ?? HIF0/1/2 to PFE_MAC0/1/2 respectively -- please correct me if i am right or wrong.

2# Avtp or UDP need to use ??  my understanding is UDP API's. please correct me. with respective with HIF.

SampleApp_ConfigFilter_Avtp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC0);
SampleApp_ConfigFilter_Avtp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC1);
SampleApp_ConfigFilter_Avtp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC2);

SampleApp_ConfigFilter_Udp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC0);
SampleApp_ConfigFilter_Avtp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC1);
SampleApp_ConfigFilter_Udp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC2);

#3: Which of the destination address are correct ?? 
//uint8 dstMacAddr[] = { 0xE4, 0x54, 0xE8, 0xBC, 0xB8, 0x88 };
uint8 dstMacAddr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };

In the configuration default src_addrr(66:55:44:33:22:11) and dest_addr(ff:ff:ff:ff:ff:ff) is it correct ?? 

#4: We like to slow path ETh communication are these below APIs are correct or do we need to use ??
ProvideTxBufferResult = Eth_43_PFE_ProvideTxBuffer(ethCtrl, 0U, &BufferIndex, &bufPtr, &LengthInBytes);

Eth_43_PFE_Transmit(ethCtrl, BufferIndex, 0x0806, TRUE, LengthInBytes, dstMacAddr);

Regards,

Viswanath K

 

Tags (2)
0 Kudos
10 Replies

1,556 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @viswa_kondapall,

1. Only one HIF can be used with M7_0, HIF3 is combined with LLCE.

2. Both if them can be used it depends on your CAN2ETH routing table configuration.

3. src/dest MAC address in AVTP/UDP  also depends on your configuration.

4. If you want to know how to use PFE driver, please refer to PFE MCAL example and documentation.

 

Hope this helps.

 

Thanks,

Mayank s Patel

0 Kudos

1,548 Views
viswa_kondapall
Contributor IV

Hi Mayank,

Thank you for the reply. It helps. Understood. One point not got clarity is :

Each MAC should have 1 HIF is that correct. Like for Emac0-HIF0/EMAC1-HIF1/EMAC2-HIF2 - or who it is ??

I referred documents - not got clarity or i am not able to understand. 

AVTP/UDP:

We are switching to UDP only and going unique (can we keep our unique -- is that anything predefined in  PFE-Firmware/driver)MAC-ID's - but IP address are same 127.0.01. 

regards,

Viswa

 

Tags (2)
0 Kudos

1,539 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @viswa_kondapall ,

 

"Each MAC should have 1 HIF is that correct. Like for Emac0-HIF0/EMAC1-HIF1/EMAC2-HIF2 - or who it is ?"

No, we never documented that HIF should be combined with one specific EMAC. Where did you get this information???

For PFE MCAL driver slow path, you can only use one HIF in M7_0. 

"We are switching to UDP only and going unique (can we keep our unique -- is that anything predefined in  PFE-Firmware/driver)MAC-ID's - but IP address are same 127.0.01. "

No, there is no defined in PFE FW. you can do a test if you change the src/dest MAC address in UDP/AVTP.  

 

Thanks,

Mayank s Patel

 
0 Kudos

1,520 Views
viswa_kondapall
Contributor IV

Hi Mayank,

No, we never documented that HIF should be combined with one specific EMAC. Where did you get this information???

Its understanding from PFE-driver document block diagram.

viswa_kondapall_0-1684912294586.png

HIF is for connected or it will interface with Host cores. But we are programing CAN2ETH.

CAN packets through LLCE to PFE for this do we need to use HIF-NO COPY.??

#2 :

For PFE MCAL driver slow path, you can only use one HIF in M7_0.

it means HIF is based on CPU ?? if i want 3 MAC2 - PFE_MAC0/1/2 then HIF3 only has to for all MACs ?? or how to ?? 

regards,

Viswanath K

 

Tags (2)
0 Kudos

1,515 Views
viswa_kondapall
Contributor IV

Hi Mayank,

• Slow path forwarding is a combination of two termination traffic flows. The received
frame is passed to the Host stack which decides to forward the frame to another PFE
Physical Interface.

• Fast path forwarding is a configurable offload of the Host core stack. The frames
are forwarded between the Physical Interfaces according to configured rules without
involving the Host cores.

Difference of this : Please correct me is my understanding is right or not ??????/

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_HIF3);  Slow path 

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_EMAC2); Fast path  

Tags (2)
0 Kudos

1,510 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @viswa_kondapall,

Why do you want to enable all three ports of PFE? On an M7_0 core only one interface you can configure.

You can follow the GUIDE TO ENABLE PFE and from EB Tresos you can configure only one HIF port.

for receive CAN Packets from LLCE to PFE you need to configure the AUX interface from the EB Tresos. To enable AUX Interface you need to configure new Ethernet_Controller in EB Tresos.

 

Hope this helps.

 

Thanks,

Mayank s Patel

 

0 Kudos

1,502 Views
viswa_kondapall
Contributor IV

Hi Mayank,

Thank for reply. Very good discussion we are doing. 

1. Now i got clarity 1 CPU - 1 HIF.  We are want fast path. so i think dont need HOST interface.

2. I dont Want AUX interface. - I think AUX interface is for LLCE CAN packets to A53. through S32_PFE_FW. as per the CAN gateway block diagram. We configured to EMAC0-2 - as per PFE0-2 respectively.

3. Could you please review my point for the Slow path to fast path.

• Slow path forwarding is a combination of two termination traffic flows. The received
frame is passed to the Host stack which decides to forward the frame to another PFE
Physical Interface.

• Fast path forwarding is a configurable offload of the Host core stack. The frames
are forwarded between the Physical Interfaces according to configured rules without
involving the Host cores.

Difference of this : Please correct me is my understanding is right or not ??????/

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_HIF3);  Slow path 

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_EMAC2); Fast path  

regards,

Viswa

 

 

 

Tags (2)
0 Kudos

1,455 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @viswa_kondapall,

For Slow Path, host core intervention is needed and packet validation and forwarding will be performed by the host cores. (M7<->HIFx<->Emacx).

For Fast Path, PFE firmware will validate the packet to the destination without the involvement of host cores. 

Forwarding will decide based on the configured routing table using FCI libraries.

 

Hope this helps.

 

Thanks,

Mayank s Patel

0 Kudos

1,448 Views
viswa_kondapall
Contributor IV

Hi Mayank,

Could you please conclude it with my previous message.

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_EMAC2); -- can we do like this for fast path instead if HIF

Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_HIF3).

SampleApp_ConfigFilter_Udp(PFE_PHY_IF_ID_HIF3, PFE_PHY_IF_ID_EMAC2); instead of this 

SampleApp_ConfigFilter_Udp(PFE_PHY_IF_ID_EMAC2, PFE_PHY_IF_ID_EMAC2); is this okay ??

We are already done CAN2ETH/ETH2CAN configuration, routing table , MAC address and ip address.

regards,

Viswanath K

 

Regards,

Viswa

Tags (2)
0 Kudos

1,361 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @viswa_kondapall,

Sorry for the delay.

you can not call this function like that "Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_EMAC2)" and can't configure a fast path and a slow path using the APIs mentioned by you.

You need to create rules into the routing table using FCI APis from the host cores. Once you configure the rules, by default PFE Firmware will forward traffic by looking at entries into the routing table.

 

Hope this is clear.

 

Thanks,

Mayank s Patel

 

0 Kudos