# RE: \[net-next 07/12\] ixgbe: Enable timesync clock-out feature for PPS support on X540

- From: Keller, Jacob E \<jacob.e.keller@intel.com\>
- Date: 2012-05-11 18:09:14 
- List: netdev
- Page: https://ratatoskr.run/netdev/2012/05/10895070
- Thread: https://ratatoskr.run/netdev/2012/05/10894936/t.md

```text
> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@gmail.com]
> Sent: Thursday, May 10, 2012 10:36 PM
> To: Keller, Jacob E
> Cc: Kirsher, Jeffrey T; davem@davemloft.net; <redacted>;
> gospo@redhat.com; sassmann@redhat.com
> Subject: Re: [net-next 07/12] ixgbe: Enable timesync clock-out feature for PPS
> support on X540
> 
> On Thu, May 10, 2012 at 09:54:52PM +0000, Keller, Jacob E wrote:
> > > Since this function is called in every interrupt, I would check this
> > > flag first thing.
> > >
> > Not sure what you mean? Check this before checking the other interrupts?
> > I can do that.
> 
> I only meant that, assuming that the other interrupt sources are much more
> frequent than the PPS, the normal case will be that the PPS flag is not set.
> 
> It would be more efficient (that is, shorter ISR code path in normal
> case) to check the flag first, perhaps like this.
> 
> ixgbe_intr()
> {
> 	...
> #ifdef CONFIG_IXGBE_PTP
> 	if (eicr & IXGBE_EICR_TIMESYNC)
> 		ixgbe_ptp_check_pps_event(adapter, eicr); #endif
> 	...
> }

Ok. This makes sense. :) Check the flag before checking the hardware type.

- Jake

> 
> Thanks,
> Richard
```
