Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e79255de authored by Ben Hutchings's avatar Ben Hutchings
Browse files

sfc: Do not pass non-TCP packets into GRO code



GRO can handle non-TCP packets and pass them up without coalescing,
but it has to do some extra work to parse the packet which we can
bypass using the hardware parse result.  (This condition yields a
false negative for TCP/IPv6 packets received by Falcon, but its
performance is already poor in that case due to lack of checksum
offload.)

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent d07df8ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -629,7 +629,7 @@ void __efx_rx_packet(struct efx_channel *channel)
	if (unlikely(!(efx->net_dev->features & NETIF_F_RXCSUM)))
	if (unlikely(!(efx->net_dev->features & NETIF_F_RXCSUM)))
		rx_buf->flags &= ~EFX_RX_PKT_CSUMMED;
		rx_buf->flags &= ~EFX_RX_PKT_CSUMMED;


	if (!channel->type->receive_skb)
	if ((rx_buf->flags & EFX_RX_PKT_TCP) && !channel->type->receive_skb)
		efx_rx_packet_gro(channel, rx_buf, channel->rx_pkt_n_frags, eh);
		efx_rx_packet_gro(channel, rx_buf, channel->rx_pkt_n_frags, eh);
	else
	else
		efx_rx_deliver(channel, eh, rx_buf, channel->rx_pkt_n_frags);
		efx_rx_deliver(channel, eh, rx_buf, channel->rx_pkt_n_frags);