[PATCH v2 07/24] common/cnxk: interface to update VLAN TPID
Jerin Jacob
jerinjacobk at gmail.com
Thu Jan 4 13:47:10 CET 2024
On Wed, Dec 20, 2023 at 12:53 AM Harman Kalra <hkalra at marvell.com> wrote:
>
> Introducing eswitch variant of set vlan tpid api which can be
> using for PF and VF
>
> Signed-off-by: Harman Kalra <hkalra at marvell.com>
> +
> +int
> +roc_eswitch_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type, uint16_t tpid, bool is_vf)
> +{
> + struct nix *nix = roc_nix_to_nix_priv(roc_nix);
> + struct dev *dev = &nix->dev;
> + int rc = 0;
Across the series, Please check the need for initializing to zero for rc.
In this case, it is not needed.
> +
> + /* Configuring for PF/VF */
> + rc = nix_vlan_tpid_set(dev->mbox, dev->pf_func | is_vf, type, tpid);
> + if (rc)
> + plt_err("Failed to set tpid for PF, rc %d", rc);
> +
> + return rc;
> +}
More information about the dev
mailing list