[dpdk-dev] [PATCH 06/14] net/enic: add devarg to specify ingress VLAN rewrite mode
Ferruh Yigit
ferruh.yigit at intel.com
Thu Jun 28 18:04:58 CEST 2018
On 6/28/2018 4:19 AM, John Daley wrote:
> From: Hyong Youb Kim <hyonkim at cisco.com>
>
> Add a new devarg "ig-vlan-rewrite" to allow the user to set
> non-default rewrite mode. The UCS VIC may add/remove/modify the VLAN
> header of an ingress packet depending on the ingress VLAN rewrite
> mode.
>
> By default, the driver sets the pass-through mode, which tells the NIC
> "do not touch VLAN header and preserve it as is". This mode is usually
> sufficient, but can complicate deployments for certain environments.
> For example, OVS-DPDK in UCS blade environments may want to use "untag
> default VLAN mode", which removes the VLAN header from an ingress
> packet if it matches vNIC's default VLAN.
>
> Signed-off-by: Hyong Youb Kim <hyonkim at cisco.com>
> Reviewed-by: John Daley <johndale at cisco.com>
> ---
> drivers/net/enic/enic.h | 1 +
> drivers/net/enic/enic_ethdev.c | 46 +++++++++++++++++++++++++++++++++++++++---
> drivers/net/enic/enic_main.c | 4 +++-
> 3 files changed, 47 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
> index ea0a688d3..f1895fe70 100644
> --- a/drivers/net/enic/enic.h
> +++ b/drivers/net/enic/enic.h
> @@ -125,6 +125,7 @@ struct enic {
> bool disable_overlay; /* devargs disable_overlay=1 */
> bool nic_cfg_chk; /* NIC_CFG_CHK available */
> bool udp_rss_weak; /* Bodega style UDP RSS */
> + uint8_t ig_vlan_rewrite_mode; /* devargs ig-vlan-rewrite */
>
> unsigned int flags;
> unsigned int priv_flags;
> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
> index 697dd6508..111bdc82c 100644
> --- a/drivers/net/enic/enic_ethdev.c
> +++ b/drivers/net/enic/enic_ethdev.c
> @@ -41,6 +41,7 @@ static const struct rte_pci_id pci_id_enic_map[] = {
> };
>
> #define ENIC_DEVARG_DISABLE_OVERLAY "disable-overlay"
> +#define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
Can you please document new devargs in driver documentation
(doc/guides/nics/enic.rst)
More information about the dev
mailing list