Lines Matching refs:fsp

530 static int otx2_prepare_ipv4_flow(struct ethtool_rx_flow_spec *fsp,  in otx2_prepare_ipv4_flow()  argument
534 struct ethtool_usrip4_spec *ipv4_usr_mask = &fsp->m_u.usr_ip4_spec; in otx2_prepare_ipv4_flow()
535 struct ethtool_usrip4_spec *ipv4_usr_hdr = &fsp->h_u.usr_ip4_spec; in otx2_prepare_ipv4_flow()
536 struct ethtool_tcpip4_spec *ipv4_l4_mask = &fsp->m_u.tcp_ip4_spec; in otx2_prepare_ipv4_flow()
537 struct ethtool_tcpip4_spec *ipv4_l4_hdr = &fsp->h_u.tcp_ip4_spec; in otx2_prepare_ipv4_flow()
538 struct ethtool_ah_espip4_spec *ah_esp_hdr = &fsp->h_u.ah_ip4_spec; in otx2_prepare_ipv4_flow()
539 struct ethtool_ah_espip4_spec *ah_esp_mask = &fsp->m_u.ah_ip4_spec; in otx2_prepare_ipv4_flow()
689 static int otx2_prepare_ipv6_flow(struct ethtool_rx_flow_spec *fsp, in otx2_prepare_ipv6_flow() argument
693 struct ethtool_usrip6_spec *ipv6_usr_mask = &fsp->m_u.usr_ip6_spec; in otx2_prepare_ipv6_flow()
694 struct ethtool_usrip6_spec *ipv6_usr_hdr = &fsp->h_u.usr_ip6_spec; in otx2_prepare_ipv6_flow()
695 struct ethtool_tcpip6_spec *ipv6_l4_mask = &fsp->m_u.tcp_ip6_spec; in otx2_prepare_ipv6_flow()
696 struct ethtool_tcpip6_spec *ipv6_l4_hdr = &fsp->h_u.tcp_ip6_spec; in otx2_prepare_ipv6_flow()
697 struct ethtool_ah_espip6_spec *ah_esp_hdr = &fsp->h_u.ah_ip6_spec; in otx2_prepare_ipv6_flow()
698 struct ethtool_ah_espip6_spec *ah_esp_mask = &fsp->m_u.ah_ip6_spec; in otx2_prepare_ipv6_flow()
815 static int otx2_prepare_flow_request(struct ethtool_rx_flow_spec *fsp, in otx2_prepare_flow_request() argument
818 struct ethhdr *eth_mask = &fsp->m_u.ether_spec; in otx2_prepare_flow_request()
819 struct ethhdr *eth_hdr = &fsp->h_u.ether_spec; in otx2_prepare_flow_request()
825 flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT | FLOW_RSS); in otx2_prepare_flow_request()
853 ret = otx2_prepare_ipv4_flow(fsp, req, flow_type); in otx2_prepare_flow_request()
863 ret = otx2_prepare_ipv6_flow(fsp, req, flow_type); in otx2_prepare_flow_request()
870 if (fsp->flow_type & FLOW_EXT) { in otx2_prepare_flow_request()
873 if (fsp->m_ext.vlan_etype) { in otx2_prepare_flow_request()
875 if (be16_to_cpu(fsp->m_ext.vlan_etype) != 0xFFFF) in otx2_prepare_flow_request()
878 vlan_etype = be16_to_cpu(fsp->h_ext.vlan_etype); in otx2_prepare_flow_request()
883 if (vlan_etype == ETH_P_8021Q && !fsp->m_ext.vlan_tci && in otx2_prepare_flow_request()
884 fsp->ring_cookie == RX_CLS_FLOW_DISC) in otx2_prepare_flow_request()
892 memcpy(&pkt->vlan_etype, &fsp->h_ext.vlan_etype, in otx2_prepare_flow_request()
894 memcpy(&pmask->vlan_etype, &fsp->m_ext.vlan_etype, in otx2_prepare_flow_request()
903 if (fsp->m_ext.vlan_tci) { in otx2_prepare_flow_request()
904 memcpy(&pkt->vlan_tci, &fsp->h_ext.vlan_tci, in otx2_prepare_flow_request()
906 memcpy(&pmask->vlan_tci, &fsp->m_ext.vlan_tci, in otx2_prepare_flow_request()
911 if (fsp->m_ext.data[1]) { in otx2_prepare_flow_request()
913 if (be32_to_cpu(fsp->h_ext.data[1]) != IPV4_FLAG_MORE) in otx2_prepare_flow_request()
916 pkt->ip_flag = be32_to_cpu(fsp->h_ext.data[1]); in otx2_prepare_flow_request()
917 pmask->ip_flag = be32_to_cpu(fsp->m_ext.data[1]); in otx2_prepare_flow_request()
919 } else if (fsp->h_ext.data[1] == in otx2_prepare_flow_request()
929 if (fsp->flow_type & FLOW_MAC_EXT && in otx2_prepare_flow_request()
930 !is_zero_ether_addr(fsp->m_ext.h_dest)) { in otx2_prepare_flow_request()
931 ether_addr_copy(pkt->dmac, fsp->h_ext.h_dest); in otx2_prepare_flow_request()
932 ether_addr_copy(pmask->dmac, fsp->m_ext.h_dest); in otx2_prepare_flow_request()
943 struct ethtool_rx_flow_spec *fsp) in otx2_is_flow_rule_dmacfilter() argument
945 struct ethhdr *eth_mask = &fsp->m_u.ether_spec; in otx2_is_flow_rule_dmacfilter()
946 struct ethhdr *eth_hdr = &fsp->h_u.ether_spec; in otx2_is_flow_rule_dmacfilter()
947 u64 ring_cookie = fsp->ring_cookie; in otx2_is_flow_rule_dmacfilter()
953 flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT | FLOW_RSS); in otx2_is_flow_rule_dmacfilter()
1088 struct ethtool_rx_flow_spec *fsp = &nfc->fs; in otx2_add_flow() local
1102 ring = ethtool_get_flow_spec_ring(fsp->ring_cookie); in otx2_add_flow()
1118 vf_num = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie); in otx2_add_flow()
1120 ring >= pfvf->hw.rx_queues && fsp->ring_cookie != RX_CLS_FLOW_DISC) in otx2_add_flow()
1123 if (fsp->location >= otx2_get_maxflows(flow_cfg)) in otx2_add_flow()
1126 flow = otx2_find_flow(pfvf, fsp->location); in otx2_add_flow()
1131 flow->location = fsp->location; in otx2_add_flow()
1136 flow->flow_spec = *fsp; in otx2_add_flow()
1138 if (fsp->flow_type & FLOW_RSS) in otx2_add_flow()
1169 fsp->location = flow_cfg->max_flows + flow->entry; in otx2_add_flow()
1170 flow->flow_spec.location = fsp->location; in otx2_add_flow()
1171 flow->location = fsp->location; in otx2_add_flow()