sfc: move some ARFS code out of headers
efx_filter_rfs_expire() is a work-function, so it being inline makes no sense. It's only ever used in efx_channels.c, so move it there. While we're at it, clean out some related unused cruft. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b768315551
commit
025c5a0b58
@@ -485,6 +485,23 @@ void efx_remove_eventq(struct efx_channel *channel)
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RFS_ACCEL
|
||||
static void efx_filter_rfs_expire(struct work_struct *data)
|
||||
{
|
||||
struct delayed_work *dwork = to_delayed_work(data);
|
||||
struct efx_channel *channel;
|
||||
unsigned int time, quota;
|
||||
|
||||
channel = container_of(dwork, struct efx_channel, filter_work);
|
||||
time = jiffies - channel->rfs_last_expiry;
|
||||
quota = channel->rfs_filter_count * time / (30 * HZ);
|
||||
if (quota >= 20 && __efx_filter_rfs_expire(channel, min(channel->rfs_filter_count, quota)))
|
||||
channel->rfs_last_expiry += time;
|
||||
/* Ensure we do more work eventually even if NAPI poll is not happening */
|
||||
schedule_delayed_work(dwork, 30 * HZ);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Allocate and initialise a channel structure. */
|
||||
struct efx_channel *
|
||||
efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel)
|
||||
|
Reference in New Issue
Block a user