Commit 0c6a3cb6 authored by Michal Swiatkowski's avatar Michal Swiatkowski Committed by Tony Nguyen

ice: basic support for VLAN in subfunctions

Implement add / delete vlan for subfunction type VSI.
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 7cde4743
......@@ -34,6 +34,7 @@ ice-y := ice_main.o \
devlink/devlink.o \
devlink/devlink_port.o \
ice_sf_eth.o \
ice_sf_vsi_vlan_ops.o \
ice_ddp.o \
ice_fw_update.o \
ice_lag.o \
......
// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2023, Intel Corporation. */
#include "ice_vsi_vlan_ops.h"
#include "ice_vsi_vlan_lib.h"
#include "ice_vlan_mode.h"
#include "ice.h"
#include "ice_sf_vsi_vlan_ops.h"
void ice_sf_vsi_init_vlan_ops(struct ice_vsi *vsi)
{
struct ice_vsi_vlan_ops *vlan_ops;
if (ice_is_dvm_ena(&vsi->back->hw))
vlan_ops = &vsi->outer_vlan_ops;
else
vlan_ops = &vsi->inner_vlan_ops;
vlan_ops->add_vlan = ice_vsi_add_vlan;
vlan_ops->del_vlan = ice_vsi_del_vlan;
}
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2023, Intel Corporation. */
#ifndef _ICE_SF_VSI_VLAN_OPS_H_
#define _ICE_SF_VSI_VLAN_OPS_H_
#include "ice_vsi_vlan_ops.h"
struct ice_vsi;
void ice_sf_vsi_init_vlan_ops(struct ice_vsi *vsi);
#endif /* _ICE_SF_VSI_VLAN_OPS_H_ */
......@@ -3,6 +3,7 @@
#include "ice_pf_vsi_vlan_ops.h"
#include "ice_vf_vsi_vlan_ops.h"
#include "ice_sf_vsi_vlan_ops.h"
#include "ice_lib.h"
#include "ice.h"
......@@ -77,6 +78,9 @@ void ice_vsi_init_vlan_ops(struct ice_vsi *vsi)
case ICE_VSI_VF:
ice_vf_vsi_init_vlan_ops(vsi);
break;
case ICE_VSI_SF:
ice_sf_vsi_init_vlan_ops(vsi);
break;
default:
dev_dbg(ice_pf_to_dev(vsi->back), "%s does not support VLAN operations\n",
ice_vsi_type_str(vsi->type));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment