Lines Matching full:flow

4 /* flow director ethtool support for ice */
35 * flow type values
36 * @flow: filter type to be converted
38 * Returns the corresponding ethtool flow type.
40 static int ice_fltr_to_ethtool_flow(enum ice_fltr_ptype flow) in ice_fltr_to_ethtool_flow() argument
42 switch (flow) { in ice_fltr_to_ethtool_flow()
60 /* 0 is undefined ethtool flow */ in ice_fltr_to_ethtool_flow()
66 * ice_ethtool_flow_to_fltr - convert ethtool flow type to filter enum
67 * @eth: Ethtool flow type to be converted
69 * Returns flow enum
260 * ice_fdir_get_hw_prof - return the ice_fd_hw_proc associated with a flow
263 * @flow: FDir flow type to release
266 ice_fdir_get_hw_prof(struct ice_hw *hw, enum ice_block blk, int flow) in ice_fdir_get_hw_prof() argument
269 return hw->fdir_prof[flow]; in ice_fdir_get_hw_prof()
275 * ice_fdir_erase_flow_from_hw - remove a flow from the HW profile tables
278 * @flow: FDir flow type to release
281 ice_fdir_erase_flow_from_hw(struct ice_hw *hw, enum ice_block blk, int flow) in ice_fdir_erase_flow_from_hw() argument
283 struct ice_fd_hw_prof *prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_erase_flow_from_hw()
293 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_erase_flow_from_hw()
312 * @flow_type: FDir flow type to release
318 int flow = (int)flow_type & ~FLOW_EXT; in ice_fdir_rem_flow() local
322 prof = ice_fdir_get_hw_prof(hw, blk, flow); in ice_fdir_rem_flow()
326 ice_fdir_erase_flow_from_hw(hw, blk, flow); in ice_fdir_rem_flow()
344 int flow; in ice_fdir_release_flows() local
346 /* release Flow Director HW table entries */ in ice_fdir_release_flows()
347 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) in ice_fdir_release_flows()
348 ice_fdir_erase_flow_from_hw(hw, ICE_BLK_FD, flow); in ice_fdir_release_flows()
352 * ice_fdir_replay_flows - replay HW Flow Director filter info
357 int flow; in ice_fdir_replay_flows() local
359 for (flow = 0; flow < ICE_FLTR_PTYPE_MAX; flow++) { in ice_fdir_replay_flows()
362 if (!hw->fdir_prof[flow] || !hw->fdir_prof[flow]->cnt) in ice_fdir_replay_flows()
370 prof = hw->fdir_prof[flow]; in ice_fdir_replay_flows()
371 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_replay_flows()
388 dev_err(ice_hw_to_dev(hw), "Could not replay Flow Director, flow type %d\n", in ice_fdir_replay_flows()
389 flow); in ice_fdir_replay_flows()
400 * @fsp: pointer to ethtool Rx flow specification
446 * ice_fdir_num_avail_fltr - return the number of unused flow director filters
457 * Returns the number of available flow director filters to this VSI
483 * ice_fdir_alloc_flow_prof - allocate FDir flow profile structure(s)
484 * @hw: HW structure containing the FDir flow profile structure(s)
485 * @flow: flow type to allocate the flow profile for
487 * Allocate the fdir_prof and fdir_prof[flow] if not already created. Return 0
491 ice_fdir_alloc_flow_prof(struct ice_hw *hw, enum ice_fltr_ptype flow) in ice_fdir_alloc_flow_prof() argument
505 if (!hw->fdir_prof[flow]) { in ice_fdir_alloc_flow_prof()
506 hw->fdir_prof[flow] = devm_kzalloc(ice_hw_to_dev(hw), in ice_fdir_alloc_flow_prof()
509 if (!hw->fdir_prof[flow]) in ice_fdir_alloc_flow_prof()
520 * @flow: filter enum
525 enum ice_fltr_ptype flow, enum ice_fd_hw_seg tun) in ice_fdir_set_hw_fltr_rule() argument
547 err = ice_fdir_alloc_flow_prof(hw, flow); in ice_fdir_set_hw_fltr_rule()
551 hw_prof = hw->fdir_prof[flow]; in ice_fdir_set_hw_fltr_rule()
561 /* if there are FDir filters using this flow, in ice_fdir_set_hw_fltr_rule()
564 if (hw->fdir_fltr_cnt[flow]) { in ice_fdir_set_hw_fltr_rule()
565 …dev_err(dev, "Failed to add filter. Flow director filters on each port must have the same input s… in ice_fdir_set_hw_fltr_rule()
569 if (ice_is_arfs_using_perfect_flow(hw, flow)) { in ice_fdir_set_hw_fltr_rule()
570 dev_err(dev, "aRFS using perfect flow type %d, cannot change input set\n", in ice_fdir_set_hw_fltr_rule()
571 flow); in ice_fdir_set_hw_fltr_rule()
576 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_fdir_set_hw_fltr_rule()
583 prof_id = flow + tun * ICE_FLTR_PTYPE_MAX; in ice_fdir_set_hw_fltr_rule()
619 …dev_err(dev, "Failed to add filter. Flow director filters on each port must have the same input s… in ice_fdir_set_hw_fltr_rule()
626 * @seg: flow segment for programming
630 * Set the configuration for perfect filters to the provided flow segment for
688 * @flow: filter enum
693 ice_create_init_fdir_rule(struct ice_pf *pf, enum ice_fltr_ptype flow) in ice_create_init_fdir_rule() argument
701 if (hw->fdir_prof && hw->fdir_prof[flow] && in ice_create_init_fdir_rule()
702 hw->fdir_prof[flow]->fdir_seg[0]) in ice_create_init_fdir_rule()
716 if (flow == ICE_FLTR_PTYPE_NONF_IPV4_TCP) in ice_create_init_fdir_rule()
719 else if (flow == ICE_FLTR_PTYPE_NONF_IPV4_UDP) in ice_create_init_fdir_rule()
722 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_TCP) in ice_create_init_fdir_rule()
725 else if (flow == ICE_FLTR_PTYPE_NONF_IPV6_UDP) in ice_create_init_fdir_rule()
734 ret = ice_fdir_set_hw_fltr_rule(pf, seg, flow, ICE_FD_HW_SEG_NON_TUN); in ice_create_init_fdir_rule()
741 ret = ice_fdir_set_hw_fltr_rule(pf, tun_seg, flow, ICE_FD_HW_SEG_TUN); in ice_create_init_fdir_rule()
748 set_bit(flow, hw->fdir_perfect_fltr); in ice_create_init_fdir_rule()
759 * @seg: flow segment for programming
765 * Set the mask data into the flow segment to be used to program HW
845 * @seg: flow segment for programming
850 * Set the offset data into the flow segment to be used to program HW
900 * @seg: flow segment for programming
906 * Set the mask data into the flow segment to be used to program HW
991 * @seg: flow segment for programming
996 * Set the offset data into the flow segment to be used to program HW
1051 * @fsp: pointer to ethtool Rx flow specification
1052 * @user: user defined data from flow specification
1177 * ice_fdir_write_fltr - send a flow director filter to the hardware
1253 * ice_fdir_write_all_fltr - send a flow director filter to the hardware
1293 dev_dbg(ice_pf_to_dev(pf), "Flow Director error %d, could not reprogram filter %d\n", in ice_fdir_replay_fltrs()
1327 * ice_vsi_manage_fdir - turn on/off flow director
1336 enum ice_fltr_ptype flow; in ice_vsi_manage_fdir() local
1356 for (flow = ICE_FLTR_PTYPE_NONF_NONE; flow < ICE_FLTR_PTYPE_MAX; in ice_vsi_manage_fdir()
1357 flow++) in ice_vsi_manage_fdir()
1358 if (hw->fdir_prof[flow]) in ice_vsi_manage_fdir()
1359 ice_fdir_rem_flow(hw, ICE_BLK_FD, flow); in ice_vsi_manage_fdir()
1366 * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
1368 * @flow_type: FDir flow type to release
1432 * ice_del_fdir_ethtool - delete Flow Director filter
1434 * @cmd: command to add or delete Flow Director filter
1451 …dev_err(ice_pf_to_dev(pf), "Device is resetting - deleting Flow Director filters not supported dur… in ice_del_fdir_ethtool()
1466 * ice_set_fdir_input_set - Set the input set for Flow Director
1468 * @fsp: pointer to ethtool Rx flow specification
1495 …dev_err(ice_pf_to_dev(pf), "Failed to add filter. Flow director filters are not supported on VF qu… in ice_set_fdir_input_set()
1589 /* not doing un-parsed flow types */ in ice_set_fdir_input_set()
1597 * ice_add_fdir_ethtool - Add/Remove Flow Director filter
1599 * @cmd: command to add or delete Flow Director filter
1627 dev_err(dev, "Device is resetting - adding Flow Director filters not supported during reset\n"); in ice_add_fdir_ethtool()
1644 …dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.… in ice_add_fdir_ethtool()
1652 …dev_err(dev, "Failed to add filter. The maximum number of flow director filters has been reached.… in ice_add_fdir_ethtool()