On Wed, Jul 6, 2016 at 3:29 PM, Tariq Toukan <tar...@mellanox.com> wrote: > From: Moshe Shemesh <mo...@mellanox.com> > > Expose mlx4_config_svlan_tpid, that checks for feature support > in device capabilities and sets the Service Tag TPID accordingly.
I Googled for service tag TPID and I understand this is what we can vlan protcol, correct? any reason to call it differently? > @@ -2286,6 +2291,7 @@ struct mlx4_config_dev { > #define MLX4_VXLAN_UDP_DPORT (1 << 0) > #define MLX4_ROCE_V2_UDP_DPORT BIT(3) > #define MLX4_DISABLE_RX_PORT BIT(18) > +#define MLX4_SVLAN_TPID BIT(20) > > static int mlx4_CONFIG_DEV_set(struct mlx4_dev *dev, struct mlx4_config_dev > *config_dev) > { > @@ -2372,6 +2378,8 @@ int mlx4_config_dev_retrieval(struct mlx4_dev *dev, > > params->vxlan_udp_dport = be16_to_cpu(config_dev.vxlan_udp_dport); > > + params->svlan_tpid = be16_to_cpu(config_dev.svlan_tpid); > + > return 0; > } > EXPORT_SYMBOL_GPL(mlx4_config_dev_retrieval); > @@ -2414,6 +2422,21 @@ int mlx4_config_roce_v2_port(struct mlx4_dev *dev, u16 > udp_port) > } > EXPORT_SYMBOL_GPL(mlx4_config_roce_v2_port); > > +int mlx4_config_svlan_tpid(struct mlx4_dev *dev, __be16 svlan_tpid) > +{ > + struct mlx4_config_dev config_dev; > + > + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SVLAN_TPID)) > + return -ENOTSUPP; > + > + memset(&config_dev, 0, sizeof(config_dev)); > + config_dev.update_flags = cpu_to_be32(MLX4_SVLAN_TPID); > + config_dev.svlan_tpid = svlan_tpid; > + > + return mlx4_CONFIG_DEV_set(dev, &config_dev); > +} > +EXPORT_SYMBOL_GPL(mlx4_config_svlan_tpid); dead code? I don't see any invocation of this helper on the patch, if it's on earlier patches of the series it means you broke bisection...