简体   繁体   中英

DPDK SRIOV multiple vlan traffic over single VF of SRIOV passthrough

When trying to use RTE API 's for VLAN offload and VLAN filtering I observe that both VLAN tagged and untagged packets are being sent out.

API's used:

rte_eth_dev_set_vlan_offload ,
rte_eth_dev_vlan_filter

DPDK - 18.08
RHEL - 7.6
Driver - igb_uio

Is there a way to allow only VLAN tagged packets to be sent out?

Regards,

Not sure if I understand correctly - you're trying to strip vlan tags from tx packets? Why would you want to offload that? If you forward packets from somewhere else they already have their tags stripped by rx offload. If you create them yourself, well - you're in control.

Regardless, if you'd want to offload tx vlan insertion :

rte_eth_dev_set_vlan_offload only sets RX offload flags.

You'll probably have to set the tx offload flag in your port config manually, like in this abridged snippet from the DPDK Flow Filtering example code:

struct rte_eth_conf port_conf = {
    .txmode = {
        .offloads =
            DEV_TX_OFFLOAD_VLAN_INSERT,
    },
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM