Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ice/ice_switch.h
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | struct { | ||||
u8 mac_addr[ETH_ALEN]; | u8 mac_addr[ETH_ALEN]; | ||||
} mac; | } mac; | ||||
struct { | struct { | ||||
u8 mac_addr[ETH_ALEN]; | u8 mac_addr[ETH_ALEN]; | ||||
u16 vlan_id; | u16 vlan_id; | ||||
} mac_vlan; | } mac_vlan; | ||||
struct { | struct { | ||||
u16 vlan_id; | u16 vlan_id; | ||||
u16 tpid; | |||||
u8 tpid_valid; | |||||
} vlan; | } vlan; | ||||
/* Set lkup_type as ICE_SW_LKUP_ETHERTYPE | /* Set lkup_type as ICE_SW_LKUP_ETHERTYPE | ||||
* if just using ethertype as filter. Set lkup_type as | * if just using ethertype as filter. Set lkup_type as | ||||
* ICE_SW_LKUP_ETHERTYPE_MAC if MAC also needs to be | * ICE_SW_LKUP_ETHERTYPE_MAC if MAC also needs to be | ||||
* passed in as filter. | * passed in as filter. | ||||
*/ | */ | ||||
struct { | struct { | ||||
u16 ethertype; | u16 ethertype; | ||||
u8 mac_addr[ETH_ALEN]; /* optional */ | u8 mac_addr[ETH_ALEN]; /* optional */ | ||||
} ethertype_mac; | } ethertype_mac; | ||||
} l_data; /* Make sure to zero out the memory of l_data before using | } l_data; /* Make sure to zero out the memory of l_data before using | ||||
* it or only set the data associated with lookup match | * it or only set the data associated with lookup match | ||||
* rest everything should be zero | * rest everything should be zero | ||||
*/ | */ | ||||
/* Depending on filter action */ | /* Depending on filter action */ | ||||
union { | union { | ||||
/* queue ID in case of ICE_FWD_TO_Q and starting | /* queue ID in case of ICE_FWD_TO_Q and starting | ||||
* queue ID in case of ICE_FWD_TO_QGRP. | * queue ID in case of ICE_FWD_TO_QGRP. | ||||
*/ | */ | ||||
u16 q_id:11; | u16 q_id:11; | ||||
u16 hw_vsi_id:10; | u16 hw_vsi_id:10; | ||||
u16 vsi_id:10; | |||||
u16 vsi_list_id:10; | u16 vsi_list_id:10; | ||||
} fwd_id; | } fwd_id; | ||||
/* Sw VSI handle */ | /* Sw VSI handle */ | ||||
u16 vsi_handle; | u16 vsi_handle; | ||||
/* Set to num_queues if action is ICE_FWD_TO_QGRP. This field | /* Set to num_queues if action is ICE_FWD_TO_QGRP. This field | ||||
* determines the range of queues the packet needs to be forwarded to. | * determines the range of queues the packet needs to be forwarded to. | ||||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | |||||
/* Switch config */ | /* Switch config */ | ||||
enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw); | enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw); | ||||
enum ice_status | enum ice_status | ||||
ice_alloc_vlan_res_counter(struct ice_hw *hw, u16 *counter_id); | ice_alloc_vlan_res_counter(struct ice_hw *hw, u16 *counter_id); | ||||
enum ice_status | enum ice_status | ||||
ice_free_vlan_res_counter(struct ice_hw *hw, u16 counter_id); | ice_free_vlan_res_counter(struct ice_hw *hw, u16 counter_id); | ||||
/* Switch/bridge related commands */ | |||||
enum ice_status ice_update_sw_rule_bridge_mode(struct ice_hw *hw); | enum ice_status ice_update_sw_rule_bridge_mode(struct ice_hw *hw); | ||||
enum ice_status ice_alloc_rss_global_lut(struct ice_hw *hw, bool shared_res, u16 *global_lut_id); | enum ice_status ice_alloc_rss_global_lut(struct ice_hw *hw, bool shared_res, u16 *global_lut_id); | ||||
enum ice_status ice_free_rss_global_lut(struct ice_hw *hw, u16 global_lut_id); | enum ice_status ice_free_rss_global_lut(struct ice_hw *hw, u16 global_lut_id); | ||||
enum ice_status | enum ice_status | ||||
ice_alloc_sw(struct ice_hw *hw, bool ena_stats, bool shared_res, u16 *sw_id, | ice_alloc_sw(struct ice_hw *hw, bool ena_stats, bool shared_res, u16 *sw_id, | ||||
u16 *counter_id); | u16 *counter_id); | ||||
enum ice_status | enum ice_status | ||||
ice_free_sw(struct ice_hw *hw, u16 sw_id, u16 counter_id); | ice_free_sw(struct ice_hw *hw, u16 sw_id, u16 counter_id); | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |