sfc: support unicast PTP
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest4 patches 1 replyIn review 3 of 4 applied
- v54 patches 5 repliesSuperseded
- v4 posting 2/24 patches 8 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 posting 1/2 | 4 patches | 9 replies | Superseded | |
| v3 | 4 patches | 1 reply | Superseded | |
| v2 | 4 patches | 9 replies | Superseded | |
| v1 | 4 patches | 0 replies | Superseded |
Changes in v6 from the cover letter
- added missing kdoc for work_cleanup
- added missing +1 in queue_delayed_work delay argument
Patches in v6 3 of 4 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | sfc: store PTP filters in a listdrivers/ | +52 | 0 replies | Applied |
| 2/4 | sfc: allow insertion of filters for unicast PTPdrivers/ | +36 | 0 replies | Applied |
| 3/4 | sfc: support unicast PTPdrivers/ | +98 | 0 replies | |
| 4/4 | sfc: remove expired unicast PTP filtersdrivers/ | +72 | 0 replies | Applied |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Edward Cree |
|---|---|
| Series | R-b |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 net-next 0/4] sfc: support unicast PTP
Unicast PTP was not working with sfc NICs.
The reason was that these NICs don't timestamp all incoming packets, but instead they only timestamp packets of the queues that are selected for that. Currently, only one RX queue is configured for timestamp: the RX queue of the PTP channel. The packets that are put in the PTP RX queue are selected according to firmware filters configured from the driver.
Multicast PTP was already working because the needed filters are known in advance, so they're inserted when PTP is enabled. This patches add the ability to dynamically add filters for unicast addresses, extracted from the TX PTP-event packets.
Since we don't know in advance how many filters we'll need, some info about the filters need to be saved. This will allow to check if a filter already exists or if a filter is too old and should be removed.
Note that the previous point is unnecessary for multicast filters, but I've opted to change how they're handled to match the new unicast's filters to avoid having duplicate insert/remove_filters functions, once for each type of filter.
Tested: With ptp4l, all combinations of IPv4/IPv6, master/slave and unicast/multicast
v2:
- fixed missing IS_ERR
- added doc of missing fields in efx_ptp_rxfilter
v3:
- dropped pointless static inline in source file
- removed the now unused PTP_RXFILTERS_LEN
- follow reverse xmas tree convention in xmit_skb_mc
- pass expiry as argument to the insert_filter functions and keep returning an integer error code from them, and not pointers, as suggested by Martin
- moved the unicast filters expiration check to the end of the worker function to avoid increasing TX latency, as suggested by Martin
- added check to avoid inserting unicast filters when doing multicast PTP
v4:
- fixed filter leak, catched by Edward
v5: per Edward's suggestions:
- moved local variable declaration from patch 4 to patch 2
- changed argument variable names ptp_list for more descriptive filter_list
- don't remove unicast filter if one insertion fails: they're still valid
- run unicast filters cleanup in dedicated work every 30s if there are active filters. This avoid having to check for expiration on every PTP TX packet. It also allows to cleanup the filters if PTP operations have stopped.
v6:
- added missing kdoc for work_cleanup
- added missing +1 in queue_delayed_work delay argument
Íñigo Huguet (4):
sfc: store PTP filters in a list
sfc: allow insertion of filters for unicast PTP
sfc: support unicast PTP
sfc: remove expired unicast PTP filters
drivers/net/ethernet/sfc/ptp.c | 274 +++++++++++++++++++++++++++------ 1 file changed, 226 insertions(+), 48 deletions(-)
--
2.39.2