[dpdk-dev] [PATCH 1/3] net/netvsc: support receive without vlan strip

Ferruh Yigit ferruh.yigit at intel.com
Mon Dec 17 11:27:03 CET 2018


On 12/14/2018 4:28 PM, Stephen Hemminger wrote:
> On Fri, 14 Dec 2018 16:09:33 +0000
> Ferruh Yigit <ferruh.yigit at intel.com> wrote:
> 
>> On 12/14/2018 1:26 AM, Stephen Hemminger wrote:
>>> In some cases, VLAN stripping is not desireable. If necessary
>>> re-insert stripped vlan tag.
>>>
>>> Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>  
>>
>> <...>
>>
>>> @@ -501,6 +501,14 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
>>>  	if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) {
>>>  		m->vlan_tci = info->vlan_info;
>>>  		m->ol_flags |= PKT_RX_VLAN_STRIPPED | PKT_RX_VLAN;
>>> +
>>> +		/* NDIS always strips tag, put it back if necessary */
>>> +		if (!hv->vlan_strip && rte_vlan_insert(&m)) {  
>>
>> Should 'PKT_RX_VLAN_STRIPPED' flag removed when vlan inserted back?
> 
> This is already done by rte_vlan_insert()

Yes it does, so it is OK.


More information about the dev mailing list