sfc: Allow efx_channel_type::receive_skb() to reject a packet

Instead of having efx_ptp_rx() call netif_receive_skb() for an invalid
PTP packet, make it return false for rejected packets and have
efx_rx_deliver() pass them up.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
Ben Hutchings
2013-03-05 20:13:54 +00:00
parent 86c2da58a7
commit 4a74dc65e3
3 changed files with 14 additions and 14 deletions

View File

@@ -575,12 +575,14 @@ static void efx_rx_deliver(struct efx_channel *channel,
/* Record the rx_queue */
skb_record_rx_queue(skb, channel->rx_queue.core_index);
/* Pass the packet up */
if (channel->type->receive_skb)
channel->type->receive_skb(channel, skb);
else
netif_receive_skb(skb);
if (channel->type->receive_skb(channel, skb))
goto handled;
/* Pass the packet up */
netif_receive_skb(skb);
handled:
/* Update allocation strategy method */
channel->rx_alloc_level += RX_ALLOC_FACTOR_SKB;
}