Lines Matching refs:fsp
853 iavf_parse_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp, in iavf_parse_rx_flow_user_data() argument
859 if (!(fsp->flow_type & FLOW_EXT)) in iavf_parse_rx_flow_user_data()
867 u32 value = be32_to_cpu(fsp->h_ext.data[i]); in iavf_parse_rx_flow_user_data()
868 u32 mask = be32_to_cpu(fsp->m_ext.data[i]); in iavf_parse_rx_flow_user_data()
898 iavf_fill_rx_flow_ext_data(struct ethtool_rx_flow_spec *fsp, in iavf_fill_rx_flow_ext_data() argument
904 fsp->flow_type |= FLOW_EXT; in iavf_fill_rx_flow_ext_data()
906 memcpy(fsp->h_ext.data, fltr->ext_data.usr_def, sizeof(fsp->h_ext.data)); in iavf_fill_rx_flow_ext_data()
907 memcpy(fsp->m_ext.data, fltr->ext_mask.usr_def, sizeof(fsp->m_ext.data)); in iavf_fill_rx_flow_ext_data()
921 struct ethtool_rx_flow_spec *fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; in iavf_get_ethtool_fdir_entry() local
930 rule = iavf_find_fdir_fltr(adapter, false, fsp->location); in iavf_get_ethtool_fdir_entry()
936 fsp->flow_type = iavf_fltr_to_ethtool_flow(rule->flow_type); in iavf_get_ethtool_fdir_entry()
938 memset(&fsp->m_u, 0, sizeof(fsp->m_u)); in iavf_get_ethtool_fdir_entry()
939 memset(&fsp->m_ext, 0, sizeof(fsp->m_ext)); in iavf_get_ethtool_fdir_entry()
941 switch (fsp->flow_type) { in iavf_get_ethtool_fdir_entry()
945 fsp->h_u.tcp_ip4_spec.ip4src = rule->ip_data.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
946 fsp->h_u.tcp_ip4_spec.ip4dst = rule->ip_data.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
947 fsp->h_u.tcp_ip4_spec.psrc = rule->ip_data.src_port; in iavf_get_ethtool_fdir_entry()
948 fsp->h_u.tcp_ip4_spec.pdst = rule->ip_data.dst_port; in iavf_get_ethtool_fdir_entry()
949 fsp->h_u.tcp_ip4_spec.tos = rule->ip_data.tos; in iavf_get_ethtool_fdir_entry()
950 fsp->m_u.tcp_ip4_spec.ip4src = rule->ip_mask.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
951 fsp->m_u.tcp_ip4_spec.ip4dst = rule->ip_mask.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
952 fsp->m_u.tcp_ip4_spec.psrc = rule->ip_mask.src_port; in iavf_get_ethtool_fdir_entry()
953 fsp->m_u.tcp_ip4_spec.pdst = rule->ip_mask.dst_port; in iavf_get_ethtool_fdir_entry()
954 fsp->m_u.tcp_ip4_spec.tos = rule->ip_mask.tos; in iavf_get_ethtool_fdir_entry()
958 fsp->h_u.ah_ip4_spec.ip4src = rule->ip_data.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
959 fsp->h_u.ah_ip4_spec.ip4dst = rule->ip_data.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
960 fsp->h_u.ah_ip4_spec.spi = rule->ip_data.spi; in iavf_get_ethtool_fdir_entry()
961 fsp->h_u.ah_ip4_spec.tos = rule->ip_data.tos; in iavf_get_ethtool_fdir_entry()
962 fsp->m_u.ah_ip4_spec.ip4src = rule->ip_mask.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
963 fsp->m_u.ah_ip4_spec.ip4dst = rule->ip_mask.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
964 fsp->m_u.ah_ip4_spec.spi = rule->ip_mask.spi; in iavf_get_ethtool_fdir_entry()
965 fsp->m_u.ah_ip4_spec.tos = rule->ip_mask.tos; in iavf_get_ethtool_fdir_entry()
968 fsp->h_u.usr_ip4_spec.ip4src = rule->ip_data.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
969 fsp->h_u.usr_ip4_spec.ip4dst = rule->ip_data.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
970 fsp->h_u.usr_ip4_spec.l4_4_bytes = rule->ip_data.l4_header; in iavf_get_ethtool_fdir_entry()
971 fsp->h_u.usr_ip4_spec.tos = rule->ip_data.tos; in iavf_get_ethtool_fdir_entry()
972 fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4; in iavf_get_ethtool_fdir_entry()
973 fsp->h_u.usr_ip4_spec.proto = rule->ip_data.proto; in iavf_get_ethtool_fdir_entry()
974 fsp->m_u.usr_ip4_spec.ip4src = rule->ip_mask.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
975 fsp->m_u.usr_ip4_spec.ip4dst = rule->ip_mask.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
976 fsp->m_u.usr_ip4_spec.l4_4_bytes = rule->ip_mask.l4_header; in iavf_get_ethtool_fdir_entry()
977 fsp->m_u.usr_ip4_spec.tos = rule->ip_mask.tos; in iavf_get_ethtool_fdir_entry()
978 fsp->m_u.usr_ip4_spec.ip_ver = 0xFF; in iavf_get_ethtool_fdir_entry()
979 fsp->m_u.usr_ip4_spec.proto = rule->ip_mask.proto; in iavf_get_ethtool_fdir_entry()
984 memcpy(fsp->h_u.usr_ip6_spec.ip6src, &rule->ip_data.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
986 memcpy(fsp->h_u.usr_ip6_spec.ip6dst, &rule->ip_data.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
988 fsp->h_u.tcp_ip6_spec.psrc = rule->ip_data.src_port; in iavf_get_ethtool_fdir_entry()
989 fsp->h_u.tcp_ip6_spec.pdst = rule->ip_data.dst_port; in iavf_get_ethtool_fdir_entry()
990 fsp->h_u.tcp_ip6_spec.tclass = rule->ip_data.tclass; in iavf_get_ethtool_fdir_entry()
991 memcpy(fsp->m_u.usr_ip6_spec.ip6src, &rule->ip_mask.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
993 memcpy(fsp->m_u.usr_ip6_spec.ip6dst, &rule->ip_mask.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
995 fsp->m_u.tcp_ip6_spec.psrc = rule->ip_mask.src_port; in iavf_get_ethtool_fdir_entry()
996 fsp->m_u.tcp_ip6_spec.pdst = rule->ip_mask.dst_port; in iavf_get_ethtool_fdir_entry()
997 fsp->m_u.tcp_ip6_spec.tclass = rule->ip_mask.tclass; in iavf_get_ethtool_fdir_entry()
1001 memcpy(fsp->h_u.ah_ip6_spec.ip6src, &rule->ip_data.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1003 memcpy(fsp->h_u.ah_ip6_spec.ip6dst, &rule->ip_data.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1005 fsp->h_u.ah_ip6_spec.spi = rule->ip_data.spi; in iavf_get_ethtool_fdir_entry()
1006 fsp->h_u.ah_ip6_spec.tclass = rule->ip_data.tclass; in iavf_get_ethtool_fdir_entry()
1007 memcpy(fsp->m_u.ah_ip6_spec.ip6src, &rule->ip_mask.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1009 memcpy(fsp->m_u.ah_ip6_spec.ip6dst, &rule->ip_mask.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1011 fsp->m_u.ah_ip6_spec.spi = rule->ip_mask.spi; in iavf_get_ethtool_fdir_entry()
1012 fsp->m_u.ah_ip6_spec.tclass = rule->ip_mask.tclass; in iavf_get_ethtool_fdir_entry()
1015 memcpy(fsp->h_u.usr_ip6_spec.ip6src, &rule->ip_data.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1017 memcpy(fsp->h_u.usr_ip6_spec.ip6dst, &rule->ip_data.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1019 fsp->h_u.usr_ip6_spec.l4_4_bytes = rule->ip_data.l4_header; in iavf_get_ethtool_fdir_entry()
1020 fsp->h_u.usr_ip6_spec.tclass = rule->ip_data.tclass; in iavf_get_ethtool_fdir_entry()
1021 fsp->h_u.usr_ip6_spec.l4_proto = rule->ip_data.proto; in iavf_get_ethtool_fdir_entry()
1022 memcpy(fsp->m_u.usr_ip6_spec.ip6src, &rule->ip_mask.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1024 memcpy(fsp->m_u.usr_ip6_spec.ip6dst, &rule->ip_mask.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1026 fsp->m_u.usr_ip6_spec.l4_4_bytes = rule->ip_mask.l4_header; in iavf_get_ethtool_fdir_entry()
1027 fsp->m_u.usr_ip6_spec.tclass = rule->ip_mask.tclass; in iavf_get_ethtool_fdir_entry()
1028 fsp->m_u.usr_ip6_spec.l4_proto = rule->ip_mask.proto; in iavf_get_ethtool_fdir_entry()
1031 fsp->h_u.ether_spec.h_proto = rule->eth_data.etype; in iavf_get_ethtool_fdir_entry()
1032 fsp->m_u.ether_spec.h_proto = rule->eth_mask.etype; in iavf_get_ethtool_fdir_entry()
1039 iavf_fill_rx_flow_ext_data(fsp, rule); in iavf_get_ethtool_fdir_entry()
1042 fsp->ring_cookie = RX_CLS_FLOW_DISC; in iavf_get_ethtool_fdir_entry()
1044 fsp->ring_cookie = rule->q_index; in iavf_get_ethtool_fdir_entry()
1101 iavf_add_fdir_fltr_info(struct iavf_adapter *adapter, struct ethtool_rx_flow_spec *fsp, in iavf_add_fdir_fltr_info() argument
1108 if (fsp->ring_cookie == RX_CLS_FLOW_DISC) { in iavf_add_fdir_fltr_info()
1111 q_index = fsp->ring_cookie; in iavf_add_fdir_fltr_info()
1119 fltr->loc = fsp->location; in iavf_add_fdir_fltr_info()
1122 if (fsp->flow_type & FLOW_EXT) { in iavf_add_fdir_fltr_info()
1123 memcpy(fltr->ext_data.usr_def, fsp->h_ext.data, in iavf_add_fdir_fltr_info()
1125 memcpy(fltr->ext_mask.usr_def, fsp->m_ext.data, in iavf_add_fdir_fltr_info()
1129 flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT | FLOW_RSS); in iavf_add_fdir_fltr_info()
1136 fltr->ip_data.v4_addrs.src_ip = fsp->h_u.tcp_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1137 fltr->ip_data.v4_addrs.dst_ip = fsp->h_u.tcp_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1138 fltr->ip_data.src_port = fsp->h_u.tcp_ip4_spec.psrc; in iavf_add_fdir_fltr_info()
1139 fltr->ip_data.dst_port = fsp->h_u.tcp_ip4_spec.pdst; in iavf_add_fdir_fltr_info()
1140 fltr->ip_data.tos = fsp->h_u.tcp_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1141 fltr->ip_mask.v4_addrs.src_ip = fsp->m_u.tcp_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1142 fltr->ip_mask.v4_addrs.dst_ip = fsp->m_u.tcp_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1143 fltr->ip_mask.src_port = fsp->m_u.tcp_ip4_spec.psrc; in iavf_add_fdir_fltr_info()
1144 fltr->ip_mask.dst_port = fsp->m_u.tcp_ip4_spec.pdst; in iavf_add_fdir_fltr_info()
1145 fltr->ip_mask.tos = fsp->m_u.tcp_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1150 fltr->ip_data.v4_addrs.src_ip = fsp->h_u.ah_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1151 fltr->ip_data.v4_addrs.dst_ip = fsp->h_u.ah_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1152 fltr->ip_data.spi = fsp->h_u.ah_ip4_spec.spi; in iavf_add_fdir_fltr_info()
1153 fltr->ip_data.tos = fsp->h_u.ah_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1154 fltr->ip_mask.v4_addrs.src_ip = fsp->m_u.ah_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1155 fltr->ip_mask.v4_addrs.dst_ip = fsp->m_u.ah_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1156 fltr->ip_mask.spi = fsp->m_u.ah_ip4_spec.spi; in iavf_add_fdir_fltr_info()
1157 fltr->ip_mask.tos = fsp->m_u.ah_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1161 fltr->ip_data.v4_addrs.src_ip = fsp->h_u.usr_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1162 fltr->ip_data.v4_addrs.dst_ip = fsp->h_u.usr_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1163 fltr->ip_data.l4_header = fsp->h_u.usr_ip4_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1164 fltr->ip_data.tos = fsp->h_u.usr_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1165 fltr->ip_data.proto = fsp->h_u.usr_ip4_spec.proto; in iavf_add_fdir_fltr_info()
1166 fltr->ip_mask.v4_addrs.src_ip = fsp->m_u.usr_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1167 fltr->ip_mask.v4_addrs.dst_ip = fsp->m_u.usr_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1168 fltr->ip_mask.l4_header = fsp->m_u.usr_ip4_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1169 fltr->ip_mask.tos = fsp->m_u.usr_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1170 fltr->ip_mask.proto = fsp->m_u.usr_ip4_spec.proto; in iavf_add_fdir_fltr_info()
1176 memcpy(&fltr->ip_data.v6_addrs.src_ip, fsp->h_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1178 memcpy(&fltr->ip_data.v6_addrs.dst_ip, fsp->h_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1180 fltr->ip_data.src_port = fsp->h_u.tcp_ip6_spec.psrc; in iavf_add_fdir_fltr_info()
1181 fltr->ip_data.dst_port = fsp->h_u.tcp_ip6_spec.pdst; in iavf_add_fdir_fltr_info()
1182 fltr->ip_data.tclass = fsp->h_u.tcp_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1183 memcpy(&fltr->ip_mask.v6_addrs.src_ip, fsp->m_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1185 memcpy(&fltr->ip_mask.v6_addrs.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1187 fltr->ip_mask.src_port = fsp->m_u.tcp_ip6_spec.psrc; in iavf_add_fdir_fltr_info()
1188 fltr->ip_mask.dst_port = fsp->m_u.tcp_ip6_spec.pdst; in iavf_add_fdir_fltr_info()
1189 fltr->ip_mask.tclass = fsp->m_u.tcp_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1194 memcpy(&fltr->ip_data.v6_addrs.src_ip, fsp->h_u.ah_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1196 memcpy(&fltr->ip_data.v6_addrs.dst_ip, fsp->h_u.ah_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1198 fltr->ip_data.spi = fsp->h_u.ah_ip6_spec.spi; in iavf_add_fdir_fltr_info()
1199 fltr->ip_data.tclass = fsp->h_u.ah_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1200 memcpy(&fltr->ip_mask.v6_addrs.src_ip, fsp->m_u.ah_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1202 memcpy(&fltr->ip_mask.v6_addrs.dst_ip, fsp->m_u.ah_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1204 fltr->ip_mask.spi = fsp->m_u.ah_ip6_spec.spi; in iavf_add_fdir_fltr_info()
1205 fltr->ip_mask.tclass = fsp->m_u.ah_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1209 memcpy(&fltr->ip_data.v6_addrs.src_ip, fsp->h_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1211 memcpy(&fltr->ip_data.v6_addrs.dst_ip, fsp->h_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1213 fltr->ip_data.l4_header = fsp->h_u.usr_ip6_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1214 fltr->ip_data.tclass = fsp->h_u.usr_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1215 fltr->ip_data.proto = fsp->h_u.usr_ip6_spec.l4_proto; in iavf_add_fdir_fltr_info()
1216 memcpy(&fltr->ip_mask.v6_addrs.src_ip, fsp->m_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1218 memcpy(&fltr->ip_mask.v6_addrs.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1220 fltr->ip_mask.l4_header = fsp->m_u.usr_ip6_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1221 fltr->ip_mask.tclass = fsp->m_u.usr_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1222 fltr->ip_mask.proto = fsp->m_u.usr_ip6_spec.l4_proto; in iavf_add_fdir_fltr_info()
1226 fltr->eth_data.etype = fsp->h_u.ether_spec.h_proto; in iavf_add_fdir_fltr_info()
1227 fltr->eth_mask.etype = fsp->m_u.ether_spec.h_proto; in iavf_add_fdir_fltr_info()
1241 err = iavf_parse_rx_flow_user_data(fsp, fltr); in iavf_add_fdir_fltr_info()
1257 struct ethtool_rx_flow_spec *fsp = &cmd->fs; in iavf_add_fdir_ethtool() local
1265 if (fsp->flow_type & FLOW_MAC_EXT) in iavf_add_fdir_ethtool()
1269 if (iavf_find_fdir_fltr(adapter, false, fsp->location)) { in iavf_add_fdir_ethtool()
1288 err = iavf_add_fdir_fltr_info(adapter, fsp, fltr); in iavf_add_fdir_ethtool()
1308 struct ethtool_rx_flow_spec *fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; in iavf_del_fdir_ethtool() local
1313 return iavf_fdir_del_fltr(adapter, false, fsp->location); in iavf_del_fdir_ethtool()