162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright (C) 2019-2021, Intel Corporation. */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _ICE_REPR_H_ 562306a36Sopenharmony_ci#define _ICE_REPR_H_ 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include <net/dst_metadata.h> 862306a36Sopenharmony_ci 962306a36Sopenharmony_cistruct ice_repr { 1062306a36Sopenharmony_ci struct ice_vsi *src_vsi; 1162306a36Sopenharmony_ci struct ice_vf *vf; 1262306a36Sopenharmony_ci struct ice_q_vector *q_vector; 1362306a36Sopenharmony_ci struct net_device *netdev; 1462306a36Sopenharmony_ci struct metadata_dst *dst; 1562306a36Sopenharmony_ci struct ice_esw_br_port *br_port; 1662306a36Sopenharmony_ci#ifdef CONFIG_ICE_SWITCHDEV 1762306a36Sopenharmony_ci /* info about slow path rule */ 1862306a36Sopenharmony_ci struct ice_rule_query_data sp_rule; 1962306a36Sopenharmony_ci#endif 2062306a36Sopenharmony_ci}; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciint ice_repr_add_for_all_vfs(struct ice_pf *pf); 2362306a36Sopenharmony_civoid ice_repr_rem_from_all_vfs(struct ice_pf *pf); 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_civoid ice_repr_start_tx_queues(struct ice_repr *repr); 2662306a36Sopenharmony_civoid ice_repr_stop_tx_queues(struct ice_repr *repr); 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_civoid ice_repr_set_traffic_vsi(struct ice_repr *repr, struct ice_vsi *vsi); 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_cistruct ice_repr *ice_netdev_to_repr(struct net_device *netdev); 3162306a36Sopenharmony_cibool ice_is_port_repr_netdev(const struct net_device *netdev); 3262306a36Sopenharmony_ci#endif 33