Lines Matching refs:fsp

3250 static int i40e_parse_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp,  in i40e_parse_rx_flow_user_data()  argument
3259 if (!(fsp->flow_type & FLOW_EXT)) in i40e_parse_rx_flow_user_data()
3262 value = be64_to_cpu(*((__be64 *)fsp->h_ext.data)); in i40e_parse_rx_flow_user_data()
3263 mask = be64_to_cpu(*((__be64 *)fsp->m_ext.data)); in i40e_parse_rx_flow_user_data()
3290 static void i40e_fill_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp, in i40e_fill_rx_flow_user_data() argument
3302 fsp->flow_type |= FLOW_EXT; in i40e_fill_rx_flow_user_data()
3304 *((__be64 *)fsp->h_ext.data) = cpu_to_be64(value); in i40e_fill_rx_flow_user_data()
3305 *((__be64 *)fsp->m_ext.data) = cpu_to_be64(mask); in i40e_fill_rx_flow_user_data()
3357 struct ethtool_rx_flow_spec *fsp = in i40e_get_ethtool_fdir_entry() local
3367 if (fsp->location <= rule->fd_id) in i40e_get_ethtool_fdir_entry()
3371 if (!rule || fsp->location != rule->fd_id) in i40e_get_ethtool_fdir_entry()
3374 fsp->flow_type = rule->flow_type; in i40e_get_ethtool_fdir_entry()
3375 if (fsp->flow_type == IP_USER_FLOW) { in i40e_get_ethtool_fdir_entry()
3376 fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4; in i40e_get_ethtool_fdir_entry()
3377 fsp->h_u.usr_ip4_spec.proto = 0; in i40e_get_ethtool_fdir_entry()
3378 fsp->m_u.usr_ip4_spec.proto = 0; in i40e_get_ethtool_fdir_entry()
3381 if (fsp->flow_type == IPV6_USER_FLOW || in i40e_get_ethtool_fdir_entry()
3382 fsp->flow_type == UDP_V6_FLOW || in i40e_get_ethtool_fdir_entry()
3383 fsp->flow_type == TCP_V6_FLOW || in i40e_get_ethtool_fdir_entry()
3384 fsp->flow_type == SCTP_V6_FLOW) { in i40e_get_ethtool_fdir_entry()
3389 fsp->h_u.tcp_ip6_spec.psrc = rule->dst_port; in i40e_get_ethtool_fdir_entry()
3390 fsp->h_u.tcp_ip6_spec.pdst = rule->src_port; in i40e_get_ethtool_fdir_entry()
3391 memcpy(fsp->h_u.tcp_ip6_spec.ip6dst, rule->src_ip6, in i40e_get_ethtool_fdir_entry()
3393 memcpy(fsp->h_u.tcp_ip6_spec.ip6src, rule->dst_ip6, in i40e_get_ethtool_fdir_entry()
3400 fsp->h_u.tcp_ip4_spec.psrc = rule->dst_port; in i40e_get_ethtool_fdir_entry()
3401 fsp->h_u.tcp_ip4_spec.pdst = rule->src_port; in i40e_get_ethtool_fdir_entry()
3402 fsp->h_u.tcp_ip4_spec.ip4src = rule->dst_ip; in i40e_get_ethtool_fdir_entry()
3403 fsp->h_u.tcp_ip4_spec.ip4dst = rule->src_ip; in i40e_get_ethtool_fdir_entry()
3447 fsp->m_u.tcp_ip6_spec.ip6src[0] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3448 fsp->m_u.tcp_ip6_spec.ip6src[1] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3449 fsp->m_u.tcp_ip6_spec.ip6src[2] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3450 fsp->m_u.tcp_ip6_spec.ip6src[3] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3454 fsp->m_u.tcp_ip6_spec.ip6dst[0] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3455 fsp->m_u.tcp_ip6_spec.ip6dst[1] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3456 fsp->m_u.tcp_ip6_spec.ip6dst[2] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3457 fsp->m_u.tcp_ip6_spec.ip6dst[3] = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3461 fsp->m_u.tcp_ip4_spec.ip4src = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3464 fsp->m_u.tcp_ip4_spec.ip4dst = htonl(0xFFFFFFFF); in i40e_get_ethtool_fdir_entry()
3467 fsp->m_u.tcp_ip4_spec.psrc = htons(0xFFFF); in i40e_get_ethtool_fdir_entry()
3470 fsp->m_u.tcp_ip4_spec.pdst = htons(0xFFFF); in i40e_get_ethtool_fdir_entry()
3473 fsp->ring_cookie = RX_CLS_FLOW_DISC; in i40e_get_ethtool_fdir_entry()
3475 fsp->ring_cookie = rule->q_index; in i40e_get_ethtool_fdir_entry()
3478 fsp->h_ext.vlan_etype = rule->vlan_etype; in i40e_get_ethtool_fdir_entry()
3479 fsp->m_ext.vlan_etype = htons(0xFFFF); in i40e_get_ethtool_fdir_entry()
3480 fsp->h_ext.vlan_tci = rule->vlan_tag; in i40e_get_ethtool_fdir_entry()
3481 fsp->m_ext.vlan_tci = htons(0xFFFF); in i40e_get_ethtool_fdir_entry()
3482 fsp->flow_type |= FLOW_EXT; in i40e_get_ethtool_fdir_entry()
3496 fsp->ring_cookie |= ring_vf; in i40e_get_ethtool_fdir_entry()
3506 i40e_fill_rx_flow_user_data(fsp, &userdef); in i40e_get_ethtool_fdir_entry()
3866 struct ethtool_rx_flow_spec *fsp = in i40e_del_fdir_entry() local
3878 ret = i40e_update_ethtool_fdir_entry(vsi, NULL, fsp->location, cmd); in i40e_del_fdir_entry()
4133 static const char *i40e_flow_str(struct ethtool_rx_flow_spec *fsp) in i40e_flow_str() argument
4135 switch (fsp->flow_type & ~FLOW_EXT) { in i40e_flow_str()
4284 struct ethtool_rx_flow_spec *fsp, in i40e_check_fdir_input_set() argument
4303 switch (fsp->flow_type & ~FLOW_EXT) { in i40e_check_fdir_input_set()
4355 switch (fsp->flow_type & ~FLOW_EXT) { in i40e_check_fdir_input_set()
4361 tcp_ip4_spec = &fsp->m_u.tcp_ip4_spec; in i40e_check_fdir_input_set()
4405 tcp_ip6_spec = &fsp->m_u.tcp_ip6_spec; in i40e_check_fdir_input_set()
4448 usr_ip4_spec = &fsp->m_u.usr_ip4_spec; in i40e_check_fdir_input_set()
4484 usr_ip6_spec = &fsp->m_u.usr_ip6_spec; in i40e_check_fdir_input_set()
4522 if (fsp->flow_type & FLOW_EXT) { in i40e_check_fdir_input_set()
4526 if (fsp->h_ext.vlan_etype != htons(ETH_P_8021Q) && in i40e_check_fdir_input_set()
4527 fsp->h_ext.vlan_etype != 0) in i40e_check_fdir_input_set()
4529 if (fsp->m_ext.vlan_tci == htons(0xFFFF)) in i40e_check_fdir_input_set()
4630 i40e_flow_str(fsp)); in i40e_check_fdir_input_set()
4657 i40e_flow_str(fsp), in i40e_check_fdir_input_set()
4790 struct ethtool_rx_flow_spec *fsp; in i40e_add_fdir_ethtool() local
4814 fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; in i40e_add_fdir_ethtool()
4817 if (i40e_parse_rx_flow_user_data(fsp, &userdef)) in i40e_add_fdir_ethtool()
4821 if (fsp->flow_type & FLOW_MAC_EXT) in i40e_add_fdir_ethtool()
4824 ret = i40e_check_fdir_input_set(vsi, fsp, &userdef); in i40e_add_fdir_ethtool()
4828 if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + in i40e_add_fdir_ethtool()
4836 if (fsp->ring_cookie == RX_CLS_FLOW_DISC) { in i40e_add_fdir_ethtool()
4839 u32 ring = ethtool_get_flow_spec_ring(fsp->ring_cookie); in i40e_add_fdir_ethtool()
4840 u8 vf = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie); in i40e_add_fdir_ethtool()
4865 input->fd_id = fsp->location; in i40e_add_fdir_ethtool()
4871 input->dst_ip = fsp->h_u.tcp_ip4_spec.ip4src; in i40e_add_fdir_ethtool()
4872 input->src_ip = fsp->h_u.tcp_ip4_spec.ip4dst; in i40e_add_fdir_ethtool()
4873 input->flow_type = fsp->flow_type & ~FLOW_EXT; in i40e_add_fdir_ethtool()
4875 input->vlan_etype = fsp->h_ext.vlan_etype; in i40e_add_fdir_ethtool()
4876 if (!fsp->m_ext.vlan_etype && fsp->h_ext.vlan_tci) in i40e_add_fdir_ethtool()
4878 if (fsp->m_ext.vlan_tci && input->vlan_etype) in i40e_add_fdir_ethtool()
4879 input->vlan_tag = fsp->h_ext.vlan_tci; in i40e_add_fdir_ethtool()
4888 input->ipl4_proto = fsp->h_u.usr_ip6_spec.l4_proto; in i40e_add_fdir_ethtool()
4889 input->dst_port = fsp->h_u.tcp_ip6_spec.psrc; in i40e_add_fdir_ethtool()
4890 input->src_port = fsp->h_u.tcp_ip6_spec.pdst; in i40e_add_fdir_ethtool()
4891 memcpy(input->dst_ip6, fsp->h_u.ah_ip6_spec.ip6src, in i40e_add_fdir_ethtool()
4893 memcpy(input->src_ip6, fsp->h_u.ah_ip6_spec.ip6dst, in i40e_add_fdir_ethtool()
4900 input->ipl4_proto = fsp->h_u.usr_ip4_spec.proto; in i40e_add_fdir_ethtool()
4901 input->dst_port = fsp->h_u.tcp_ip4_spec.psrc; in i40e_add_fdir_ethtool()
4902 input->src_port = fsp->h_u.tcp_ip4_spec.pdst; in i40e_add_fdir_ethtool()
4903 input->dst_ip = fsp->h_u.tcp_ip4_spec.ip4src; in i40e_add_fdir_ethtool()
4904 input->src_ip = fsp->h_u.tcp_ip4_spec.ip4dst; in i40e_add_fdir_ethtool()
4922 i40e_update_ethtool_fdir_entry(vsi, input, fsp->location, NULL); in i40e_add_fdir_ethtool()