-----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:
quoted
quoted
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