| 796 | } |
| 797 | |
| 798 | static int |
| 799 | dcf_config_promisc(struct ice_dcf_adapter *adapter, |
| 800 | bool enable_unicast, |
| 801 | bool enable_multicast) |
| 802 | { |
| 803 | struct ice_dcf_hw *hw = &adapter->real_hw; |
| 804 | struct virtchnl_promisc_info promisc; |
| 805 | struct dcf_virtchnl_cmd args; |
| 806 | int err; |
| 807 | |
| 808 | promisc.flags = 0; |
| 809 | promisc.vsi_id = hw->vsi_res->vsi_id; |
| 810 | |
| 811 | if (enable_unicast) |
| 812 | promisc.flags |= FLAG_VF_UNICAST_PROMISC; |
| 813 | |
| 814 | if (enable_multicast) |
| 815 | promisc.flags |= FLAG_VF_MULTICAST_PROMISC; |
| 816 | |
| 817 | memset(&args, 0, sizeof(args)); |
| 818 | args.v_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE; |
| 819 | args.req_msg = (uint8_t *)&promisc; |
| 820 | args.req_msglen = sizeof(promisc); |
| 821 | |
| 822 | err = ice_dcf_execute_virtchnl_cmd(hw, &args); |
| 823 | if (err) { |
| 824 | PMD_DRV_LOG(ERR, |
| 825 | "fail to execute command VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE"); |
| 826 | return err; |
| 827 | } |
| 828 | |
| 829 | adapter->promisc_unicast_enabled = enable_unicast; |
| 830 | adapter->promisc_multicast_enabled = enable_multicast; |
| 831 | return 0; |
| 832 | } |
| 833 | |
| 834 | static int |
| 835 | ice_dcf_dev_promiscuous_enable(__rte_unused struct rte_eth_dev *dev) |
no test coverage detected