Lines Matching defs:fsp
639 struct ethtool_rx_flow_spec *fsp;
644 fsp = (struct ethtool_rx_flow_spec *)&cmd->fs;
646 if (fsp->location >= FBNIC_RPC_ACT_TBL_NFC_ENTRIES)
649 idx = fsp->location + FBNIC_RPC_ACT_TBL_NFC_OFFSET;
660 fsp->flow_type = ETHER_FLOW;
669 ether_addr_copy(fsp->h_u.ether_spec.h_dest,
671 eth_broadcast_addr(fsp->m_u.ether_spec.h_dest);
675 fsp->flow_type = IPV6_USER_FLOW;
676 fsp->h_u.usr_ip6_spec.l4_proto = IPPROTO_IPV6;
677 fsp->m_u.usr_ip6_spec.l4_proto = 0xff;
689 fsp->h_u.usr_ip6_spec.ip6src[i] =
691 fsp->m_u.usr_ip6_spec.ip6src[i] =
706 fsp->h_u.usr_ip6_spec.ip6dst[i] =
708 fsp->m_u.usr_ip6_spec.ip6dst[i] =
716 fsp->flow_type = UDP_V6_FLOW;
718 fsp->flow_type = TCP_V6_FLOW;
719 fsp->h_u.tcp_ip6_spec.psrc =
721 fsp->m_u.tcp_ip6_spec.psrc =
723 fsp->h_u.tcp_ip6_spec.pdst =
725 fsp->m_u.tcp_ip6_spec.pdst =
728 fsp->flow_type = IPV6_USER_FLOW;
741 fsp->h_u.usr_ip6_spec.ip6src[i] =
743 fsp->m_u.usr_ip6_spec.ip6src[i] =
758 fsp->h_u.usr_ip6_spec.ip6dst[i] =
760 fsp->m_u.usr_ip6_spec.ip6dst[i] =
768 fsp->flow_type = UDP_V4_FLOW;
770 fsp->flow_type = TCP_V4_FLOW;
771 fsp->h_u.tcp_ip4_spec.psrc =
773 fsp->m_u.tcp_ip4_spec.psrc =
775 fsp->h_u.tcp_ip4_spec.pdst =
777 fsp->m_u.tcp_ip4_spec.pdst =
780 fsp->flow_type = IPV4_USER_FLOW;
781 fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4;
792 fsp->h_u.usr_ip4_spec.ip4src =
794 fsp->m_u.usr_ip4_spec.ip4src =
806 fsp->h_u.usr_ip4_spec.ip4dst =
808 fsp->m_u.usr_ip4_spec.ip4dst =
815 fsp->ring_cookie = RX_CLS_FLOW_DISC;
817 fsp->ring_cookie = FIELD_GET(FBNIC_RPC_ACT_TBL0_Q_ID,
820 fsp->flow_type |= FLOW_RSS;
885 struct ethtool_rx_flow_spec *fsp;
894 fsp = (struct ethtool_rx_flow_spec *)&cmd->fs;
896 if (fsp->location != RX_CLS_LOC_ANY)
902 if (fsp->ring_cookie == RX_CLS_FLOW_DISC) {
904 } else if (fsp->flow_type & FLOW_RSS) {
908 u32 ring_idx = ethtool_get_flow_spec_ring(fsp->ring_cookie);
927 flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_RSS);
941 sport = be16_to_cpu(fsp->h_u.tcp_ip4_spec.psrc);
942 sport_mask = ~be16_to_cpu(fsp->m_u.tcp_ip4_spec.psrc);
943 dport = be16_to_cpu(fsp->h_u.tcp_ip4_spec.pdst);
944 dport_mask = ~be16_to_cpu(fsp->m_u.tcp_ip4_spec.pdst);
947 if (!fsp->m_u.usr_ip4_spec.proto)
949 if (fsp->m_u.usr_ip4_spec.proto != 0xff)
951 if (fsp->h_u.usr_ip4_spec.proto == IPPROTO_UDP)
953 if (fsp->h_u.usr_ip4_spec.proto == IPPROTO_TCP)
957 addr4 = (struct in_addr *)&fsp->h_u.usr_ip4_spec.ip4src;
958 mask4 = (struct in_addr *)&fsp->m_u.usr_ip4_spec.ip4src;
973 addr4 = (struct in_addr *)&fsp->h_u.usr_ip4_spec.ip4dst;
974 mask4 = (struct in_addr *)&fsp->m_u.usr_ip4_spec.ip4dst;
1007 sport = be16_to_cpu(fsp->h_u.tcp_ip6_spec.psrc);
1008 sport_mask = ~be16_to_cpu(fsp->m_u.tcp_ip6_spec.psrc);
1009 dport = be16_to_cpu(fsp->h_u.tcp_ip6_spec.pdst);
1010 dport_mask = ~be16_to_cpu(fsp->m_u.tcp_ip6_spec.pdst);
1013 if (!fsp->m_u.usr_ip6_spec.l4_proto)
1016 if (fsp->m_u.usr_ip6_spec.l4_proto != 0xff)
1018 if (fsp->h_u.usr_ip6_spec.l4_proto == IPPROTO_UDP)
1020 if (fsp->h_u.usr_ip6_spec.l4_proto == IPPROTO_TCP)
1022 if (fsp->h_u.usr_ip6_spec.l4_proto != IPPROTO_IPV6)
1025 addr6 = (struct in6_addr *)fsp->h_u.usr_ip6_spec.ip6src;
1026 mask6 = (struct in6_addr *)fsp->m_u.usr_ip6_spec.ip6src;
1043 addr6 = (struct in6_addr *)fsp->h_u.usr_ip6_spec.ip6dst;
1044 mask6 = (struct in6_addr *)fsp->m_u.usr_ip6_spec.ip6dst;
1066 addr6 = (struct in6_addr *)fsp->h_u.usr_ip6_spec.ip6src;
1067 mask6 = (struct in6_addr *)fsp->m_u.usr_ip6_spec.ip6src;
1082 addr6 = (struct in6_addr *)fsp->h_u.usr_ip6_spec.ip6dst;
1083 mask6 = (struct in6_addr *)fsp->m_u.usr_ip6_spec.ip6dst;
1109 if (!is_zero_ether_addr(fsp->m_u.ether_spec.h_dest)) {
1110 u8 *addr = fsp->h_u.ether_spec.h_dest;
1111 u8 *mask = fsp->m_u.ether_spec.h_dest;
1171 fsp->location = location;
1221 struct ethtool_rx_flow_spec *fsp;
1226 fsp = (struct ethtool_rx_flow_spec *)&cmd->fs;
1228 if (fsp->location >= FBNIC_RPC_ACT_TBL_NFC_ENTRIES)
1231 idx = fsp->location + FBNIC_RPC_ACT_TBL_NFC_OFFSET;