Lines Matching refs:fsp
2748 static int i40e_parse_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp, in i40e_parse_rx_flow_user_data() argument
2757 if (!(fsp->flow_type & FLOW_EXT)) in i40e_parse_rx_flow_user_data()
2760 value = be64_to_cpu(*((__be64 *)fsp->h_ext.data)); in i40e_parse_rx_flow_user_data()
2761 mask = be64_to_cpu(*((__be64 *)fsp->m_ext.data)); in i40e_parse_rx_flow_user_data()
2788 static void i40e_fill_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp, in i40e_fill_rx_flow_user_data() argument
2800 fsp->flow_type |= FLOW_EXT; in i40e_fill_rx_flow_user_data()
2802 *((__be64 *)fsp->h_ext.data) = cpu_to_be64(value); in i40e_fill_rx_flow_user_data()
2803 *((__be64 *)fsp->m_ext.data) = cpu_to_be64(mask); in i40e_fill_rx_flow_user_data()
2855 struct ethtool_rx_flow_spec *fsp = in i40e_get_ethtool_fdir_entry() local
2865 if (fsp->location <= rule->fd_id) in i40e_get_ethtool_fdir_entry()
2869 if (!rule || fsp->location != rule->fd_id) in i40e_get_ethtool_fdir_entry()
2872 fsp->flow_type = rule->flow_type; in i40e_get_ethtool_fdir_entry()
2873 if (fsp->flow_type == IP_USER_FLOW) { in i40e_get_ethtool_fdir_entry()
2874 fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4; in i40e_get_ethtool_fdir_entry()
2875 fsp->h_u.usr_ip4_spec.proto = 0; in i40e_get_ethtool_fdir_entry()
2876 fsp->m_u.usr_ip4_spec.proto = 0; in i40e_get_ethtool_fdir_entry()
2882 fsp->h_u.tcp_ip4_spec.psrc = rule->dst_port; in i40e_get_ethtool_fdir_entry()
2883 fsp->h_u.tcp_ip4_spec.pdst = rule->src_port; in i40e_get_ethtool_fdir_entry()
2884 fsp->h_u.tcp_ip4_spec.ip4src = rule->dst_ip; in i40e_get_ethtool_fdir_entry()
2885 fsp->h_u.tcp_ip4_spec.ip4dst = rule->src_ip; in i40e_get_ethtool_fdir_entry()
2916 fsp->m_u.tcp_ip4_spec.ip4src = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
2919 fsp->m_u.tcp_ip4_spec.ip4dst = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
2922 fsp->m_u.tcp_ip4_spec.psrc = htons(0xFFFF); in i40e_get_ethtool_fdir_entry()
2925 fsp->m_u.tcp_ip4_spec.pdst = htons(0xFFFF); in i40e_get_ethtool_fdir_entry()
2928 fsp->ring_cookie = RX_CLS_FLOW_DISC; in i40e_get_ethtool_fdir_entry()
2930 fsp->ring_cookie = rule->q_index; in i40e_get_ethtool_fdir_entry()
2943 fsp->ring_cookie |= ring_vf; in i40e_get_ethtool_fdir_entry()
2953 i40e_fill_rx_flow_user_data(fsp, &userdef); in i40e_get_ethtool_fdir_entry()
3300 struct ethtool_rx_flow_spec *fsp = in i40e_del_fdir_entry() local
3312 ret = i40e_update_ethtool_fdir_entry(vsi, NULL, fsp->location, cmd); in i40e_del_fdir_entry()
3567 static const char *i40e_flow_str(struct ethtool_rx_flow_spec *fsp) in i40e_flow_str() argument
3569 switch (fsp->flow_type & ~FLOW_EXT) { in i40e_flow_str()
3710 struct ethtool_rx_flow_spec *fsp, in i40e_check_fdir_input_set() argument
3724 switch (fsp->flow_type & ~FLOW_EXT) { in i40e_check_fdir_input_set()
3759 switch (fsp->flow_type & ~FLOW_EXT) { in i40e_check_fdir_input_set()
3765 tcp_ip4_spec = &fsp->m_u.tcp_ip4_spec; in i40e_check_fdir_input_set()
3805 usr_ip4_spec = &fsp->m_u.usr_ip4_spec; in i40e_check_fdir_input_set()
3943 i40e_flow_str(fsp)); in i40e_check_fdir_input_set()
3970 i40e_flow_str(fsp), in i40e_check_fdir_input_set()
4101 struct ethtool_rx_flow_spec *fsp; in i40e_add_fdir_ethtool() local
4125 fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; in i40e_add_fdir_ethtool()
4128 if (i40e_parse_rx_flow_user_data(fsp, &userdef)) in i40e_add_fdir_ethtool()
4132 if (fsp->flow_type & FLOW_MAC_EXT) in i40e_add_fdir_ethtool()
4135 ret = i40e_check_fdir_input_set(vsi, fsp, &userdef); in i40e_add_fdir_ethtool()
4139 if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + in i40e_add_fdir_ethtool()
4147 if (fsp->ring_cookie == RX_CLS_FLOW_DISC) { in i40e_add_fdir_ethtool()
4150 u32 ring = ethtool_get_flow_spec_ring(fsp->ring_cookie); in i40e_add_fdir_ethtool()
4151 u8 vf = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie); in i40e_add_fdir_ethtool()
4176 input->fd_id = fsp->location; in i40e_add_fdir_ethtool()
4182 input->dst_ip = fsp->h_u.tcp_ip4_spec.ip4src; in i40e_add_fdir_ethtool()
4183 input->src_ip = fsp->h_u.tcp_ip4_spec.ip4dst; in i40e_add_fdir_ethtool()
4184 input->flow_type = fsp->flow_type & ~FLOW_EXT; in i40e_add_fdir_ethtool()
4185 input->ip4_proto = fsp->h_u.usr_ip4_spec.proto; in i40e_add_fdir_ethtool()
4190 input->dst_port = fsp->h_u.tcp_ip4_spec.psrc; in i40e_add_fdir_ethtool()
4191 input->src_port = fsp->h_u.tcp_ip4_spec.pdst; in i40e_add_fdir_ethtool()
4192 input->dst_ip = fsp->h_u.tcp_ip4_spec.ip4src; in i40e_add_fdir_ethtool()
4193 input->src_ip = fsp->h_u.tcp_ip4_spec.ip4dst; in i40e_add_fdir_ethtool()
4210 i40e_update_ethtool_fdir_entry(vsi, input, fsp->location, NULL); in i40e_add_fdir_ethtool()