Re: [xdp-hints] Re: [RFC bpf-next v2 09/24] xdp: Add VLAN tag hint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jakub Kicinski <kuba@xxxxxxxxxx>
Date: Wed, 4 Oct 2023 11:08:50 -0700

> On Tue, 3 Oct 2023 15:09:39 +0200 Alexander Lobakin wrote:
>>> Sorry for a random chime-in but was there any discussion about 
>>> the validity of VLAN stripping as an offload?
>>>
>>> I always thought this is a legacy "Windows" thing which allowed
>>> Windows drivers to operate on VLAN-tagged networks even before
>>> the OS itself understood VLANs...  Do people actually care about
>>> having it enabled?  
>>
>> On MIPS routers, I actually have some perf gains from having it enabled.
>> So they do, I'd say. Mediatek even has DSA tag stripping. Both save you
>> some skb->data push-pulls, csum corrections when CHECKSUM_COMPLETE, skb
>> unsharing in some cases, reduce L3/L4 headers cacheline spanning etc.
> 
> No unsharing - you can still strip it in the driver.

Nobody manually strips VLAN tags in the drivers. You either have HW
stripping or pass VLAN-tagged skb to the stack, so that skb_vlan_untag()
takes care of it.

> Do you really think that for XDP kfunc call will be cheaper?

Wait, you initially asked:

* discussion about the validity of VLAN stripping as an offload?
* Do people actually care about having it enabled?

I did read this as "do we still need HW VLAN stripping in general?", not
only for XDP. So I replied for "in general" -- yes.
Forcefully disabling stripping when XDP is active is obscure IMO, let
the user decide.

Thanks,
Olek




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux