-
Notifications
You must be signed in to change notification settings - Fork 8.1k
DSA PTP support #95054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSA PTP support #95054
Conversation
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
e2f8d57
to
c8038a3
Compare
Updated to fix twister issues. |
return eth_api_conduit->send(dev_conduit, dsa_pkt); | ||
ret = eth_api_conduit->send(dev_conduit, dsa_pkt); | ||
if (ret != 0) { | ||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be other way around i.e., if ret == 0
(so send was successfull) we just return, and if there was an error ret != 0
, we unref the clone?
Or even simpler
ret = eth_api_conduit->send(dev_conduit, dsa_pkt);
if (ret != 0) {
net_pkt_unref(clone);
}
return ret;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the unref is needed when failed.
I think for the clone pkt sent through ethernet_api->send, there should be unref to release no matter the result is success or not. Will fix.
Thanks.
6e0e82b
to
d8a2a80
Compare
Updated to v4. Changes include,
Thanks. |
Updated hal_nxp to support netc switch ptp. Signed-off-by: Yangbo Lu <[email protected]>
Moved dsa_tag_netc.h to public include directory for devices reusing. Signed-off-by: Yangbo Lu <[email protected]>
Supported tagger data and connecting device to tag protocol, so that some device specific work could be handled. Signed-off-by: Yangbo Lu <[email protected]>
Allowed ptp-clock property for dsa. Signed-off-by: Yangbo Lu <[email protected]>
Added PTP solution in core driver. Now only gPTP was supported. - ethernet_api like get_capabilities and get_ptp_clock were supported in port driver. - For TX timestamp, added new dsa_api port_txtstamp for device to handle. Device driver might put pkt in queue, and reported timestamp after completing transmitting on hardware. - For RX timestamp, the timestamp could be given to pkt in tag driver or device driver. Signed-off-by: Yangbo Lu <[email protected]>
Supported common usage of control block for any layer. Signed-off-by: Yangbo Lu <[email protected]>
Supported PTP timestamping in netc tag driver. Signed-off-by: Yangbo Lu <[email protected]>
PTP clock may be enabled per Ethernet port. Especially pseudo port for switch management does not need PTP clock. Signed-off-by: Yangbo Lu <[email protected]>
Supported receiving more types frames. One was TX timestamp response frame and the other one is RX timestamped frame which were for switch port. Signed-off-by: Yangbo Lu <[email protected]>
Supported PTP timestamping. Now only gPTP was supported. Signed-off-by: Yangbo Lu <[email protected]>
Added imx943_evk_mimx94398_m33_ddr support. Signed-off-by: Yangbo Lu <[email protected]>
d8a2a80
to
9b9f878
Compare
Rebased to address conflicts. |
|
This PR is to support DSA PTP. (Now only gPTP is supported)
Also enabled i.MX943 gPTP sample for testing. gPTP on all 5 ports on i.MX943 (2 DSA switch ports and 3 ENETC ports) worked fine.
There is a hal_nxp dependency:
Thanks a lot.