🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Jakub Kicinski Sat, 21 Nov 2026 00:46
Re: [PATCH net-next] net: stmmac: xgmac: Report the VLAN tag type from the descriptor
#20040
Author: Jakub Kicinski
Date: Sat, 21 Nov 2026 00:46
24 lines
9186 bytes
On Wed, 18 Nov 2026 17:21:34 +0100 Maxime Chevallier wrote:
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
> @@ -209,8 +209,12 @@ static void vlan_rx_hw(struct mac_device_info *hw,
>  {
>  	if (hw->desc->get_rx_vlan_valid(rx_desc)) {
>  		u16 vid = hw->desc->get_rx_vlan_tci(rx_desc);
> +		u16 proto = ETH_P_8021Q;
>  
> -		__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
> +		if (hw->desc->get_rx_vlan_proto)
> +			proto = hw->desc->get_rx_vlan_proto(rx_desc);
> +
> +		__vlan_hwaccel_put_tag(skb, htons(proto), vid);

Heh, this function now does 3 indirect calls to get the info about 
the stripped vlan. Isn't this slower than disabling the offload and
stripping in SW at this point? Maybe the low-end CPUs are very
different :) Or there's something else I'm missing?

(not really expecting you to do any digging, to be clear, just found
the level of complexity in SW to support a trivial HW offload kinda
funny)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads