mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 05:55:02 +08:00
73b483b790
Currently it is not possible to set/unset lb_en and lan_en flags for advanced rules during their creation. Both flags are enabled by default. In case of switchdev offloads for egress traffic we need lb_en to be disabled. Because of that, we work around it by updating the rule immediately after its creation. This change allows us to set/unset those flags right away and it gets rid of old workaround as well. Using ice_adv_rule_flags_info structure we can pass info about flags we want to be set for a given advanced rule. Flags are stored in flags_info.act. Values from act would be used only if act_valid was set to true, otherwise default values would be used. Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Acked-by: Paul Menzel <pmenzel@molgen.mpg.de> Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2018-2020, Intel Corporation. */
|
|
|
|
#ifndef _ICE_FLTR_H_
|
|
#define _ICE_FLTR_H_
|
|
|
|
void ice_fltr_free_list(struct device *dev, struct list_head *h);
|
|
enum ice_status
|
|
ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
|
|
const u8 *mac, enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_add_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list);
|
|
enum ice_status
|
|
ice_fltr_remove_mac(struct ice_vsi *vsi, const u8 *mac,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list);
|
|
|
|
enum ice_status
|
|
ice_fltr_add_vlan(struct ice_vsi *vsi, u16 vid,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_remove_vlan(struct ice_vsi *vsi, u16 vid,
|
|
enum ice_sw_fwd_act_type action);
|
|
|
|
enum ice_status
|
|
ice_fltr_add_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_remove_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
|
|
enum ice_sw_fwd_act_type action);
|
|
void ice_fltr_remove_all(struct ice_vsi *vsi);
|
|
enum ice_status
|
|
ice_fltr_update_flags_dflt_rule(struct ice_vsi *vsi, u16 rule_id, u8 direction,
|
|
u32 new_flags);
|
|
#endif
|