Lines Matching full:adapter

12  * @adapter: adapter structure
19 static int iavf_send_pf_msg(struct iavf_adapter *adapter, in iavf_send_pf_msg() argument
22 struct iavf_hw *hw = &adapter->hw; in iavf_send_pf_msg()
25 if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED) in iavf_send_pf_msg()
30 dev_dbg(&adapter->pdev->dev, "Unable to send opcode %d to PF, status %s, aq_err %s\n", in iavf_send_pf_msg()
38 * @adapter: adapter structure
44 int iavf_send_api_ver(struct iavf_adapter *adapter) in iavf_send_api_ver() argument
51 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_VERSION, (u8 *)&vvi, in iavf_send_api_ver()
84 struct iavf_adapter *adapter = hw->back; in iavf_poll_virtchnl_msg() local
91 dev_info(&adapter->pdev->dev, "Reset indication received from the PF\n"); in iavf_poll_virtchnl_msg()
92 if (!(adapter->flags & IAVF_FLAG_RESET_PENDING)) in iavf_poll_virtchnl_msg()
93 iavf_schedule_reset(adapter, in iavf_poll_virtchnl_msg()
109 * @adapter: adapter structure
116 int iavf_verify_api_ver(struct iavf_adapter *adapter) in iavf_verify_api_ver() argument
126 err = iavf_poll_virtchnl_msg(&adapter->hw, &event, VIRTCHNL_OP_VERSION); in iavf_verify_api_ver()
130 adapter->pf_version = *pf_vvi; in iavf_verify_api_ver()
145 * @adapter: adapter structure
151 int iavf_send_vf_config_msg(struct iavf_adapter *adapter) in iavf_send_vf_config_msg() argument
177 adapter->current_op = VIRTCHNL_OP_GET_VF_RESOURCES; in iavf_send_vf_config_msg()
178 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_CONFIG; in iavf_send_vf_config_msg()
179 if (PF_IS_V11(adapter)) in iavf_send_vf_config_msg()
180 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_VF_RESOURCES, in iavf_send_vf_config_msg()
183 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_VF_RESOURCES, in iavf_send_vf_config_msg()
187 int iavf_send_vf_offload_vlan_v2_msg(struct iavf_adapter *adapter) in iavf_send_vf_offload_vlan_v2_msg() argument
189 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_OFFLOAD_VLAN_V2_CAPS; in iavf_send_vf_offload_vlan_v2_msg()
191 if (!VLAN_V2_ALLOWED(adapter)) in iavf_send_vf_offload_vlan_v2_msg()
194 adapter->current_op = VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS; in iavf_send_vf_offload_vlan_v2_msg()
196 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS, in iavf_send_vf_offload_vlan_v2_msg()
200 int iavf_send_vf_supported_rxdids_msg(struct iavf_adapter *adapter) in iavf_send_vf_supported_rxdids_msg() argument
202 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_SUPPORTED_RXDIDS; in iavf_send_vf_supported_rxdids_msg()
204 if (!IAVF_RXDID_ALLOWED(adapter)) in iavf_send_vf_supported_rxdids_msg()
207 adapter->current_op = VIRTCHNL_OP_GET_SUPPORTED_RXDIDS; in iavf_send_vf_supported_rxdids_msg()
209 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_SUPPORTED_RXDIDS, in iavf_send_vf_supported_rxdids_msg()
215 * @adapter: private adapter structure
230 int iavf_send_vf_ptp_caps_msg(struct iavf_adapter *adapter) in iavf_send_vf_ptp_caps_msg() argument
237 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_PTP_CAPS; in iavf_send_vf_ptp_caps_msg()
239 if (!IAVF_PTP_ALLOWED(adapter)) in iavf_send_vf_ptp_caps_msg()
242 adapter->current_op = VIRTCHNL_OP_1588_PTP_GET_CAPS; in iavf_send_vf_ptp_caps_msg()
244 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_1588_PTP_GET_CAPS, in iavf_send_vf_ptp_caps_msg()
250 * @adapter: adapter structure
255 static void iavf_validate_num_queues(struct iavf_adapter *adapter) in iavf_validate_num_queues() argument
257 if (adapter->vf_res->num_queue_pairs > IAVF_MAX_REQ_QUEUES) { in iavf_validate_num_queues()
261 dev_info(&adapter->pdev->dev, "Received %d queues, but can only have a max of %d\n", in iavf_validate_num_queues()
262 adapter->vf_res->num_queue_pairs, in iavf_validate_num_queues()
264 dev_info(&adapter->pdev->dev, "Fixing by reducing queues to %d\n", in iavf_validate_num_queues()
266 adapter->vf_res->num_queue_pairs = IAVF_MAX_REQ_QUEUES; in iavf_validate_num_queues()
267 for (i = 0; i < adapter->vf_res->num_vsis; i++) { in iavf_validate_num_queues()
268 vsi_res = &adapter->vf_res->vsi_res[i]; in iavf_validate_num_queues()
276 * @adapter: private adapter structure
283 int iavf_get_vf_config(struct iavf_adapter *adapter) in iavf_get_vf_config() argument
285 struct iavf_hw *hw = &adapter->hw; in iavf_get_vf_config()
297 memcpy(adapter->vf_res, event.msg_buf, min(event.msg_len, len)); in iavf_get_vf_config()
303 iavf_validate_num_queues(adapter); in iavf_get_vf_config()
304 iavf_vf_parse_hw_config(hw, adapter->vf_res); in iavf_get_vf_config()
311 int iavf_get_vf_vlan_v2_caps(struct iavf_adapter *adapter) in iavf_get_vf_vlan_v2_caps() argument
323 err = iavf_poll_virtchnl_msg(&adapter->hw, &event, in iavf_get_vf_vlan_v2_caps()
326 memcpy(&adapter->vlan_v2_caps, event.msg_buf, in iavf_get_vf_vlan_v2_caps()
334 int iavf_get_vf_supported_rxdids(struct iavf_adapter *adapter) in iavf_get_vf_supported_rxdids() argument
343 err = iavf_poll_virtchnl_msg(&adapter->hw, &event, in iavf_get_vf_supported_rxdids()
346 adapter->supp_rxdids = rxdids; in iavf_get_vf_supported_rxdids()
351 int iavf_get_vf_ptp_caps(struct iavf_adapter *adapter) in iavf_get_vf_ptp_caps() argument
360 err = iavf_poll_virtchnl_msg(&adapter->hw, &event, in iavf_get_vf_ptp_caps()
363 adapter->ptp.hw_caps = caps; in iavf_get_vf_ptp_caps()
370 * @adapter: adapter structure
374 void iavf_configure_queues(struct iavf_adapter *adapter) in iavf_configure_queues() argument
377 int pairs = adapter->num_active_queues; in iavf_configure_queues()
383 max_frame = LIBIE_MAX_RX_FRM_LEN(adapter->rx_rings->pp->p.offset); in iavf_configure_queues()
384 max_frame = min_not_zero(adapter->vf_res->max_mtu, max_frame); in iavf_configure_queues()
386 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_configure_queues()
388 dev_err(&adapter->pdev->dev, "Cannot configure queues, command %d pending\n", in iavf_configure_queues()
389 adapter->current_op); in iavf_configure_queues()
392 adapter->current_op = VIRTCHNL_OP_CONFIG_VSI_QUEUES; in iavf_configure_queues()
398 if (iavf_ptp_cap_supported(adapter, VIRTCHNL_1588_PTP_CAP_RX_TSTAMP)) in iavf_configure_queues()
401 vqci->vsi_id = adapter->vsi_res->vsi_id; in iavf_configure_queues()
410 vqpi->txq.ring_len = adapter->tx_rings[i].count; in iavf_configure_queues()
411 vqpi->txq.dma_ring_addr = adapter->tx_rings[i].dma; in iavf_configure_queues()
414 vqpi->rxq.ring_len = adapter->rx_rings[i].count; in iavf_configure_queues()
415 vqpi->rxq.dma_ring_addr = adapter->rx_rings[i].dma; in iavf_configure_queues()
417 vqpi->rxq.databuffer_size = adapter->rx_rings[i].rx_buf_len; in iavf_configure_queues()
418 if (IAVF_RXDID_ALLOWED(adapter)) in iavf_configure_queues()
419 vqpi->rxq.rxdid = adapter->rxdid; in iavf_configure_queues()
420 if (CRC_OFFLOAD_ALLOWED(adapter)) in iavf_configure_queues()
421 vqpi->rxq.crc_disable = !!(adapter->netdev->features & in iavf_configure_queues()
427 adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_QUEUES; in iavf_configure_queues()
428 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_VSI_QUEUES, in iavf_configure_queues()
435 * @adapter: adapter structure
439 void iavf_enable_queues(struct iavf_adapter *adapter) in iavf_enable_queues() argument
443 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_enable_queues()
445 dev_err(&adapter->pdev->dev, "Cannot enable queues, command %d pending\n", in iavf_enable_queues()
446 adapter->current_op); in iavf_enable_queues()
449 adapter->current_op = VIRTCHNL_OP_ENABLE_QUEUES; in iavf_enable_queues()
450 vqs.vsi_id = adapter->vsi_res->vsi_id; in iavf_enable_queues()
451 vqs.tx_queues = BIT(adapter->num_active_queues) - 1; in iavf_enable_queues()
453 adapter->aq_required &= ~IAVF_FLAG_AQ_ENABLE_QUEUES; in iavf_enable_queues()
454 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_QUEUES, in iavf_enable_queues()
460 * @adapter: adapter structure
464 void iavf_disable_queues(struct iavf_adapter *adapter) in iavf_disable_queues() argument
468 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_disable_queues()
470 dev_err(&adapter->pdev->dev, "Cannot disable queues, command %d pending\n", in iavf_disable_queues()
471 adapter->current_op); in iavf_disable_queues()
474 adapter->current_op = VIRTCHNL_OP_DISABLE_QUEUES; in iavf_disable_queues()
475 vqs.vsi_id = adapter->vsi_res->vsi_id; in iavf_disable_queues()
476 vqs.tx_queues = BIT(adapter->num_active_queues) - 1; in iavf_disable_queues()
478 adapter->aq_required &= ~IAVF_FLAG_AQ_DISABLE_QUEUES; in iavf_disable_queues()
479 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_QUEUES, in iavf_disable_queues()
485 * @adapter: adapter structure
490 void iavf_map_queues(struct iavf_adapter *adapter) in iavf_map_queues() argument
498 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_map_queues()
500 dev_err(&adapter->pdev->dev, "Cannot map queues to vectors, command %d pending\n", in iavf_map_queues()
501 adapter->current_op); in iavf_map_queues()
504 adapter->current_op = VIRTCHNL_OP_CONFIG_IRQ_MAP; in iavf_map_queues()
506 q_vectors = adapter->num_msix_vectors - NONQ_VECS; in iavf_map_queues()
508 len = virtchnl_struct_size(vimi, vecmap, adapter->num_msix_vectors); in iavf_map_queues()
513 vimi->num_vectors = adapter->num_msix_vectors; in iavf_map_queues()
516 q_vector = &adapter->q_vectors[v_idx]; in iavf_map_queues()
519 vecmap->vsi_id = adapter->vsi_res->vsi_id; in iavf_map_queues()
528 vecmap->vsi_id = adapter->vsi_res->vsi_id; in iavf_map_queues()
533 adapter->aq_required &= ~IAVF_FLAG_AQ_MAP_VECTORS; in iavf_map_queues()
534 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_IRQ_MAP, in iavf_map_queues()
555 * @adapter: adapter structure
559 void iavf_add_ether_addrs(struct iavf_adapter *adapter) in iavf_add_ether_addrs() argument
567 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_ether_addrs()
569 dev_err(&adapter->pdev->dev, "Cannot add filters, command %d pending\n", in iavf_add_ether_addrs()
570 adapter->current_op); in iavf_add_ether_addrs()
574 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
576 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_add_ether_addrs()
581 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_MAC_FILTER; in iavf_add_ether_addrs()
582 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
585 adapter->current_op = VIRTCHNL_OP_ADD_ETH_ADDR; in iavf_add_ether_addrs()
589 dev_warn(&adapter->pdev->dev, "Too many add MAC changes in one request\n"); in iavf_add_ether_addrs()
597 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
601 veal->vsi_id = adapter->vsi_res->vsi_id; in iavf_add_ether_addrs()
603 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_add_ether_addrs()
614 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_MAC_FILTER; in iavf_add_ether_addrs()
616 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
618 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_ETH_ADDR, (u8 *)veal, len); in iavf_add_ether_addrs()
624 * @adapter: adapter structure
628 void iavf_del_ether_addrs(struct iavf_adapter *adapter) in iavf_del_ether_addrs() argument
636 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_ether_addrs()
638 dev_err(&adapter->pdev->dev, "Cannot remove filters, command %d pending\n", in iavf_del_ether_addrs()
639 adapter->current_op); in iavf_del_ether_addrs()
643 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
645 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_del_ether_addrs()
650 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_MAC_FILTER; in iavf_del_ether_addrs()
651 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
654 adapter->current_op = VIRTCHNL_OP_DEL_ETH_ADDR; in iavf_del_ether_addrs()
658 dev_warn(&adapter->pdev->dev, "Too many delete MAC changes in one request\n"); in iavf_del_ether_addrs()
665 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
669 veal->vsi_id = adapter->vsi_res->vsi_id; in iavf_del_ether_addrs()
671 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { in iavf_del_ether_addrs()
683 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_MAC_FILTER; in iavf_del_ether_addrs()
685 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
687 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_ETH_ADDR, (u8 *)veal, len); in iavf_del_ether_addrs()
693 * @adapter: adapter structure
697 static void iavf_mac_add_ok(struct iavf_adapter *adapter) in iavf_mac_add_ok() argument
701 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_ok()
702 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { in iavf_mac_add_ok()
707 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_ok()
712 * @adapter: adapter structure
716 static void iavf_mac_add_reject(struct iavf_adapter *adapter) in iavf_mac_add_reject() argument
718 struct net_device *netdev = adapter->netdev; in iavf_mac_add_reject()
721 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_reject()
722 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { in iavf_mac_add_reject()
734 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_reject()
739 * @adapter: adapter structure
743 static void iavf_vlan_add_reject(struct iavf_adapter *adapter) in iavf_vlan_add_reject() argument
747 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_vlan_add_reject()
748 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { in iavf_vlan_add_reject()
752 adapter->num_vlan_filters--; in iavf_vlan_add_reject()
755 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_vlan_add_reject()
760 * @adapter: adapter structure
764 void iavf_add_vlans(struct iavf_adapter *adapter) in iavf_add_vlans() argument
770 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_vlans()
772 dev_err(&adapter->pdev->dev, "Cannot add VLANs, command %d pending\n", in iavf_add_vlans()
773 adapter->current_op); in iavf_add_vlans()
777 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
779 list_for_each_entry(f, &adapter->vlan_filter_list, list) { in iavf_add_vlans()
783 if (!count || !VLAN_FILTERING_ALLOWED(adapter)) { in iavf_add_vlans()
784 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_VLAN_FILTER; in iavf_add_vlans()
785 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
789 if (VLAN_ALLOWED(adapter)) { in iavf_add_vlans()
792 adapter->current_op = VIRTCHNL_OP_ADD_VLAN; in iavf_add_vlans()
796 dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); in iavf_add_vlans()
804 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
808 vvfl->vsi_id = adapter->vsi_res->vsi_id; in iavf_add_vlans()
810 list_for_each_entry(f, &adapter->vlan_filter_list, list) { in iavf_add_vlans()
820 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_VLAN_FILTER; in iavf_add_vlans()
822 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
824 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_VLAN, (u8 *)vvfl, len); in iavf_add_vlans()
827 u16 max_vlans = adapter->vlan_v2_caps.filtering.max_filters; in iavf_add_vlans()
828 u16 current_vlans = iavf_get_num_vlans_added(adapter); in iavf_add_vlans()
831 adapter->current_op = VIRTCHNL_OP_ADD_VLAN_V2; in iavf_add_vlans()
835 count = max_vlans - iavf_get_num_vlans_added(adapter); in iavf_add_vlans()
841 dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); in iavf_add_vlans()
850 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
854 vvfl_v2->vport_id = adapter->vsi_res->vsi_id; in iavf_add_vlans()
856 list_for_each_entry(f, &adapter->vlan_filter_list, list) { in iavf_add_vlans()
859 &adapter->vlan_v2_caps.filtering.filtering_support; in iavf_add_vlans()
880 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_VLAN_FILTER; in iavf_add_vlans()
882 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
884 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_VLAN_V2, in iavf_add_vlans()
892 * @adapter: adapter structure
896 void iavf_del_vlans(struct iavf_adapter *adapter) in iavf_del_vlans() argument
902 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_vlans()
904 dev_err(&adapter->pdev->dev, "Cannot remove VLANs, command %d pending\n", in iavf_del_vlans()
905 adapter->current_op); in iavf_del_vlans()
909 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
911 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { in iavf_del_vlans()
919 !VLAN_FILTERING_ALLOWED(adapter)) { in iavf_del_vlans()
922 adapter->num_vlan_filters--; in iavf_del_vlans()
924 !VLAN_FILTERING_ALLOWED(adapter)) { in iavf_del_vlans()
931 if (!count || !VLAN_FILTERING_ALLOWED(adapter)) { in iavf_del_vlans()
932 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_VLAN_FILTER; in iavf_del_vlans()
933 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
937 if (VLAN_ALLOWED(adapter)) { in iavf_del_vlans()
940 adapter->current_op = VIRTCHNL_OP_DEL_VLAN; in iavf_del_vlans()
944 dev_warn(&adapter->pdev->dev, "Too many delete VLAN changes in one request\n"); in iavf_del_vlans()
952 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
956 vvfl->vsi_id = adapter->vsi_res->vsi_id; in iavf_del_vlans()
958 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { in iavf_del_vlans()
969 adapter->num_vlan_filters--; in iavf_del_vlans()
977 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_VLAN_FILTER; in iavf_del_vlans()
979 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
981 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_VLAN, (u8 *)vvfl, len); in iavf_del_vlans()
986 adapter->current_op = VIRTCHNL_OP_DEL_VLAN_V2; in iavf_del_vlans()
990 dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); in iavf_del_vlans()
999 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
1003 vvfl_v2->vport_id = adapter->vsi_res->vsi_id; in iavf_del_vlans()
1005 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { in iavf_del_vlans()
1009 &adapter->vlan_v2_caps.filtering.filtering_support; in iavf_del_vlans()
1026 adapter->num_vlan_filters--; in iavf_del_vlans()
1035 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_VLAN_FILTER; in iavf_del_vlans()
1037 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
1039 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_VLAN_V2, in iavf_del_vlans()
1047 * @adapter: adapter structure
1051 void iavf_set_promiscuous(struct iavf_adapter *adapter) in iavf_set_promiscuous() argument
1053 struct net_device *netdev = adapter->netdev; in iavf_set_promiscuous()
1057 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_promiscuous()
1059 dev_err(&adapter->pdev->dev, "Cannot set promiscuous mode, command %d pending\n", in iavf_set_promiscuous()
1060 adapter->current_op); in iavf_set_promiscuous()
1065 spin_lock_bh(&adapter->current_netdev_promisc_flags_lock); in iavf_set_promiscuous()
1068 if (!iavf_promiscuous_mode_changed(adapter)) { in iavf_set_promiscuous()
1069 adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE; in iavf_set_promiscuous()
1070 dev_dbg(&adapter->pdev->dev, "No change in promiscuous mode\n"); in iavf_set_promiscuous()
1072 spin_unlock_bh(&adapter->current_netdev_promisc_flags_lock); in iavf_set_promiscuous()
1083 adapter->current_netdev_promisc_flags |= IFF_ALLMULTI; in iavf_set_promiscuous()
1084 adapter->current_netdev_promisc_flags &= ~IFF_PROMISC; in iavf_set_promiscuous()
1085 dev_info(&adapter->pdev->dev, "Entering multicast promiscuous mode\n"); in iavf_set_promiscuous()
1092 adapter->current_netdev_promisc_flags &= in iavf_set_promiscuous()
1094 dev_info(&adapter->pdev->dev, "Leaving promiscuous mode\n"); in iavf_set_promiscuous()
1101 adapter->current_netdev_promisc_flags |= IFF_PROMISC; in iavf_set_promiscuous()
1103 adapter->current_netdev_promisc_flags |= IFF_ALLMULTI; in iavf_set_promiscuous()
1105 adapter->current_netdev_promisc_flags &= ~IFF_ALLMULTI; in iavf_set_promiscuous()
1107 dev_info(&adapter->pdev->dev, "Entering promiscuous mode\n"); in iavf_set_promiscuous()
1110 adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_PROMISC_MODE; in iavf_set_promiscuous()
1113 spin_unlock_bh(&adapter->current_netdev_promisc_flags_lock); in iavf_set_promiscuous()
1115 adapter->current_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE; in iavf_set_promiscuous()
1116 vpi.vsi_id = adapter->vsi_res->vsi_id; in iavf_set_promiscuous()
1118 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE, in iavf_set_promiscuous()
1124 * @adapter: adapter structure
1128 void iavf_request_stats(struct iavf_adapter *adapter) in iavf_request_stats() argument
1132 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_request_stats()
1137 adapter->aq_required &= ~IAVF_FLAG_AQ_REQUEST_STATS; in iavf_request_stats()
1138 adapter->current_op = VIRTCHNL_OP_GET_STATS; in iavf_request_stats()
1139 vqs.vsi_id = adapter->vsi_res->vsi_id; in iavf_request_stats()
1141 if (iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_STATS, (u8 *)&vqs, in iavf_request_stats()
1144 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_request_stats()
1149 * @adapter: adapter structure
1153 void iavf_get_hena(struct iavf_adapter *adapter) in iavf_get_hena() argument
1155 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_get_hena()
1157 dev_err(&adapter->pdev->dev, "Cannot get RSS hash capabilities, command %d pending\n", in iavf_get_hena()
1158 adapter->current_op); in iavf_get_hena()
1161 adapter->current_op = VIRTCHNL_OP_GET_RSS_HENA_CAPS; in iavf_get_hena()
1162 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_HENA; in iavf_get_hena()
1163 iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_RSS_HENA_CAPS, NULL, 0); in iavf_get_hena()
1168 * @adapter: adapter structure
1172 void iavf_set_hena(struct iavf_adapter *adapter) in iavf_set_hena() argument
1176 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_hena()
1178 dev_err(&adapter->pdev->dev, "Cannot set RSS hash enable, command %d pending\n", in iavf_set_hena()
1179 adapter->current_op); in iavf_set_hena()
1182 vrh.hena = adapter->hena; in iavf_set_hena()
1183 adapter->current_op = VIRTCHNL_OP_SET_RSS_HENA; in iavf_set_hena()
1184 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_HENA; in iavf_set_hena()
1185 iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HENA, (u8 *)&vrh, in iavf_set_hena()
1191 * @adapter: adapter structure
1195 void iavf_set_rss_key(struct iavf_adapter *adapter) in iavf_set_rss_key() argument
1200 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_rss_key()
1202 dev_err(&adapter->pdev->dev, "Cannot set RSS key, command %d pending\n", in iavf_set_rss_key()
1203 adapter->current_op); in iavf_set_rss_key()
1206 len = virtchnl_struct_size(vrk, key, adapter->rss_key_size); in iavf_set_rss_key()
1210 vrk->vsi_id = adapter->vsi.id; in iavf_set_rss_key()
1211 vrk->key_len = adapter->rss_key_size; in iavf_set_rss_key()
1212 memcpy(vrk->key, adapter->rss_key, adapter->rss_key_size); in iavf_set_rss_key()
1214 adapter->current_op = VIRTCHNL_OP_CONFIG_RSS_KEY; in iavf_set_rss_key()
1215 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_KEY; in iavf_set_rss_key()
1216 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_RSS_KEY, (u8 *)vrk, len); in iavf_set_rss_key()
1222 * @adapter: adapter structure
1226 void iavf_set_rss_lut(struct iavf_adapter *adapter) in iavf_set_rss_lut() argument
1231 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_rss_lut()
1233 dev_err(&adapter->pdev->dev, "Cannot set RSS LUT, command %d pending\n", in iavf_set_rss_lut()
1234 adapter->current_op); in iavf_set_rss_lut()
1237 len = virtchnl_struct_size(vrl, lut, adapter->rss_lut_size); in iavf_set_rss_lut()
1241 vrl->vsi_id = adapter->vsi.id; in iavf_set_rss_lut()
1242 vrl->lut_entries = adapter->rss_lut_size; in iavf_set_rss_lut()
1243 memcpy(vrl->lut, adapter->rss_lut, adapter->rss_lut_size); in iavf_set_rss_lut()
1244 adapter->current_op = VIRTCHNL_OP_CONFIG_RSS_LUT; in iavf_set_rss_lut()
1245 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_LUT; in iavf_set_rss_lut()
1246 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_RSS_LUT, (u8 *)vrl, len); in iavf_set_rss_lut()
1252 * @adapter: adapter structure
1256 void iavf_set_rss_hfunc(struct iavf_adapter *adapter) in iavf_set_rss_hfunc() argument
1261 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_rss_hfunc()
1263 dev_err(&adapter->pdev->dev, "Cannot set RSS Hash function, command %d pending\n", in iavf_set_rss_hfunc()
1264 adapter->current_op); in iavf_set_rss_hfunc()
1270 vrh->vsi_id = adapter->vsi.id; in iavf_set_rss_hfunc()
1271 vrh->rss_algorithm = adapter->hfunc; in iavf_set_rss_hfunc()
1272 adapter->current_op = VIRTCHNL_OP_CONFIG_RSS_HFUNC; in iavf_set_rss_hfunc()
1273 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_HFUNC; in iavf_set_rss_hfunc()
1274 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_RSS_HFUNC, (u8 *)vrh, len); in iavf_set_rss_hfunc()
1280 * @adapter: adapter structure
1284 void iavf_enable_vlan_stripping(struct iavf_adapter *adapter) in iavf_enable_vlan_stripping() argument
1286 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_enable_vlan_stripping()
1288 dev_err(&adapter->pdev->dev, "Cannot enable stripping, command %d pending\n", in iavf_enable_vlan_stripping()
1289 adapter->current_op); in iavf_enable_vlan_stripping()
1292 adapter->current_op = VIRTCHNL_OP_ENABLE_VLAN_STRIPPING; in iavf_enable_vlan_stripping()
1293 adapter->aq_required &= ~IAVF_FLAG_AQ_ENABLE_VLAN_STRIPPING; in iavf_enable_vlan_stripping()
1294 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_VLAN_STRIPPING, NULL, 0); in iavf_enable_vlan_stripping()
1299 * @adapter: adapter structure
1303 void iavf_disable_vlan_stripping(struct iavf_adapter *adapter) in iavf_disable_vlan_stripping() argument
1305 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_disable_vlan_stripping()
1307 dev_err(&adapter->pdev->dev, "Cannot disable stripping, command %d pending\n", in iavf_disable_vlan_stripping()
1308 adapter->current_op); in iavf_disable_vlan_stripping()
1311 adapter->current_op = VIRTCHNL_OP_DISABLE_VLAN_STRIPPING; in iavf_disable_vlan_stripping()
1312 adapter->aq_required &= ~IAVF_FLAG_AQ_DISABLE_VLAN_STRIPPING; in iavf_disable_vlan_stripping()
1313 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_VLAN_STRIPPING, NULL, 0); in iavf_disable_vlan_stripping()
1334 * @adapter: adapter structure
1340 iavf_set_vc_offload_ethertype(struct iavf_adapter *adapter, in iavf_set_vc_offload_ethertype() argument
1352 &adapter->vlan_v2_caps.offloads.stripping_support; in iavf_set_vc_offload_ethertype()
1357 &adapter->vlan_v2_caps.offloads.insertion_support; in iavf_set_vc_offload_ethertype()
1360 …dev_err(&adapter->pdev->dev, "Invalid opcode %d for setting virtchnl ethertype to enable/disable V… in iavf_set_vc_offload_ethertype()
1373 dev_dbg(&adapter->pdev->dev, "opcode %d unsupported for VLAN TPID 0x%04x\n", in iavf_set_vc_offload_ethertype()
1383 * @adapter: adapter structure
1388 iavf_clear_offload_v2_aq_required(struct iavf_adapter *adapter, u16 tpid, in iavf_clear_offload_v2_aq_required() argument
1394 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1397 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1402 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1405 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1410 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1413 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1418 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1421 adapter->aq_required &= in iavf_clear_offload_v2_aq_required()
1425 …dev_err(&adapter->pdev->dev, "Unsupported opcode %d specified for clearing aq_required bits for VI… in iavf_clear_offload_v2_aq_required()
1432 * @adapter: adapter structure
1437 iavf_send_vlan_offload_v2(struct iavf_adapter *adapter, u16 tpid, in iavf_send_vlan_offload_v2() argument
1443 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_send_vlan_offload_v2()
1445 dev_err(&adapter->pdev->dev, "Cannot send %d, command %d pending\n", in iavf_send_vlan_offload_v2()
1446 offload_op, adapter->current_op); in iavf_send_vlan_offload_v2()
1450 adapter->current_op = offload_op; in iavf_send_vlan_offload_v2()
1456 msg->vport_id = adapter->vsi_res->vsi_id; in iavf_send_vlan_offload_v2()
1459 iavf_clear_offload_v2_aq_required(adapter, tpid, offload_op); in iavf_send_vlan_offload_v2()
1462 if (!iavf_set_vc_offload_ethertype(adapter, msg, tpid, offload_op)) in iavf_send_vlan_offload_v2()
1463 iavf_send_pf_msg(adapter, offload_op, (u8 *)msg, len); in iavf_send_vlan_offload_v2()
1465 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_send_vlan_offload_v2()
1472 * @adapter: adapter structure
1475 void iavf_enable_vlan_stripping_v2(struct iavf_adapter *adapter, u16 tpid) in iavf_enable_vlan_stripping_v2() argument
1477 iavf_send_vlan_offload_v2(adapter, tpid, in iavf_enable_vlan_stripping_v2()
1483 * @adapter: adapter structure
1486 void iavf_disable_vlan_stripping_v2(struct iavf_adapter *adapter, u16 tpid) in iavf_disable_vlan_stripping_v2() argument
1488 iavf_send_vlan_offload_v2(adapter, tpid, in iavf_disable_vlan_stripping_v2()
1494 * @adapter: adapter structure
1497 void iavf_enable_vlan_insertion_v2(struct iavf_adapter *adapter, u16 tpid) in iavf_enable_vlan_insertion_v2() argument
1499 iavf_send_vlan_offload_v2(adapter, tpid, in iavf_enable_vlan_insertion_v2()
1505 * @adapter: adapter structure
1508 void iavf_disable_vlan_insertion_v2(struct iavf_adapter *adapter, u16 tpid) in iavf_disable_vlan_insertion_v2() argument
1510 iavf_send_vlan_offload_v2(adapter, tpid, in iavf_disable_vlan_insertion_v2()
1517 * @adapter: adapter private structure
1522 void iavf_virtchnl_send_ptp_cmd(struct iavf_adapter *adapter) in iavf_virtchnl_send_ptp_cmd() argument
1527 if (!adapter->ptp.clock) { in iavf_virtchnl_send_ptp_cmd()
1531 pci_err(adapter->pdev, "PTP is not initialized\n"); in iavf_virtchnl_send_ptp_cmd()
1532 adapter->aq_required &= ~IAVF_FLAG_AQ_SEND_PTP_CMD; in iavf_virtchnl_send_ptp_cmd()
1536 mutex_lock(&adapter->ptp.aq_cmd_lock); in iavf_virtchnl_send_ptp_cmd()
1537 cmd = list_first_entry_or_null(&adapter->ptp.aq_cmds, in iavf_virtchnl_send_ptp_cmd()
1541 adapter->aq_required &= ~IAVF_FLAG_AQ_SEND_PTP_CMD; in iavf_virtchnl_send_ptp_cmd()
1545 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_virtchnl_send_ptp_cmd()
1547 pci_err(adapter->pdev, in iavf_virtchnl_send_ptp_cmd()
1549 cmd->v_opcode, adapter->current_op); in iavf_virtchnl_send_ptp_cmd()
1553 err = iavf_send_pf_msg(adapter, cmd->v_opcode, cmd->msg, cmd->msglen); in iavf_virtchnl_send_ptp_cmd()
1562 pci_err(adapter->pdev, "Failed to send PTP command %d\n", in iavf_virtchnl_send_ptp_cmd()
1566 if (list_empty(&adapter->ptp.aq_cmds)) in iavf_virtchnl_send_ptp_cmd()
1568 adapter->aq_required &= ~IAVF_FLAG_AQ_SEND_PTP_CMD; in iavf_virtchnl_send_ptp_cmd()
1571 mutex_unlock(&adapter->ptp.aq_cmd_lock); in iavf_virtchnl_send_ptp_cmd()
1577 * @adapter: adapter structure
1581 static void iavf_print_link_message(struct iavf_adapter *adapter) in iavf_print_link_message() argument
1583 struct net_device *netdev = adapter->netdev; in iavf_print_link_message()
1587 if (!adapter->link_up) { in iavf_print_link_message()
1592 if (ADV_LINK_SUPPORT(adapter)) { in iavf_print_link_message()
1593 link_speed_mbps = adapter->link_speed_mbps; in iavf_print_link_message()
1597 switch (adapter->link_speed) { in iavf_print_link_message()
1648 * @adapter: adapter structure
1654 iavf_get_vpe_link_status(struct iavf_adapter *adapter, in iavf_get_vpe_link_status() argument
1657 if (ADV_LINK_SUPPORT(adapter)) in iavf_get_vpe_link_status()
1665 * @adapter: adapter structure for which we are setting the link speed
1671 iavf_set_adapter_link_speed_from_vpe(struct iavf_adapter *adapter, in iavf_set_adapter_link_speed_from_vpe() argument
1674 if (ADV_LINK_SUPPORT(adapter)) in iavf_set_adapter_link_speed_from_vpe()
1675 adapter->link_speed_mbps = in iavf_set_adapter_link_speed_from_vpe()
1678 adapter->link_speed = vpe->event_data.link_event.link_speed; in iavf_set_adapter_link_speed_from_vpe()
1683 * @adapter: iavf adapter struct instance
1687 void iavf_get_qos_caps(struct iavf_adapter *adapter) in iavf_get_qos_caps() argument
1689 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_get_qos_caps()
1691 dev_err(&adapter->pdev->dev, in iavf_get_qos_caps()
1693 adapter->current_op); in iavf_get_qos_caps()
1697 adapter->current_op = VIRTCHNL_OP_GET_QOS_CAPS; in iavf_get_qos_caps()
1698 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_QOS_CAPS; in iavf_get_qos_caps()
1699 iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_QOS_CAPS, NULL, 0); in iavf_get_qos_caps()
1704 * @adapter: iavf adapter struct instance
1713 iavf_set_quanta_size(struct iavf_adapter *adapter, u16 quanta_size, in iavf_set_quanta_size() argument
1718 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_quanta_size()
1720 dev_err(&adapter->pdev->dev, in iavf_set_quanta_size()
1722 adapter->current_op); in iavf_set_quanta_size()
1726 adapter->current_op = VIRTCHNL_OP_CONFIG_QUANTA; in iavf_set_quanta_size()
1731 adapter->aq_required &= ~IAVF_FLAG_AQ_CFG_QUEUES_QUANTA_SIZE; in iavf_set_quanta_size()
1732 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_QUANTA, in iavf_set_quanta_size()
1738 * @adapter: adapter structure
1742 void iavf_cfg_queues_quanta_size(struct iavf_adapter *adapter) in iavf_cfg_queues_quanta_size() argument
1747 iavf_set_quanta_size(adapter, quanta_size, 0, in iavf_cfg_queues_quanta_size()
1748 adapter->num_active_queues); in iavf_cfg_queues_quanta_size()
1753 * @adapter: iavf adapter structure instance
1757 void iavf_cfg_queues_bw(struct iavf_adapter *adapter) in iavf_cfg_queues_bw() argument
1765 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_cfg_queues_bw()
1767 dev_err(&adapter->pdev->dev, in iavf_cfg_queues_bw()
1769 adapter->current_op); in iavf_cfg_queues_bw()
1773 for (i = 0; i < adapter->num_active_queues; i++) { in iavf_cfg_queues_bw()
1774 if (adapter->tx_rings[i].q_shaper_update) in iavf_cfg_queues_bw()
1782 qs_bw_cfg->vsi_id = adapter->vsi.id; in iavf_cfg_queues_bw()
1785 for (i = 0; i < adapter->num_active_queues; i++) { in iavf_cfg_queues_bw()
1786 struct iavf_ring *tx_ring = &adapter->tx_rings[i]; in iavf_cfg_queues_bw()
1798 adapter->current_op = VIRTCHNL_OP_CONFIG_QUEUE_BW; in iavf_cfg_queues_bw()
1799 adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_QUEUES_BW; in iavf_cfg_queues_bw()
1800 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_QUEUE_BW, in iavf_cfg_queues_bw()
1807 * @adapter: adapter structure
1812 void iavf_enable_channels(struct iavf_adapter *adapter) in iavf_enable_channels() argument
1818 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_enable_channels()
1820 dev_err(&adapter->pdev->dev, "Cannot configure mqprio, command %d pending\n", in iavf_enable_channels()
1821 adapter->current_op); in iavf_enable_channels()
1825 len = virtchnl_struct_size(vti, list, adapter->num_tc); in iavf_enable_channels()
1829 vti->num_tc = adapter->num_tc; in iavf_enable_channels()
1831 vti->list[i].count = adapter->ch_config.ch_info[i].count; in iavf_enable_channels()
1832 vti->list[i].offset = adapter->ch_config.ch_info[i].offset; in iavf_enable_channels()
1835 adapter->ch_config.ch_info[i].max_tx_rate; in iavf_enable_channels()
1838 adapter->ch_config.state = __IAVF_TC_RUNNING; in iavf_enable_channels()
1839 adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_enable_channels()
1840 adapter->current_op = VIRTCHNL_OP_ENABLE_CHANNELS; in iavf_enable_channels()
1841 adapter->aq_required &= ~IAVF_FLAG_AQ_ENABLE_CHANNELS; in iavf_enable_channels()
1842 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_CHANNELS, (u8 *)vti, len); in iavf_enable_channels()
1848 * @adapter: adapter structure
1852 void iavf_disable_channels(struct iavf_adapter *adapter) in iavf_disable_channels() argument
1854 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_disable_channels()
1856 dev_err(&adapter->pdev->dev, "Cannot configure mqprio, command %d pending\n", in iavf_disable_channels()
1857 adapter->current_op); in iavf_disable_channels()
1861 adapter->ch_config.state = __IAVF_TC_INVALID; in iavf_disable_channels()
1862 adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_disable_channels()
1863 adapter->current_op = VIRTCHNL_OP_DISABLE_CHANNELS; in iavf_disable_channels()
1864 adapter->aq_required &= ~IAVF_FLAG_AQ_DISABLE_CHANNELS; in iavf_disable_channels()
1865 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_CHANNELS, NULL, 0); in iavf_disable_channels()
1870 * @adapter: adapter structure
1875 static void iavf_print_cloud_filter(struct iavf_adapter *adapter, in iavf_print_cloud_filter() argument
1880 …dev_info(&adapter->pdev->dev, "dst_mac: %pM src_mac: %pM vlan_id: %hu dst_ip: %pI4 src_ip %pI4 dst… in iavf_print_cloud_filter()
1890 …dev_info(&adapter->pdev->dev, "dst_mac: %pM src_mac: %pM vlan_id: %hu dst_ip: %pI6 src_ip %pI6 dst… in iavf_print_cloud_filter()
1904 * @adapter: adapter structure
1909 void iavf_add_cloud_filter(struct iavf_adapter *adapter) in iavf_add_cloud_filter() argument
1915 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_cloud_filter()
1917 dev_err(&adapter->pdev->dev, "Cannot add cloud filter, command %d pending\n", in iavf_add_cloud_filter()
1918 adapter->current_op); in iavf_add_cloud_filter()
1921 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_add_cloud_filter()
1928 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_CLOUD_FILTER; in iavf_add_cloud_filter()
1931 adapter->current_op = VIRTCHNL_OP_ADD_CLOUD_FILTER; in iavf_add_cloud_filter()
1938 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_add_cloud_filter()
1943 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_CLOUD_FILTER, in iavf_add_cloud_filter()
1952 * @adapter: adapter structure
1957 void iavf_del_cloud_filter(struct iavf_adapter *adapter) in iavf_del_cloud_filter() argument
1963 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_cloud_filter()
1965 dev_err(&adapter->pdev->dev, "Cannot remove cloud filter, command %d pending\n", in iavf_del_cloud_filter()
1966 adapter->current_op); in iavf_del_cloud_filter()
1969 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_del_cloud_filter()
1976 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_CLOUD_FILTER; in iavf_del_cloud_filter()
1979 adapter->current_op = VIRTCHNL_OP_DEL_CLOUD_FILTER; in iavf_del_cloud_filter()
1986 list_for_each_entry_safe(cf, cftmp, &adapter->cloud_filter_list, list) { in iavf_del_cloud_filter()
1991 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_CLOUD_FILTER, in iavf_del_cloud_filter()
2000 * @adapter: the VF adapter structure
2005 void iavf_add_fdir_filter(struct iavf_adapter *adapter) in iavf_add_fdir_filter() argument
2012 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_fdir_filter()
2014 dev_err(&adapter->pdev->dev, "Cannot add Flow Director filter, command %d pending\n", in iavf_add_fdir_filter()
2015 adapter->current_op); in iavf_add_fdir_filter()
2024 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_add_fdir_filter()
2025 list_for_each_entry(fdir, &adapter->fdir_list_head, list) { in iavf_add_fdir_filter()
2033 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_add_fdir_filter()
2039 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_FDIR_FILTER; in iavf_add_fdir_filter()
2043 adapter->current_op = VIRTCHNL_OP_ADD_FDIR_FILTER; in iavf_add_fdir_filter()
2044 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_FDIR_FILTER, (u8 *)f, len); in iavf_add_fdir_filter()
2050 * @adapter: the VF adapter structure
2055 void iavf_del_fdir_filter(struct iavf_adapter *adapter) in iavf_del_fdir_filter() argument
2062 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_fdir_filter()
2064 dev_err(&adapter->pdev->dev, "Cannot remove Flow Director filter, command %d pending\n", in iavf_del_fdir_filter()
2065 adapter->current_op); in iavf_del_fdir_filter()
2071 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_del_fdir_filter()
2072 list_for_each_entry(fdir, &adapter->fdir_list_head, list) { in iavf_del_fdir_filter()
2087 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_del_fdir_filter()
2090 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_FDIR_FILTER; in iavf_del_fdir_filter()
2094 adapter->current_op = VIRTCHNL_OP_DEL_FDIR_FILTER; in iavf_del_fdir_filter()
2095 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_FDIR_FILTER, (u8 *)&f, len); in iavf_del_fdir_filter()
2100 * @adapter: the VF adapter structure
2105 void iavf_add_adv_rss_cfg(struct iavf_adapter *adapter) in iavf_add_adv_rss_cfg() argument
2112 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_adv_rss_cfg()
2114 dev_err(&adapter->pdev->dev, "Cannot add RSS configuration, command %d pending\n", in iavf_add_adv_rss_cfg()
2115 adapter->current_op); in iavf_add_adv_rss_cfg()
2124 spin_lock_bh(&adapter->adv_rss_lock); in iavf_add_adv_rss_cfg()
2125 list_for_each_entry(rss, &adapter->adv_rss_list_head, list) { in iavf_add_adv_rss_cfg()
2130 iavf_print_adv_rss_cfg(adapter, rss, in iavf_add_adv_rss_cfg()
2136 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_add_adv_rss_cfg()
2139 adapter->current_op = VIRTCHNL_OP_ADD_RSS_CFG; in iavf_add_adv_rss_cfg()
2140 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_RSS_CFG, in iavf_add_adv_rss_cfg()
2143 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_ADV_RSS_CFG; in iavf_add_adv_rss_cfg()
2151 * @adapter: the VF adapter structure
2156 void iavf_del_adv_rss_cfg(struct iavf_adapter *adapter) in iavf_del_adv_rss_cfg() argument
2163 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_adv_rss_cfg()
2165 dev_err(&adapter->pdev->dev, "Cannot remove RSS configuration, command %d pending\n", in iavf_del_adv_rss_cfg()
2166 adapter->current_op); in iavf_del_adv_rss_cfg()
2175 spin_lock_bh(&adapter->adv_rss_lock); in iavf_del_adv_rss_cfg()
2176 list_for_each_entry(rss, &adapter->adv_rss_list_head, list) { in iavf_del_adv_rss_cfg()
2184 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_del_adv_rss_cfg()
2187 adapter->current_op = VIRTCHNL_OP_DEL_RSS_CFG; in iavf_del_adv_rss_cfg()
2188 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_RSS_CFG, in iavf_del_adv_rss_cfg()
2191 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_ADV_RSS_CFG; in iavf_del_adv_rss_cfg()
2199 * @adapter: adapter structure
2203 int iavf_request_reset(struct iavf_adapter *adapter) in iavf_request_reset() argument
2207 err = iavf_send_pf_msg(adapter, VIRTCHNL_OP_RESET_VF, NULL, 0); in iavf_request_reset()
2208 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_request_reset()
2230 * @adapter: private adapter structure
2235 static void iavf_activate_fdir_filters(struct iavf_adapter *adapter) in iavf_activate_fdir_filters() argument
2240 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_activate_fdir_filters()
2241 list_for_each_entry_safe(f, ftmp, &adapter->fdir_list_head, list) { in iavf_activate_fdir_filters()
2260 iavf_dec_fdir_active_fltr(adapter, f); in iavf_activate_fdir_filters()
2264 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_activate_fdir_filters()
2267 adapter->aq_required |= IAVF_FLAG_AQ_ADD_FDIR_FILTER; in iavf_activate_fdir_filters()
2272 * @adapter: private adapter structure
2282 static void iavf_virtchnl_ptp_get_time(struct iavf_adapter *adapter, in iavf_virtchnl_ptp_get_time() argument
2288 dev_err_once(&adapter->pdev->dev, in iavf_virtchnl_ptp_get_time()
2294 adapter->ptp.cached_phc_time = msg->time; in iavf_virtchnl_ptp_get_time()
2295 adapter->ptp.cached_phc_updated = jiffies; in iavf_virtchnl_ptp_get_time()
2296 adapter->ptp.phc_time_ready = true; in iavf_virtchnl_ptp_get_time()
2298 wake_up(&adapter->ptp.phc_time_waitqueue); in iavf_virtchnl_ptp_get_time()
2303 * @adapter: adapter structure
2313 void iavf_virtchnl_completion(struct iavf_adapter *adapter, in iavf_virtchnl_completion() argument
2317 struct net_device *netdev = adapter->netdev; in iavf_virtchnl_completion()
2322 bool link_up = iavf_get_vpe_link_status(adapter, vpe); in iavf_virtchnl_completion()
2326 iavf_set_adapter_link_speed_from_vpe(adapter, vpe); in iavf_virtchnl_completion()
2329 if (adapter->link_up == link_up) in iavf_virtchnl_completion()
2340 if (adapter->state != __IAVF_RUNNING) in iavf_virtchnl_completion()
2347 if (adapter->flags & in iavf_virtchnl_completion()
2352 adapter->link_up = link_up; in iavf_virtchnl_completion()
2360 iavf_print_link_message(adapter); in iavf_virtchnl_completion()
2363 dev_info(&adapter->pdev->dev, "Reset indication received from the PF\n"); in iavf_virtchnl_completion()
2364 if (!(adapter->flags & IAVF_FLAG_RESET_PENDING)) { in iavf_virtchnl_completion()
2365 dev_info(&adapter->pdev->dev, "Scheduling reset task\n"); in iavf_virtchnl_completion()
2366 iavf_schedule_reset(adapter, IAVF_FLAG_RESET_PENDING); in iavf_virtchnl_completion()
2370 dev_err(&adapter->pdev->dev, "Unknown event %d from PF\n", in iavf_virtchnl_completion()
2379 dev_err(&adapter->pdev->dev, "Failed to add VLAN filter, error %s\n", in iavf_virtchnl_completion()
2380 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2383 dev_err(&adapter->pdev->dev, "Failed to add MAC filter, error %s\n", in iavf_virtchnl_completion()
2384 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2385 iavf_mac_add_reject(adapter); in iavf_virtchnl_completion()
2387 ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr); in iavf_virtchnl_completion()
2388 wake_up(&adapter->vc_waitqueue); in iavf_virtchnl_completion()
2391 dev_err(&adapter->pdev->dev, "Failed to delete VLAN filter, error %s\n", in iavf_virtchnl_completion()
2392 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2395 dev_err(&adapter->pdev->dev, "Failed to delete MAC filter, error %s\n", in iavf_virtchnl_completion()
2396 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2399 dev_err(&adapter->pdev->dev, "Failed to configure queue channels, error %s\n", in iavf_virtchnl_completion()
2400 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2401 adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_virtchnl_completion()
2402 adapter->ch_config.state = __IAVF_TC_INVALID; in iavf_virtchnl_completion()
2407 dev_err(&adapter->pdev->dev, "Failed to disable queue channels, error %s\n", in iavf_virtchnl_completion()
2408 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2409 adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_virtchnl_completion()
2410 adapter->ch_config.state = __IAVF_TC_RUNNING; in iavf_virtchnl_completion()
2417 &adapter->cloud_filter_list, in iavf_virtchnl_completion()
2421 dev_info(&adapter->pdev->dev, "Failed to add cloud filter, error %s\n", in iavf_virtchnl_completion()
2422 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
2424 iavf_print_cloud_filter(adapter, in iavf_virtchnl_completion()
2428 adapter->num_cloud_filters--; in iavf_virtchnl_completion()
2436 list_for_each_entry(cf, &adapter->cloud_filter_list, in iavf_virtchnl_completion()
2440 dev_info(&adapter->pdev->dev, "Failed to del cloud filter, error %s\n", in iavf_virtchnl_completion()
2441 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
2443 iavf_print_cloud_filter(adapter, in iavf_virtchnl_completion()
2452 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2454 &adapter->fdir_list_head, in iavf_virtchnl_completion()
2457 dev_info(&adapter->pdev->dev, "Failed to add Flow Director filter, error %s\n", in iavf_virtchnl_completion()
2458 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
2460 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
2462 dev_err(&adapter->pdev->dev, in iavf_virtchnl_completion()
2465 iavf_dec_fdir_active_fltr(adapter, fdir); in iavf_virtchnl_completion()
2469 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2475 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2476 list_for_each_entry(fdir, &adapter->fdir_list_head, in iavf_virtchnl_completion()
2481 dev_info(&adapter->pdev->dev, "Failed to del Flow Director filter, error %s\n", in iavf_virtchnl_completion()
2482 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
2484 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
2487 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2493 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2495 &adapter->adv_rss_list_head, in iavf_virtchnl_completion()
2498 iavf_print_adv_rss_cfg(adapter, rss, in iavf_virtchnl_completion()
2505 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2511 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2512 list_for_each_entry(rss, &adapter->adv_rss_list_head, in iavf_virtchnl_completion()
2516 dev_err(&adapter->pdev->dev, "Failed to delete RSS configuration, error %s\n", in iavf_virtchnl_completion()
2517 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
2521 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2525 …dev_warn(&adapter->pdev->dev, "Changing VLAN Stripping is not allowed when Port VLAN is configured… in iavf_virtchnl_completion()
2532 …dev_warn(&adapter->pdev->dev, "Changing VLAN Stripping is not allowed when Port VLAN is configured… in iavf_virtchnl_completion()
2539 iavf_vlan_add_reject(adapter); in iavf_virtchnl_completion()
2540 dev_warn(&adapter->pdev->dev, "Failed to add VLAN filter, error %s\n", in iavf_virtchnl_completion()
2541 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2544 dev_warn(&adapter->pdev->dev, "Failed to configure hash function, error %s\n", in iavf_virtchnl_completion()
2545 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2547 if (adapter->hfunc == in iavf_virtchnl_completion()
2549 adapter->hfunc = in iavf_virtchnl_completion()
2552 adapter->hfunc = in iavf_virtchnl_completion()
2557 dev_warn(&adapter->pdev->dev, "Failed to Get Qos CAPs, error %s\n", in iavf_virtchnl_completion()
2558 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2561 dev_warn(&adapter->pdev->dev, "Failed to Config Quanta, error %s\n", in iavf_virtchnl_completion()
2562 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2565 dev_warn(&adapter->pdev->dev, "Failed to Config Queue BW, error %s\n", in iavf_virtchnl_completion()
2566 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
2569 dev_err(&adapter->pdev->dev, "PF returned error %d (%s) to our request %d\n", in iavf_virtchnl_completion()
2570 v_retval, iavf_stat_str(&adapter->hw, v_retval), in iavf_virtchnl_completion()
2577 iavf_mac_add_ok(adapter); in iavf_virtchnl_completion()
2578 if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) in iavf_virtchnl_completion()
2580 adapter->hw.mac.addr)) { in iavf_virtchnl_completion()
2582 eth_hw_addr_set(netdev, adapter->hw.mac.addr); in iavf_virtchnl_completion()
2585 wake_up(&adapter->vc_waitqueue); in iavf_virtchnl_completion()
2601 adapter->current_stats = *stats; in iavf_virtchnl_completion()
2607 memcpy(adapter->vf_res, msg, min(msglen, len)); in iavf_virtchnl_completion()
2608 iavf_validate_num_queues(adapter); in iavf_virtchnl_completion()
2609 iavf_vf_parse_hw_config(&adapter->hw, adapter->vf_res); in iavf_virtchnl_completion()
2610 if (is_zero_ether_addr(adapter->hw.mac.addr)) { in iavf_virtchnl_completion()
2612 ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr); in iavf_virtchnl_completion()
2617 adapter->hw.mac.addr); in iavf_virtchnl_completion()
2620 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
2621 iavf_add_filter(adapter, adapter->hw.mac.addr); in iavf_virtchnl_completion()
2623 if (VLAN_ALLOWED(adapter)) { in iavf_virtchnl_completion()
2624 if (!list_empty(&adapter->vlan_filter_list)) { in iavf_virtchnl_completion()
2629 &adapter->vlan_filter_list, in iavf_virtchnl_completion()
2633 adapter->aq_required |= in iavf_virtchnl_completion()
2638 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
2640 iavf_activate_fdir_filters(adapter); in iavf_virtchnl_completion()
2642 iavf_parse_vf_resource_msg(adapter); in iavf_virtchnl_completion()
2648 if (VLAN_V2_ALLOWED(adapter)) in iavf_virtchnl_completion()
2661 memcpy(&adapter->vlan_v2_caps, msg, in iavf_virtchnl_completion()
2663 sizeof(adapter->vlan_v2_caps))); in iavf_virtchnl_completion()
2665 iavf_process_config(adapter); in iavf_virtchnl_completion()
2666 adapter->flags |= IAVF_FLAG_SETUP_NETDEV_FEATURES; in iavf_virtchnl_completion()
2667 iavf_schedule_finish_config(adapter); in iavf_virtchnl_completion()
2669 iavf_set_queue_vlan_tag_loc(adapter); in iavf_virtchnl_completion()
2672 adapter->hw.mac.addr); in iavf_virtchnl_completion()
2674 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
2677 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_virtchnl_completion()
2681 adapter->hw.mac.addr); in iavf_virtchnl_completion()
2690 if (VLAN_FILTERING_ALLOWED(adapter)) { in iavf_virtchnl_completion()
2693 if (!list_empty(&adapter->vlan_filter_list)) { in iavf_virtchnl_completion()
2695 &adapter->vlan_filter_list, in iavf_virtchnl_completion()
2703 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
2706 eth_hw_addr_set(netdev, adapter->hw.mac.addr); in iavf_virtchnl_completion()
2709 adapter->aq_required |= IAVF_FLAG_AQ_ADD_MAC_FILTER | in iavf_virtchnl_completion()
2717 adapter->supp_rxdids = *(u64 *)msg; in iavf_virtchnl_completion()
2721 if (msglen != sizeof(adapter->ptp.hw_caps)) in iavf_virtchnl_completion()
2724 adapter->ptp.hw_caps = *(struct virtchnl_ptp_caps *)msg; in iavf_virtchnl_completion()
2727 iavf_ptp_process_caps(adapter); in iavf_virtchnl_completion()
2730 iavf_virtchnl_ptp_get_time(adapter, msg, msglen); in iavf_virtchnl_completion()
2734 iavf_irq_enable(adapter, true); in iavf_virtchnl_completion()
2735 wake_up(&adapter->reset_waitqueue); in iavf_virtchnl_completion()
2736 adapter->flags &= ~IAVF_FLAG_QUEUES_DISABLED; in iavf_virtchnl_completion()
2739 iavf_free_all_tx_resources(adapter); in iavf_virtchnl_completion()
2740 iavf_free_all_rx_resources(adapter); in iavf_virtchnl_completion()
2741 if (adapter->state == __IAVF_DOWN_PENDING) { in iavf_virtchnl_completion()
2742 iavf_change_state(adapter, __IAVF_DOWN); in iavf_virtchnl_completion()
2743 wake_up(&adapter->down_waitqueue); in iavf_virtchnl_completion()
2752 if (v_opcode != adapter->current_op) in iavf_virtchnl_completion()
2759 adapter->hena = vrh->hena; in iavf_virtchnl_completion()
2761 dev_warn(&adapter->pdev->dev, in iavf_virtchnl_completion()
2769 if (vfres->num_queue_pairs != adapter->num_req_queues) { in iavf_virtchnl_completion()
2770 dev_info(&adapter->pdev->dev, in iavf_virtchnl_completion()
2772 adapter->num_req_queues, in iavf_virtchnl_completion()
2774 adapter->num_req_queues = 0; in iavf_virtchnl_completion()
2775 adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_virtchnl_completion()
2782 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_virtchnl_completion()
2791 list_for_each_entry_safe(cf, cftmp, &adapter->cloud_filter_list, in iavf_virtchnl_completion()
2797 adapter->num_cloud_filters--; in iavf_virtchnl_completion()
2806 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2808 &adapter->fdir_list_head, in iavf_virtchnl_completion()
2813 dev_info(&adapter->pdev->dev, "Flow Director filter with location %u is added\n", in iavf_virtchnl_completion()
2816 dev_info(&adapter->pdev->dev, "Flow Director filter (raw) for TC handle %x is added\n", in iavf_virtchnl_completion()
2821 dev_info(&adapter->pdev->dev, "Failed to add Flow Director filter with status: %d\n", in iavf_virtchnl_completion()
2823 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
2825 iavf_dec_fdir_active_fltr(adapter, fdir); in iavf_virtchnl_completion()
2830 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2837 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2838 list_for_each_entry_safe(fdir, fdir_tmp, &adapter->fdir_list_head, in iavf_virtchnl_completion()
2845 dev_info(&adapter->pdev->dev, "Flow Director filter with location %u is deleted\n", in iavf_virtchnl_completion()
2848 dev_info(&adapter->pdev->dev, "Flow Director filter (raw) for TC handle %x is deleted\n", in iavf_virtchnl_completion()
2851 iavf_dec_fdir_active_fltr(adapter, fdir); in iavf_virtchnl_completion()
2855 dev_info(&adapter->pdev->dev, "Failed to delete Flow Director filter with status: %d\n", in iavf_virtchnl_completion()
2857 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
2866 dev_info(&adapter->pdev->dev, "Failed to disable Flow Director filter with status: %d\n", in iavf_virtchnl_completion()
2868 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
2872 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
2878 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2879 list_for_each_entry(rss, &adapter->adv_rss_list_head, list) { in iavf_virtchnl_completion()
2881 iavf_print_adv_rss_cfg(adapter, rss, in iavf_virtchnl_completion()
2887 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2893 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2895 &adapter->adv_rss_list_head, list) { in iavf_virtchnl_completion()
2901 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
2907 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
2908 list_for_each_entry(f, &adapter->vlan_filter_list, list) { in iavf_virtchnl_completion()
2912 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
2930 u16 len = struct_size(adapter->qos_caps, cap, in iavf_virtchnl_completion()
2933 memcpy(adapter->qos_caps, msg, min(msglen, len)); in iavf_virtchnl_completion()
2935 adapter->aq_required |= IAVF_FLAG_AQ_CFG_QUEUES_QUANTA_SIZE; in iavf_virtchnl_completion()
2943 for (i = 0; i < adapter->num_active_queues; i++) in iavf_virtchnl_completion()
2944 adapter->tx_rings[i].q_shaper_update = false; in iavf_virtchnl_completion()
2948 if (adapter->current_op && (v_opcode != adapter->current_op)) in iavf_virtchnl_completion()
2949 dev_warn(&adapter->pdev->dev, "Expected response %d from PF, received %d\n", in iavf_virtchnl_completion()
2950 adapter->current_op, v_opcode); in iavf_virtchnl_completion()
2953 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_virtchnl_completion()