Re: [PATCH net] sfc: skip ptp allocations on secondary interfaces

From: Jarod Wilson
Date: Fri Dec 16 2016 - 10:48:25 EST


On 2016-12-15 3:31 PM, Jarod Wilson wrote:
Rather than allocating efx_ptp_data, a buffer, a workqueue, etc., and then
ultimately deciding not to call ptp_clock_register() for non-primary
interfaces, just exit out of efx_ptp_prober() earlier. Saves a little
memory and speeds up init and teardown slightly.

CC: linux-net-drivers@xxxxxxxxxxxxxx
CC: Edward Cree <ecree@xxxxxxxxxxxxxx>
CC: Bert Kenward <bkenward@xxxxxxxxxxxxxx>
CC: netdev@xxxxxxxxxxxxxxx
Signed-off-by: Jarod Wilson <jarod@xxxxxxxxxx>

Self-Nak on this one. Talking to Bert off-list, he pointed out that the driver uses the PTP structure allocated here for the secondary interface to do internal time-stamping and the like. While it might be ideal not to intermingle PTP structs with non-PTP work, disabling this right now is obviously a non-starter.

--
Jarod Wilson
jarod@xxxxxxxxxx