Lines Matching refs:rate_cfg
138 struct hinic_tx_rate_cfg_max_min rate_cfg = {0}; in hinic_set_vf_tx_rate_max_min() local
139 u16 out_size = sizeof(rate_cfg); in hinic_set_vf_tx_rate_max_min()
142 rate_cfg.func_id = hinic_glb_pf_vf_offset(hwdev->hwif) + vf_id; in hinic_set_vf_tx_rate_max_min()
143 rate_cfg.max_rate = max_rate; in hinic_set_vf_tx_rate_max_min()
144 rate_cfg.min_rate = min_rate; in hinic_set_vf_tx_rate_max_min()
146 &rate_cfg, sizeof(rate_cfg), &rate_cfg, in hinic_set_vf_tx_rate_max_min()
148 if ((rate_cfg.status != HINIC_MGMT_CMD_UNSUPPORTED && in hinic_set_vf_tx_rate_max_min()
149 rate_cfg.status) || err || !out_size) { in hinic_set_vf_tx_rate_max_min()
152 rate_cfg.status, out_size); in hinic_set_vf_tx_rate_max_min()
156 if (!rate_cfg.status) { in hinic_set_vf_tx_rate_max_min()
161 return rate_cfg.status; in hinic_set_vf_tx_rate_max_min()
168 struct hinic_tx_rate_cfg rate_cfg = {0}; in hinic_set_vf_rate_limit() local
169 u16 out_size = sizeof(rate_cfg); in hinic_set_vf_rate_limit()
172 rate_cfg.func_id = hinic_glb_pf_vf_offset(hwdev->hwif) + vf_id; in hinic_set_vf_rate_limit()
173 rate_cfg.tx_rate = tx_rate; in hinic_set_vf_rate_limit()
175 &rate_cfg, sizeof(rate_cfg), &rate_cfg, in hinic_set_vf_rate_limit()
177 if (err || !out_size || rate_cfg.status) { in hinic_set_vf_rate_limit()
179 HW_VF_ID_TO_OS(vf_id), tx_rate, err, rate_cfg.status, in hinic_set_vf_rate_limit()
181 if (rate_cfg.status) in hinic_set_vf_rate_limit()
182 return rate_cfg.status; in hinic_set_vf_rate_limit()