Lines Matching refs:nic_data

191 	struct efx_ef10_nic_data *nic_data = efx->nic_data;  in efx_ef10_get_pf_index()  local
202 nic_data->pf_index = MCDI_DWORD(outbuf, GET_FUNCTION_INFO_OUT_PF); in efx_ef10_get_pf_index()
210 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_vf_index() local
221 nic_data->vf_index = MCDI_DWORD(outbuf, GET_FUNCTION_INFO_OUT_VF); in efx_ef10_get_vf_index()
229 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_datapath_caps() local
245 nic_data->datapath_caps = in efx_ef10_init_datapath_caps()
249 nic_data->datapath_caps2 = MCDI_DWORD(outbuf, in efx_ef10_init_datapath_caps()
251 nic_data->piobuf_size = MCDI_WORD(outbuf, in efx_ef10_init_datapath_caps()
254 nic_data->datapath_caps2 = 0; in efx_ef10_init_datapath_caps()
255 nic_data->piobuf_size = ER_DZ_TX_PIOBUF_SIZE; in efx_ef10_init_datapath_caps()
260 nic_data->rx_dpcpu_fw_id = in efx_ef10_init_datapath_caps()
262 nic_data->tx_dpcpu_fw_id = in efx_ef10_init_datapath_caps()
265 if (!(nic_data->datapath_caps & in efx_ef10_init_datapath_caps()
321 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_read_licensed_features() local
332 nic_data->licensed_features = MCDI_QWORD(outbuf, in efx_ef10_read_licensed_features()
351 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_timer_workarounds() local
356 nic_data->workaround_35388 = false; in efx_ef10_get_timer_workarounds()
357 nic_data->workaround_61265 = false; in efx_ef10_get_timer_workarounds()
367 nic_data->workaround_61265 = true; in efx_ef10_get_timer_workarounds()
370 nic_data->workaround_35388 = true; in efx_ef10_get_timer_workarounds()
379 nic_data->workaround_35388 = true; in efx_ef10_get_timer_workarounds()
387 nic_data->workaround_35388 ? "en" : "dis"); in efx_ef10_get_timer_workarounds()
390 nic_data->workaround_61265 ? "en" : "dis"); in efx_ef10_get_timer_workarounds()
533 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_find_vlan() local
536 WARN_ON(!mutex_is_locked(&nic_data->vlan_lock)); in efx_ef10_find_vlan()
538 list_for_each_entry(vlan, &nic_data->vlan_list, list) { in efx_ef10_find_vlan()
548 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_add_vlan() local
552 mutex_lock(&nic_data->vlan_lock); in efx_ef10_add_vlan()
574 list_add_tail(&vlan->list, &nic_data->vlan_list); in efx_ef10_add_vlan()
587 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_add_vlan()
595 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_add_vlan()
602 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_del_vlan_internal() local
604 WARN_ON(!mutex_is_locked(&nic_data->vlan_lock)); in efx_ef10_del_vlan_internal()
618 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_del_vlan() local
629 mutex_lock(&nic_data->vlan_lock); in efx_ef10_del_vlan()
640 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_del_vlan()
647 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_cleanup_vlans() local
650 mutex_lock(&nic_data->vlan_lock); in efx_ef10_cleanup_vlans()
651 list_for_each_entry_safe(vlan, next_vlan, &nic_data->vlan_list, list) in efx_ef10_cleanup_vlans()
653 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_cleanup_vlans()
662 struct efx_ef10_nic_data *nic_data; in efx_ef10_probe() local
665 nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); in efx_ef10_probe()
666 if (!nic_data) in efx_ef10_probe()
668 efx->nic_data = nic_data; in efx_ef10_probe()
673 rc = efx_nic_alloc_buffer(efx, &nic_data->mcdi_buf, in efx_ef10_probe()
690 nic_data->warm_boot_count = rc; in efx_ef10_probe()
694 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_probe()
707 mutex_init(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
755 if (nic_data->datapath_caps & in efx_ef10_probe()
783 efx_pf->type->get_mac_address(efx_pf, nic_data->port_id); in efx_ef10_probe()
786 ether_addr_copy(nic_data->port_id, efx->net_dev->perm_addr); in efx_ef10_probe()
788 INIT_LIST_HEAD(&nic_data->vlan_list); in efx_ef10_probe()
789 mutex_init(&nic_data->vlan_lock); in efx_ef10_probe()
809 mutex_destroy(&nic_data->vlan_lock); in efx_ef10_probe()
819 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
820 memset(nic_data->udp_tunnels, 0, sizeof(nic_data->udp_tunnels)); in efx_ef10_probe()
822 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
823 mutex_destroy(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
827 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_probe()
829 kfree(nic_data); in efx_ef10_probe()
830 efx->nic_data = NULL; in efx_ef10_probe()
854 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_free_piobufs() local
861 for (i = 0; i < nic_data->n_piobufs; i++) { in efx_ef10_free_piobufs()
863 nic_data->piobuf_handle[i]); in efx_ef10_free_piobufs()
869 nic_data->n_piobufs = 0; in efx_ef10_free_piobufs()
874 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_piobufs() local
898 nic_data->piobuf_handle[i] = in efx_ef10_alloc_piobufs()
902 nic_data->piobuf_handle[i]); in efx_ef10_alloc_piobufs()
905 nic_data->n_piobufs = i; in efx_ef10_alloc_piobufs()
913 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_link_piobufs() local
924 for (index = 0; index < nic_data->n_piobufs; ++index) { in efx_ef10_link_piobufs()
926 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
928 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
935 nic_data->pio_write_vi_base + index, index, in efx_ef10_link_piobufs()
941 nic_data->pio_write_vi_base + index, index); in efx_ef10_link_piobufs()
959 index = offset / nic_data->piobuf_size; in efx_ef10_link_piobufs()
960 offset = offset % nic_data->piobuf_size; in efx_ef10_link_piobufs()
967 if (tx_queue->queue == nic_data->pio_write_vi_base) { in efx_ef10_link_piobufs()
973 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
992 nic_data->pio_write_base + in efx_ef10_link_piobufs()
1013 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
1056 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_remove() local
1069 nic_data_pf = efx_pf->nic_data; in efx_ef10_remove()
1070 vf = nic_data_pf->vf + nic_data->vf_index; in efx_ef10_remove()
1079 mutex_destroy(&nic_data->vlan_lock); in efx_ef10_remove()
1087 if (nic_data->wc_membase) in efx_ef10_remove()
1088 iounmap(nic_data->wc_membase); in efx_ef10_remove()
1093 if (!nic_data->must_restore_piobufs) in efx_ef10_remove()
1101 memset(nic_data->udp_tunnels, 0, sizeof(nic_data->udp_tunnels)); in efx_ef10_remove()
1102 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_remove()
1104 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_remove()
1106 mutex_destroy(&nic_data->udp_tunnels_lock); in efx_ef10_remove()
1109 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_remove()
1110 kfree(nic_data); in efx_ef10_remove()
1122 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vadaptor_query() local
1128 if (nic_data->datapath_caps & in efx_ef10_vadaptor_query()
1212 struct efx_ef10_nic_data *nic_data_pf = efx_pf->nic_data; in efx_ef10_probe_vf()
1234 struct efx_ef10_nic_data *nic_data_p = efx_pf->nic_data; in efx_ef10_probe_vf()
1235 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_probe_vf() local
1237 nic_data_p->vf[nic_data->vf_index].efx = efx; in efx_ef10_probe_vf()
1238 nic_data_p->vf[nic_data->vf_index].pci_dev = in efx_ef10_probe_vf()
1263 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_vis() local
1280 nic_data->vi_base = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_BASE); in efx_ef10_alloc_vis()
1281 nic_data->n_allocated_vis = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_COUNT); in efx_ef10_alloc_vis()
1290 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_dimension_resources() local
1310 nic_data->piobuf_size / efx_piobuf_size * EF10_TX_PIOBUF_COUNT >= in efx_ef10_dimension_resources()
1314 nic_data->piobuf_size / efx_piobuf_size); in efx_ef10_dimension_resources()
1331 nic_data->n_piobufs = 0; in efx_ef10_dimension_resources()
1346 if (nic_data->n_piobufs) { in efx_ef10_dimension_resources()
1352 nic_data->n_piobufs) * in efx_ef10_dimension_resources()
1355 max_vis = pio_write_vi_base + nic_data->n_piobufs; in efx_ef10_dimension_resources()
1371 if (nic_data->n_allocated_vis < channel_vis) { in efx_ef10_dimension_resources()
1380 efx->max_channels = nic_data->n_allocated_vis; in efx_ef10_dimension_resources()
1382 nic_data->n_allocated_vis / EFX_TXQ_TYPES; in efx_ef10_dimension_resources()
1391 if (nic_data->n_piobufs && in efx_ef10_dimension_resources()
1392 nic_data->n_allocated_vis < in efx_ef10_dimension_resources()
1393 pio_write_vi_base + nic_data->n_piobufs) { in efx_ef10_dimension_resources()
1396 nic_data->n_allocated_vis, nic_data->n_piobufs); in efx_ef10_dimension_resources()
1413 nic_data->wc_membase = ioremap_wc(efx->membase_phys + in efx_ef10_dimension_resources()
1416 if (!nic_data->wc_membase) { in efx_ef10_dimension_resources()
1422 nic_data->pio_write_vi_base = pio_write_vi_base; in efx_ef10_dimension_resources()
1423 nic_data->pio_write_base = in efx_ef10_dimension_resources()
1424 nic_data->wc_membase + in efx_ef10_dimension_resources()
1436 nic_data->wc_membase, wc_mem_map_size); in efx_ef10_dimension_resources()
1443 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_nic() local
1446 if (nic_data->must_check_datapath_caps) { in efx_ef10_init_nic()
1450 nic_data->must_check_datapath_caps = false; in efx_ef10_init_nic()
1453 if (nic_data->must_realloc_vis) { in efx_ef10_init_nic()
1455 rc = efx_ef10_alloc_vis(efx, nic_data->n_allocated_vis, in efx_ef10_init_nic()
1456 nic_data->n_allocated_vis); in efx_ef10_init_nic()
1459 nic_data->must_realloc_vis = false; in efx_ef10_init_nic()
1462 if (nic_data->must_restore_piobufs && nic_data->n_piobufs) { in efx_ef10_init_nic()
1463 rc = efx_ef10_alloc_piobufs(efx, nic_data->n_piobufs); in efx_ef10_init_nic()
1480 nic_data->must_restore_piobufs = false; in efx_ef10_init_nic()
1492 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_reset_mc_allocations() local
1498 nic_data->must_realloc_vis = true; in efx_ef10_reset_mc_allocations()
1499 nic_data->must_restore_rss_contexts = true; in efx_ef10_reset_mc_allocations()
1500 nic_data->must_restore_filters = true; in efx_ef10_reset_mc_allocations()
1501 nic_data->must_restore_piobufs = true; in efx_ef10_reset_mc_allocations()
1506 nic_data->must_probe_vswitching = true; in efx_ef10_reset_mc_allocations()
1507 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_reset_mc_allocations()
1509 if (nic_data->vf) in efx_ef10_reset_mc_allocations()
1511 nic_data->vf[i].vport_id = 0; in efx_ef10_reset_mc_allocations()
1797 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_raw_stat_mask() local
1806 if (nic_data->datapath_caps2 & in efx_ef10_raw_stat_mask()
1813 if (nic_data->datapath_caps & in efx_ef10_raw_stat_mask()
1822 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_stat_mask() local
1828 if (nic_data->datapath_caps & in efx_ef10_get_stat_mask()
1844 (nic_data->datapath_caps2 & in efx_ef10_get_stat_mask()
1873 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_update_stats_common() local
1874 u64 *stats = nic_data->stats; in efx_ef10_update_stats_common()
1891 if (nic_data->datapath_caps & in efx_ef10_update_stats_common()
1940 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_pf() local
1943 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats_pf()
1994 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_vf() local
1997 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats_vf()
2144 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_request() local
2145 u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_request()
2157 _efx_writed(efx, cpu_to_le32((u64)nic_data->mcdi_buf.dma_addr >> 32), in efx_ef10_mcdi_request()
2159 _efx_writed(efx, cpu_to_le32((u32)nic_data->mcdi_buf.dma_addr), in efx_ef10_mcdi_request()
2165 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_response() local
2166 const efx_dword_t hdr = *(const efx_dword_t *)nic_data->mcdi_buf.addr; in efx_ef10_mcdi_poll_response()
2176 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_read_response() local
2177 const u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_read_response()
2184 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_reboot_detected() local
2190 nic_data->must_check_datapath_caps = true; in efx_ef10_mcdi_reboot_detected()
2195 nic_data->stats[EF10_STAT_port_rx_bad_bytes] = 0; in efx_ef10_mcdi_reboot_detected()
2200 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_reboot() local
2213 if (rc == nic_data->warm_boot_count) in efx_ef10_mcdi_poll_reboot()
2216 nic_data->warm_boot_count = rc; in efx_ef10_mcdi_poll_reboot()
2394 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_tso_versions() local
2397 if (nic_data->datapath_caps & in efx_ef10_tso_versions()
2400 if (nic_data->datapath_caps2 & in efx_ef10_tso_versions()
2414 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_tx_init() local
2426 if (!(nic_data->licensed_features & in efx_ef10_tx_init()
2439 if (csum_offload && (nic_data->datapath_caps2 & in efx_ef10_tx_init()
2452 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_PORT_ID, nic_data->vport_id); in efx_ef10_tx_init()
2514 } else if (nic_data->datapath_caps & in efx_ef10_tx_init()
2724 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_rss_context() local
2742 if (nic_data->datapath_caps & in efx_ef10_alloc_rss_context()
2747 nic_data->vport_id); in efx_ef10_alloc_rss_context()
2764 if (nic_data->datapath_caps & in efx_ef10_alloc_rss_context()
2833 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_shared_rss_config() local
2840 nic_data->rx_rss_context_exclusive = false; in efx_ef10_rx_push_shared_rss_config()
2850 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_exclusive_rss_config() local
2854 !nic_data->rx_rss_context_exclusive) { in efx_ef10_rx_push_exclusive_rss_config()
2871 nic_data->rx_rss_context_exclusive = true; in efx_ef10_rx_push_exclusive_rss_config()
2985 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_restore_rss_contexts() local
2991 if (!nic_data->must_restore_rss_contexts) in efx_ef10_rx_restore_rss_contexts()
3007 nic_data->must_restore_rss_contexts = false; in efx_ef10_rx_restore_rss_contexts()
3088 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_init() local
3107 MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, nic_data->vport_id); in efx_ef10_rx_init()
3267 struct efx_ef10_nic_data *nic_data; in efx_ef10_ev_init() local
3274 nic_data = efx->nic_data; in efx_ef10_ev_init()
3291 if (nic_data->datapath_caps2 & in efx_ef10_ev_init()
3302 bool cut_thru = !(nic_data->datapath_caps & in efx_ef10_ev_init()
3339 nic_data->workaround_26807 = false; in efx_ef10_ev_init()
3344 nic_data->workaround_26807 = in efx_ef10_ev_init()
3348 !nic_data->workaround_26807) { in efx_ef10_ev_init()
3370 nic_data->warm_boot_count = rc; in efx_ef10_ev_init()
3374 nic_data->workaround_26807 = true; in efx_ef10_ev_init()
3538 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_handle_rx_event() local
3555 nic_data->datapath_caps & in efx_ef10_handle_rx_event()
3574 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_handle_rx_event() local
3592 if (!(nic_data->datapath_caps & in efx_ef10_handle_rx_event()
3957 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_fini_dmaq() local
3966 if (nic_data->must_realloc_vis) { in efx_ef10_fini_dmaq()
4152 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_push_prep() local
4176 MCDI_SET_DWORD(inbuf, FILTER_OP_IN_PORT_ID, nic_data->vport_id); in efx_ef10_filter_push_prep()
4293 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_insert_locked() local
4422 if (rc == -EINVAL && nic_data->must_realloc_vis) in efx_ef10_filter_insert_locked()
4959 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_table_probe() local
4979 if (nic_data->datapath_caps & in efx_ef10_filter_table_probe()
5011 list_for_each_entry(vlan, &nic_data->vlan_list, list) { in efx_ef10_filter_table_probe()
5033 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_table_restore() local
5045 if (!nic_data->must_restore_filters) in efx_ef10_filter_table_restore()
5123 nic_data->must_restore_filters = false; in efx_ef10_filter_table_restore()
5352 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_insert_def() local
5369 if (nic_data->datapath_caps & in efx_ef10_filter_insert_def()
5436 if (!nic_data->workaround_26807 && !encap_type) { in efx_ef10_filter_insert_def()
5529 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vport_set_mac_address() local
5534 if (is_zero_ether_addr(nic_data->vport_mac)) in efx_ef10_vport_set_mac_address()
5543 rc = efx_ef10_vadaptor_free(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
5547 ether_addr_copy(mac_old, nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
5548 rc = efx_ef10_vport_del_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
5549 nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
5553 rc = efx_ef10_vport_add_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
5556 ether_addr_copy(nic_data->vport_mac, efx->net_dev->dev_addr); in efx_ef10_vport_set_mac_address()
5558 rc2 = efx_ef10_vport_add_mac(efx, nic_data->vport_id, mac_old); in efx_ef10_vport_set_mac_address()
5561 eth_zero_addr(nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
5567 rc2 = efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
5600 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_vlan_sync_rx_mode() local
5643 if (nic_data->workaround_26807 && in efx_ef10_filter_vlan_sync_rx_mode()
5647 if (nic_data->workaround_26807) { in efx_ef10_filter_vlan_sync_rx_mode()
5679 if (nic_data->workaround_26807) in efx_ef10_filter_vlan_sync_rx_mode()
5846 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_set_mac_address() local
5860 nic_data->vport_id); in efx_ef10_set_mac_address()
5883 nic_data->vf_index, in efx_ef10_set_mac_address()
5887 struct efx_ef10_nic_data *nic_data = efx_pf->nic_data; in efx_ef10_set_mac_address() local
5894 struct ef10_vf *vf = nic_data->vf + i; in efx_ef10_set_mac_address()
6304 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_phys_port_id() local
6306 if (!is_valid_ether_addr(nic_data->port_id)) in efx_ef10_get_phys_port_id()
6310 memcpy(ppid->id, nic_data->port_id, ppid->id_len); in efx_ef10_get_phys_port_id()
6338 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_set_udp_tnl_ports() local
6348 WARN_ON(!mutex_is_locked(&nic_data->udp_tunnels_lock)); in efx_ef10_set_udp_tnl_ports()
6350 nic_data->udp_tunnels_dirty = false; in efx_ef10_set_udp_tnl_ports()
6352 if (!(nic_data->datapath_caps & in efx_ef10_set_udp_tnl_ports()
6358 BUILD_BUG_ON(ARRAY_SIZE(nic_data->udp_tunnels) > in efx_ef10_set_udp_tnl_ports()
6361 for (i = 0; i < ARRAY_SIZE(nic_data->udp_tunnels); ++i) { in efx_ef10_set_udp_tnl_ports()
6362 if (nic_data->udp_tunnels[i].count && in efx_ef10_set_udp_tnl_ports()
6363 nic_data->udp_tunnels[i].port) { in efx_ef10_set_udp_tnl_ports()
6368 ntohs(nic_data->udp_tunnels[i].port), in efx_ef10_set_udp_tnl_ports()
6370 nic_data->udp_tunnels[i].type); in efx_ef10_set_udp_tnl_ports()
6398 nic_data->udp_tunnels_dirty = true; in efx_ef10_set_udp_tnl_ports()
6434 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_push_ports() local
6437 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_push_ports()
6438 if (nic_data->udp_tunnels_dirty) { in efx_ef10_udp_tnl_push_ports()
6445 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_push_ports()
6452 struct efx_ef10_nic_data *nic_data = efx->nic_data; in __efx_ef10_udp_tnl_lookup_port() local
6455 for (i = 0; i < ARRAY_SIZE(nic_data->udp_tunnels); ++i) { in __efx_ef10_udp_tnl_lookup_port()
6456 if (!nic_data->udp_tunnels[i].count) in __efx_ef10_udp_tnl_lookup_port()
6458 if (nic_data->udp_tunnels[i].port == port) in __efx_ef10_udp_tnl_lookup_port()
6459 return &nic_data->udp_tunnels[i]; in __efx_ef10_udp_tnl_lookup_port()
6467 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_add_port() local
6473 if (!(nic_data->datapath_caps & in efx_ef10_udp_tnl_add_port()
6481 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_add_port()
6506 for (i = 0; i < ARRAY_SIZE(nic_data->udp_tunnels); ++i) in efx_ef10_udp_tnl_add_port()
6507 if (!nic_data->udp_tunnels[i].count) { in efx_ef10_udp_tnl_add_port()
6508 nic_data->udp_tunnels[i] = tnl; in efx_ef10_udp_tnl_add_port()
6509 nic_data->udp_tunnels[i].count = 1; in efx_ef10_udp_tnl_add_port()
6521 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_add_port()
6532 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_has_port() local
6534 if (!(nic_data->datapath_caps & in efx_ef10_udp_tnl_has_port()
6538 if (nic_data->udp_tunnels_dirty) in efx_ef10_udp_tnl_has_port()
6550 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_del_port() local
6555 if (!(nic_data->datapath_caps & in efx_ef10_udp_tnl_del_port()
6563 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_del_port()
6592 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_del_port()