Hi team,
We encountered an issue with NETC transmission when the confirmation and transmission functions are called from two separate tasks:
After running this example for some time(a few minutes), the TX buffer cannot be obtained.
Found that all TX buffers are not being released because the condition below is never met:
buff == Netc_Eth_Ip_apxState[ctrlIndex]->TxDataBuffAddr[ring][LastDescrCheckIndex], as shown in the picture below.
This example is in cohort 2 VIP application within SW32N5_GRAYVIP_1_0_22_0.
Software: SW32N_RTD_R21-11_1.8.0_CD05 + SW32N5_GRAYVIP_1_0_22_0
Hardware: S32N55 RDB
Best regards,
Tangsheng.
Hi @Tangsheng_Zhou ,
I don't work in GrayVip and can't control how their project operates, so please provide some information, you can read it at same time with information that was attached in the previous question, (like when lastTxBd = 14 but buff = 16).
- Can you read fully Netc_Eth_Ip_apxState[], all of information relate to Tx such as: Tx ring size,...
- Can you read Eth_43_NETC_axTransmissionRequests[CtrlIdx][FifoIdx]
- What sequence did you call for each task? such as checking status of ProvideTx before calling Transmit,...
Best regards,
Nhi
Hi @Nhi_Nguyen
Thanks so much for your explain.
I agree with you. I tried to capture the issue moment, but failed.
I understand that the function is non reentrant.
My understanding of "non reentrant": non-reentrant means the function cannot be called again before it finishes execution. However, it can still be interrupted by other threads, as long as those threads do not call the same function.
My understanding is: Non-reentrant ≠ Non-interruptible
At present, the function Eth_43_NETC_TxConfirmation is not interruptible by thread calls such as Provide_TxBuf or Transmit.
Should this design be considered acceptable, or is it necessary to introduce safeguards for key shared variables?
Best regards.
Tangsheng.
Hi @Tangsheng_Zhou ,
I looked at the definition of reentrance function and I agree with you. I raised the ticket ARTDCC1-494 to SW team. You can follow this ticket to know the status.
Best regards,
Nhi
Ok, thanks a lot for your support.
Best regards,
Tangsheng.