Lines Matching refs:vsi
571 struct ixl_vsi *vsi = ama->vsi; in ixl_add_maddr() local
576 f = ixl_find_filter(&vsi->ftl, macaddr, IXL_VLAN_ANY); in ixl_add_maddr()
582 device_printf(vsi->dev, "WARNING: no filter available!!\n"); in ixl_add_maddr()
606 ixl_add_multi(struct ixl_vsi *vsi) in ixl_add_multi() argument
608 if_t ifp = vsi->ifp; in ixl_add_multi()
609 struct i40e_hw *hw = vsi->hw; in ixl_add_multi()
618 status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, in ixl_add_multi()
626 ixl_del_multi(vsi, true); in ixl_add_multi()
630 cb_arg.vsi = vsi; in ixl_add_multi()
635 ixl_add_hw_filters(vsi, &cb_arg.to_add, mcnt); in ixl_add_multi()
661 ixl_dis_multi_promisc(struct ixl_vsi *vsi, int vsi_mcnt) in ixl_dis_multi_promisc() argument
663 struct ifnet *ifp = vsi->ifp; in ixl_dis_multi_promisc()
664 struct i40e_hw *hw = vsi->hw; in ixl_dis_multi_promisc()
679 status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, in ixl_dis_multi_promisc()
690 ixl_add_multi(vsi); in ixl_dis_multi_promisc()
703 ixl_del_multi(struct ixl_vsi *vsi, bool all) in ixl_del_multi() argument
706 if_t ifp = vsi->ifp; in ixl_del_multi()
714 LIST_FOREACH_SAFE(f, &vsi->ftl, ftle, fn) { in ixl_del_multi()
730 ixl_del_hw_filters(vsi, &to_del, to_del_cnt); in ixl_del_multi()
734 ixl_dis_multi_promisc(vsi, vsi_mcnt); in ixl_del_multi()
743 if_t ifp = pf->vsi.ifp; in ixl_link_up_msg()
905 struct ixl_vsi *vsi = &pf->vsi; in ixl_switch_config() local
906 device_t dev = iflib_get_dev(vsi->ctx); in ixl_switch_config()
937 vsi->uplink_seid = LE16_TO_CPU(sw_config->element[0].uplink_seid); in ixl_switch_config()
938 vsi->downlink_seid = LE16_TO_CPU(sw_config->element[0].downlink_seid); in ixl_switch_config()
939 vsi->seid = LE16_TO_CPU(sw_config->element[0].seid); in ixl_switch_config()
944 ixl_vsi_add_sysctls(struct ixl_vsi * vsi, const char * sysctl_name, bool queues_sysctls) in ixl_vsi_add_sysctls() argument
950 tree = device_get_sysctl_tree(vsi->dev); in ixl_vsi_add_sysctls()
952 vsi->vsi_node = SYSCTL_ADD_NODE(&vsi->sysctl_ctx, child, OID_AUTO, sysctl_name, in ixl_vsi_add_sysctls()
955 vsi_list = SYSCTL_CHILDREN(vsi->vsi_node); in ixl_vsi_add_sysctls()
956 ixl_add_sysctls_eth_stats(&vsi->sysctl_ctx, vsi_list, &vsi->eth_stats); in ixl_vsi_add_sysctls()
959 SYSCTL_ADD_UQUAD(&vsi->sysctl_ctx, vsi_list, OID_AUTO, "rx_errors", in ixl_vsi_add_sysctls()
960 CTLFLAG_RD, &vsi->ierrors, in ixl_vsi_add_sysctls()
964 ixl_vsi_add_queues_stats(vsi, &vsi->sysctl_ctx); in ixl_vsi_add_sysctls()
1098 struct ixl_vsi *vsi = &pf->vsi; in ixl_set_rss_key() local
1113 status = i40e_aq_set_rss_key(hw, vsi->vsi_num, &key_data); in ixl_set_rss_key()
1183 ixl_del_default_hw_filters(struct ixl_vsi *vsi) in ixl_del_default_hw_filters() argument
1188 bcopy(vsi->hw->mac.perm_addr, e.mac_addr, ETHER_ADDR_LEN); in ixl_del_default_hw_filters()
1191 i40e_aq_remove_macvlan(vsi->hw, vsi->seid, &e, 1, NULL); in ixl_del_default_hw_filters()
1194 bcopy(vsi->hw->mac.perm_addr, e.mac_addr, ETHER_ADDR_LEN); in ixl_del_default_hw_filters()
1198 i40e_aq_remove_macvlan(vsi->hw, vsi->seid, &e, 1, NULL); in ixl_del_default_hw_filters()
1208 ixl_init_filters(struct ixl_vsi *vsi) in ixl_init_filters() argument
1210 struct ixl_pf *pf = (struct ixl_pf *)vsi->back; in ixl_init_filters()
1215 LIST_INIT(&vsi->ftl); in ixl_init_filters()
1216 vsi->num_hw_filters = 0; in ixl_init_filters()
1219 i40e_aq_set_vsi_broadcast(&pf->hw, vsi->seid, TRUE, NULL); in ixl_init_filters()
1221 if (IXL_VSI_IS_VF(vsi)) in ixl_init_filters()
1224 ixl_del_default_hw_filters(vsi); in ixl_init_filters()
1226 ixl_add_filter(vsi, vsi->hw->mac.addr, IXL_VLAN_ANY); in ixl_init_filters()
1234 i40e_add_filter_to_drop_tx_flow_control_frames(vsi->hw, vsi->seid); in ixl_init_filters()
1237 i40e_add_filter_to_drop_tx_flow_control_frames(vsi->hw, vsi->seid); in ixl_init_filters()
1242 ixl_reconfigure_filters(struct ixl_vsi *vsi) in ixl_reconfigure_filters() argument
1244 struct i40e_hw *hw = vsi->hw; in ixl_reconfigure_filters()
1254 LIST_CONCAT(&tmp, &vsi->ftl, ixl_mac_filter, ftle); in ixl_reconfigure_filters()
1255 cnt = vsi->num_hw_filters; in ixl_reconfigure_filters()
1256 vsi->num_hw_filters = 0; in ixl_reconfigure_filters()
1258 ixl_add_hw_filters(vsi, &tmp, cnt); in ixl_reconfigure_filters()
1269 ixl_add_filter(vsi, hw->mac.addr, IXL_VLAN_ANY); in ixl_reconfigure_filters()
1271 if ((if_getcapenable(vsi->ifp) & IFCAP_VLAN_HWFILTER) == 0) in ixl_reconfigure_filters()
1277 ixl_add_vlan_filters(vsi, hw->mac.addr); in ixl_reconfigure_filters()
1286 ixl_add_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) in ixl_add_filter() argument
1294 pf = vsi->back; in ixl_add_filter()
1302 f = ixl_find_filter(&vsi->ftl, macaddr, vlan); in ixl_add_filter()
1315 vsi->num_macs++; in ixl_add_filter()
1322 if ((vlan != IXL_VLAN_ANY) && (vsi->num_vlans == 1)) { in ixl_add_filter()
1323 tmp = ixl_find_filter(&vsi->ftl, macaddr, IXL_VLAN_ANY); in ixl_add_filter()
1340 ixl_del_hw_filters(vsi, &to_del, 1); in ixl_add_filter()
1344 ixl_add_hw_filters(vsi, &to_add, to_add_cnt); in ixl_add_filter()
1358 ixl_add_vlan_filters(struct ixl_vsi *vsi, const u8 *macaddr) in ixl_add_vlan_filters() argument
1365 if (vsi->num_vlans == 0 || vsi->num_vlans > IXL_MAX_VLAN_FILTERS) { in ixl_add_vlan_filters()
1366 ixl_add_filter(vsi, macaddr, IXL_VLAN_ANY); in ixl_add_vlan_filters()
1372 f = ixl_find_filter(&vsi->ftl, macaddr, 0); in ixl_add_vlan_filters()
1376 device_printf(vsi->dev, "WARNING: no filter available!!\n"); in ixl_add_vlan_filters()
1383 bit_ffs_at(vsi->vlans_map, i, IXL_VLANS_MAP_LEN, &vlan); in ixl_add_vlan_filters()
1388 f = ixl_find_filter(&vsi->ftl, macaddr, vlan); in ixl_add_vlan_filters()
1394 device_printf(vsi->dev, "WARNING: no filter available!!\n"); in ixl_add_vlan_filters()
1401 ixl_add_hw_filters(vsi, &to_add, to_add_cnt); in ixl_add_vlan_filters()
1405 ixl_del_filter(struct ixl_vsi *vsi, const u8 *macaddr, s16 vlan) in ixl_del_filter() argument
1411 ixl_dbg_filter((struct ixl_pf *)vsi->back, in ixl_del_filter()
1415 f = ixl_find_filter(&vsi->ftl, macaddr, vlan); in ixl_del_filter()
1423 vsi->num_macs--; in ixl_del_filter()
1426 if (vlan == IXL_VLAN_ANY || vsi->num_vlans > 0) { in ixl_del_filter()
1427 ixl_del_hw_filters(vsi, &ftl_head, to_del_cnt); in ixl_del_filter()
1432 tmp = ixl_find_filter(&vsi->ftl, macaddr, 0); in ixl_del_filter()
1438 ixl_del_hw_filters(vsi, &ftl_head, to_del_cnt); in ixl_del_filter()
1440 ixl_add_filter(vsi, macaddr, IXL_VLAN_ANY); in ixl_del_filter()
1454 ixl_del_all_vlan_filters(struct ixl_vsi *vsi, const u8 *macaddr) in ixl_del_all_vlan_filters() argument
1462 LIST_FOREACH_SAFE(f, &vsi->ftl, ftle, tmp) { in ixl_del_all_vlan_filters()
1472 ixl_dbg_filter((struct ixl_pf *)vsi->back, in ixl_del_all_vlan_filters()
1476 ixl_del_hw_filters(vsi, &to_del, to_del_cnt); in ixl_del_all_vlan_filters()
1503 ixl_add_hw_filters(struct ixl_vsi *vsi, struct ixl_ftl_head *to_add, int cnt) in ixl_add_hw_filters() argument
1513 pf = vsi->back; in ixl_add_hw_filters()
1514 dev = vsi->dev; in ixl_add_hw_filters()
1562 status = i40e_aq_add_macvlan(hw, vsi->seid, a, j, NULL); in ixl_add_hw_filters()
1564 LIST_CONCAT(&vsi->ftl, to_add, ixl_mac_filter, ftle); in ixl_add_hw_filters()
1565 vsi->num_hw_filters += j; in ixl_add_hw_filters()
1587 LIST_INSERT_HEAD(&vsi->ftl, f, ftle); in ixl_add_hw_filters()
1588 vsi->num_hw_filters++; in ixl_add_hw_filters()
1603 ixl_del_hw_filters(struct ixl_vsi *vsi, struct ixl_ftl_head *to_del, int cnt) in ixl_del_hw_filters() argument
1613 pf = vsi->back; in ixl_del_hw_filters()
1615 dev = vsi->dev; in ixl_del_hw_filters()
1654 status = i40e_aq_remove_macvlan(hw, vsi->seid, d, j, NULL); in ixl_del_hw_filters()
1670 vsi->num_hw_filters -= j; in ixl_del_hw_filters()
2069 struct ixl_vsi *vsi = &pf->vsi; in ixl_handle_empr_reset() local
2070 bool is_up = !!(if_getdrvflags(vsi->ifp) & IFF_DRV_RUNNING); in ixl_handle_empr_reset()
2099 struct ixl_vsi *vsi = &pf->vsi; in ixl_update_stats_counters() local
2184 vsi->shared->isc_pause_frames = 1; in ixl_update_stats_counters()
2275 ixl_update_vsi_stats(vsi); in ixl_update_stats_counters()
2280 ixl_update_eth_stats(&pf->vfs[i].vsi); in ixl_update_stats_counters()
2288 ixl_update_eth_stats(struct ixl_vsi *vsi) in ixl_update_eth_stats() argument
2290 struct ixl_pf *pf = (struct ixl_pf *)vsi->back; in ixl_update_eth_stats()
2294 u16 stat_idx = vsi->info.stat_counter_idx; in ixl_update_eth_stats()
2296 es = &vsi->eth_stats; in ixl_update_eth_stats()
2297 oes = &vsi->eth_stats_offsets; in ixl_update_eth_stats()
2301 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2304 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2308 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2311 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2314 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2317 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2321 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2324 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2327 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2330 vsi->stat_offsets_loaded, in ixl_update_eth_stats()
2332 vsi->stat_offsets_loaded = true; in ixl_update_eth_stats()
2336 ixl_update_vsi_stats(struct ixl_vsi *vsi) in ixl_update_vsi_stats() argument
2344 pf = vsi->back; in ixl_update_vsi_stats()
2345 es = &vsi->eth_stats; in ixl_update_vsi_stats()
2348 ixl_update_eth_stats(vsi); in ixl_update_vsi_stats()
2353 for (int i = 0; i < vsi->num_rx_queues; i++) in ixl_update_vsi_stats()
2354 csum_errs += vsi->rx_queues[i].rxr.csum_errs; in ixl_update_vsi_stats()
2358 IXL_SET_IPACKETS(vsi, es->rx_unicast + in ixl_update_vsi_stats()
2361 IXL_SET_OPACKETS(vsi, es->tx_unicast + in ixl_update_vsi_stats()
2364 IXL_SET_IBYTES(vsi, es->rx_bytes); in ixl_update_vsi_stats()
2365 IXL_SET_OBYTES(vsi, es->tx_bytes); in ixl_update_vsi_stats()
2366 IXL_SET_IMCASTS(vsi, es->rx_multicast); in ixl_update_vsi_stats()
2367 IXL_SET_OMCASTS(vsi, es->tx_multicast); in ixl_update_vsi_stats()
2369 IXL_SET_IERRORS(vsi, nsd->crc_errors + nsd->illegal_bytes + in ixl_update_vsi_stats()
2373 IXL_SET_OERRORS(vsi, es->tx_errors); in ixl_update_vsi_stats()
2374 IXL_SET_IQDROPS(vsi, es->rx_discards + nsd->eth.rx_discards); in ixl_update_vsi_stats()
2375 IXL_SET_OQDROPS(vsi, tx_discards); in ixl_update_vsi_stats()
2376 IXL_SET_NOPROTO(vsi, es->rx_unknown_protocol); in ixl_update_vsi_stats()
2377 IXL_SET_COLLISIONS(vsi, 0); in ixl_update_vsi_stats()
2395 ixl_vsi_reset_stats(struct ixl_vsi *vsi) in ixl_vsi_reset_stats() argument
2397 bzero(&vsi->eth_stats, sizeof(struct i40e_eth_stats)); in ixl_vsi_reset_stats()
2398 bzero(&vsi->eth_stats_offsets, sizeof(struct i40e_eth_stats)); in ixl_vsi_reset_stats()
2399 vsi->stat_offsets_loaded = false; in ixl_vsi_reset_stats()
3679 struct ixl_vsi *vsi = &pf->vsi; in ixl_sysctl_sw_filter_list() local
3696 LIST_FOREACH(f, &vsi->ftl, ftle) in ixl_sysctl_sw_filter_list()
3702 LIST_FOREACH(f, &vsi->ftl, ftle) { in ixl_sysctl_sw_filter_list()
3722 vsi = &vf->vsi; in ixl_sysctl_sw_filter_list()
3725 LIST_FOREACH(f, &vsi->ftl, ftle) in ixl_sysctl_sw_filter_list()
3731 LIST_FOREACH(f, &vsi->ftl, ftle) { in ixl_sysctl_sw_filter_list()
4089 status = i40e_aq_get_rss_key(hw, pf->vsi.vsi_num, &key_data); in ixl_sysctl_hkey()
4177 status = i40e_aq_get_rss_lut(hw, pf->vsi.vsi_num, TRUE, hlut, sizeof(hlut)); in ixl_sysctl_hlut()
4908 struct ixl_vsi *vsi = &pf->vsi; in ixl_sysctl_queue_interrupt_table() local
4909 struct i40e_hw *hw = vsi->hw; in ixl_sysctl_queue_interrupt_table()
4914 struct ixl_rx_queue *rx_que = vsi->rx_queues; in ixl_sysctl_queue_interrupt_table()
4915 struct ixl_tx_queue *tx_que = vsi->tx_queues; in ixl_sysctl_queue_interrupt_table()
4924 for (int i = 0; i < vsi->num_rx_queues; i++) { in ixl_sysctl_queue_interrupt_table()
4925 rx_que = &vsi->rx_queues[i]; in ixl_sysctl_queue_interrupt_table()
4932 for (int i = 0; i < vsi->num_tx_queues; i++) { in ixl_sysctl_queue_interrupt_table()
4933 tx_que = &vsi->tx_queues[i]; in ixl_sysctl_queue_interrupt_table()
4951 struct ixl_vsi *vsi = &pf->vsi; in ixl_sysctl_debug_queue_int_ctln() local
4952 struct i40e_hw *hw = vsi->hw; in ixl_sysctl_debug_queue_int_ctln()
4957 struct ixl_rx_queue *rx_que = vsi->rx_queues; in ixl_sysctl_debug_queue_int_ctln()
4966 for (int i = 0; i < vsi->num_rx_queues; i++) { in ixl_sysctl_debug_queue_int_ctln()
4967 rx_que = &vsi->rx_queues[i]; in ixl_sysctl_debug_queue_int_ctln()