Lines Matching refs:fsp
995 iavf_parse_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp, in iavf_parse_rx_flow_user_data() argument
1001 if (!(fsp->flow_type & FLOW_EXT)) in iavf_parse_rx_flow_user_data()
1009 u32 value = be32_to_cpu(fsp->h_ext.data[i]); in iavf_parse_rx_flow_user_data()
1010 u32 mask = be32_to_cpu(fsp->m_ext.data[i]); in iavf_parse_rx_flow_user_data()
1041 iavf_fill_rx_flow_ext_data(struct ethtool_rx_flow_spec *fsp, in iavf_fill_rx_flow_ext_data() argument
1047 fsp->flow_type |= FLOW_EXT; in iavf_fill_rx_flow_ext_data()
1049 memcpy(fsp->h_ext.data, fltr->ext_data.usr_def, sizeof(fsp->h_ext.data)); in iavf_fill_rx_flow_ext_data()
1050 memcpy(fsp->m_ext.data, fltr->ext_mask.usr_def, sizeof(fsp->m_ext.data)); in iavf_fill_rx_flow_ext_data()
1064 struct ethtool_rx_flow_spec *fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; in iavf_get_ethtool_fdir_entry() local
1073 rule = iavf_find_fdir_fltr_by_loc(adapter, fsp->location); in iavf_get_ethtool_fdir_entry()
1079 fsp->flow_type = iavf_fltr_to_ethtool_flow(rule->flow_type); in iavf_get_ethtool_fdir_entry()
1081 memset(&fsp->m_u, 0, sizeof(fsp->m_u)); in iavf_get_ethtool_fdir_entry()
1082 memset(&fsp->m_ext, 0, sizeof(fsp->m_ext)); in iavf_get_ethtool_fdir_entry()
1084 switch (fsp->flow_type) { in iavf_get_ethtool_fdir_entry()
1088 fsp->h_u.tcp_ip4_spec.ip4src = rule->ip_data.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
1089 fsp->h_u.tcp_ip4_spec.ip4dst = rule->ip_data.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
1090 fsp->h_u.tcp_ip4_spec.psrc = rule->ip_data.src_port; in iavf_get_ethtool_fdir_entry()
1091 fsp->h_u.tcp_ip4_spec.pdst = rule->ip_data.dst_port; in iavf_get_ethtool_fdir_entry()
1092 fsp->h_u.tcp_ip4_spec.tos = rule->ip_data.tos; in iavf_get_ethtool_fdir_entry()
1093 fsp->m_u.tcp_ip4_spec.ip4src = rule->ip_mask.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
1094 fsp->m_u.tcp_ip4_spec.ip4dst = rule->ip_mask.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
1095 fsp->m_u.tcp_ip4_spec.psrc = rule->ip_mask.src_port; in iavf_get_ethtool_fdir_entry()
1096 fsp->m_u.tcp_ip4_spec.pdst = rule->ip_mask.dst_port; in iavf_get_ethtool_fdir_entry()
1097 fsp->m_u.tcp_ip4_spec.tos = rule->ip_mask.tos; in iavf_get_ethtool_fdir_entry()
1101 fsp->h_u.ah_ip4_spec.ip4src = rule->ip_data.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
1102 fsp->h_u.ah_ip4_spec.ip4dst = rule->ip_data.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
1103 fsp->h_u.ah_ip4_spec.spi = rule->ip_data.spi; in iavf_get_ethtool_fdir_entry()
1104 fsp->h_u.ah_ip4_spec.tos = rule->ip_data.tos; in iavf_get_ethtool_fdir_entry()
1105 fsp->m_u.ah_ip4_spec.ip4src = rule->ip_mask.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
1106 fsp->m_u.ah_ip4_spec.ip4dst = rule->ip_mask.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
1107 fsp->m_u.ah_ip4_spec.spi = rule->ip_mask.spi; in iavf_get_ethtool_fdir_entry()
1108 fsp->m_u.ah_ip4_spec.tos = rule->ip_mask.tos; in iavf_get_ethtool_fdir_entry()
1111 fsp->h_u.usr_ip4_spec.ip4src = rule->ip_data.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
1112 fsp->h_u.usr_ip4_spec.ip4dst = rule->ip_data.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
1113 fsp->h_u.usr_ip4_spec.l4_4_bytes = rule->ip_data.l4_header; in iavf_get_ethtool_fdir_entry()
1114 fsp->h_u.usr_ip4_spec.tos = rule->ip_data.tos; in iavf_get_ethtool_fdir_entry()
1115 fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4; in iavf_get_ethtool_fdir_entry()
1116 fsp->h_u.usr_ip4_spec.proto = rule->ip_data.proto; in iavf_get_ethtool_fdir_entry()
1117 fsp->m_u.usr_ip4_spec.ip4src = rule->ip_mask.v4_addrs.src_ip; in iavf_get_ethtool_fdir_entry()
1118 fsp->m_u.usr_ip4_spec.ip4dst = rule->ip_mask.v4_addrs.dst_ip; in iavf_get_ethtool_fdir_entry()
1119 fsp->m_u.usr_ip4_spec.l4_4_bytes = rule->ip_mask.l4_header; in iavf_get_ethtool_fdir_entry()
1120 fsp->m_u.usr_ip4_spec.tos = rule->ip_mask.tos; in iavf_get_ethtool_fdir_entry()
1121 fsp->m_u.usr_ip4_spec.ip_ver = 0xFF; in iavf_get_ethtool_fdir_entry()
1122 fsp->m_u.usr_ip4_spec.proto = rule->ip_mask.proto; in iavf_get_ethtool_fdir_entry()
1127 memcpy(fsp->h_u.usr_ip6_spec.ip6src, &rule->ip_data.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1129 memcpy(fsp->h_u.usr_ip6_spec.ip6dst, &rule->ip_data.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1131 fsp->h_u.tcp_ip6_spec.psrc = rule->ip_data.src_port; in iavf_get_ethtool_fdir_entry()
1132 fsp->h_u.tcp_ip6_spec.pdst = rule->ip_data.dst_port; in iavf_get_ethtool_fdir_entry()
1133 fsp->h_u.tcp_ip6_spec.tclass = rule->ip_data.tclass; in iavf_get_ethtool_fdir_entry()
1134 memcpy(fsp->m_u.usr_ip6_spec.ip6src, &rule->ip_mask.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1136 memcpy(fsp->m_u.usr_ip6_spec.ip6dst, &rule->ip_mask.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1138 fsp->m_u.tcp_ip6_spec.psrc = rule->ip_mask.src_port; in iavf_get_ethtool_fdir_entry()
1139 fsp->m_u.tcp_ip6_spec.pdst = rule->ip_mask.dst_port; in iavf_get_ethtool_fdir_entry()
1140 fsp->m_u.tcp_ip6_spec.tclass = rule->ip_mask.tclass; in iavf_get_ethtool_fdir_entry()
1144 memcpy(fsp->h_u.ah_ip6_spec.ip6src, &rule->ip_data.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1146 memcpy(fsp->h_u.ah_ip6_spec.ip6dst, &rule->ip_data.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1148 fsp->h_u.ah_ip6_spec.spi = rule->ip_data.spi; in iavf_get_ethtool_fdir_entry()
1149 fsp->h_u.ah_ip6_spec.tclass = rule->ip_data.tclass; in iavf_get_ethtool_fdir_entry()
1150 memcpy(fsp->m_u.ah_ip6_spec.ip6src, &rule->ip_mask.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1152 memcpy(fsp->m_u.ah_ip6_spec.ip6dst, &rule->ip_mask.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1154 fsp->m_u.ah_ip6_spec.spi = rule->ip_mask.spi; in iavf_get_ethtool_fdir_entry()
1155 fsp->m_u.ah_ip6_spec.tclass = rule->ip_mask.tclass; in iavf_get_ethtool_fdir_entry()
1158 memcpy(fsp->h_u.usr_ip6_spec.ip6src, &rule->ip_data.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1160 memcpy(fsp->h_u.usr_ip6_spec.ip6dst, &rule->ip_data.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1162 fsp->h_u.usr_ip6_spec.l4_4_bytes = rule->ip_data.l4_header; in iavf_get_ethtool_fdir_entry()
1163 fsp->h_u.usr_ip6_spec.tclass = rule->ip_data.tclass; in iavf_get_ethtool_fdir_entry()
1164 fsp->h_u.usr_ip6_spec.l4_proto = rule->ip_data.proto; in iavf_get_ethtool_fdir_entry()
1165 memcpy(fsp->m_u.usr_ip6_spec.ip6src, &rule->ip_mask.v6_addrs.src_ip, in iavf_get_ethtool_fdir_entry()
1167 memcpy(fsp->m_u.usr_ip6_spec.ip6dst, &rule->ip_mask.v6_addrs.dst_ip, in iavf_get_ethtool_fdir_entry()
1169 fsp->m_u.usr_ip6_spec.l4_4_bytes = rule->ip_mask.l4_header; in iavf_get_ethtool_fdir_entry()
1170 fsp->m_u.usr_ip6_spec.tclass = rule->ip_mask.tclass; in iavf_get_ethtool_fdir_entry()
1171 fsp->m_u.usr_ip6_spec.l4_proto = rule->ip_mask.proto; in iavf_get_ethtool_fdir_entry()
1174 fsp->h_u.ether_spec.h_proto = rule->eth_data.etype; in iavf_get_ethtool_fdir_entry()
1175 fsp->m_u.ether_spec.h_proto = rule->eth_mask.etype; in iavf_get_ethtool_fdir_entry()
1182 iavf_fill_rx_flow_ext_data(fsp, rule); in iavf_get_ethtool_fdir_entry()
1185 fsp->ring_cookie = RX_CLS_FLOW_DISC; in iavf_get_ethtool_fdir_entry()
1187 fsp->ring_cookie = rule->q_index; in iavf_get_ethtool_fdir_entry()
1241 iavf_add_fdir_fltr_info(struct iavf_adapter *adapter, struct ethtool_rx_flow_spec *fsp, in iavf_add_fdir_fltr_info() argument
1248 if (fsp->ring_cookie == RX_CLS_FLOW_DISC) { in iavf_add_fdir_fltr_info()
1251 q_index = fsp->ring_cookie; in iavf_add_fdir_fltr_info()
1259 fltr->loc = fsp->location; in iavf_add_fdir_fltr_info()
1262 if (fsp->flow_type & FLOW_EXT) { in iavf_add_fdir_fltr_info()
1263 memcpy(fltr->ext_data.usr_def, fsp->h_ext.data, in iavf_add_fdir_fltr_info()
1265 memcpy(fltr->ext_mask.usr_def, fsp->m_ext.data, in iavf_add_fdir_fltr_info()
1269 flow_type = fsp->flow_type & ~(FLOW_EXT | FLOW_MAC_EXT | FLOW_RSS); in iavf_add_fdir_fltr_info()
1276 fltr->ip_data.v4_addrs.src_ip = fsp->h_u.tcp_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1277 fltr->ip_data.v4_addrs.dst_ip = fsp->h_u.tcp_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1278 fltr->ip_data.src_port = fsp->h_u.tcp_ip4_spec.psrc; in iavf_add_fdir_fltr_info()
1279 fltr->ip_data.dst_port = fsp->h_u.tcp_ip4_spec.pdst; in iavf_add_fdir_fltr_info()
1280 fltr->ip_data.tos = fsp->h_u.tcp_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1281 fltr->ip_mask.v4_addrs.src_ip = fsp->m_u.tcp_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1282 fltr->ip_mask.v4_addrs.dst_ip = fsp->m_u.tcp_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1283 fltr->ip_mask.src_port = fsp->m_u.tcp_ip4_spec.psrc; in iavf_add_fdir_fltr_info()
1284 fltr->ip_mask.dst_port = fsp->m_u.tcp_ip4_spec.pdst; in iavf_add_fdir_fltr_info()
1285 fltr->ip_mask.tos = fsp->m_u.tcp_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1289 fltr->ip_data.v4_addrs.src_ip = fsp->h_u.ah_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1290 fltr->ip_data.v4_addrs.dst_ip = fsp->h_u.ah_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1291 fltr->ip_data.spi = fsp->h_u.ah_ip4_spec.spi; in iavf_add_fdir_fltr_info()
1292 fltr->ip_data.tos = fsp->h_u.ah_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1293 fltr->ip_mask.v4_addrs.src_ip = fsp->m_u.ah_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1294 fltr->ip_mask.v4_addrs.dst_ip = fsp->m_u.ah_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1295 fltr->ip_mask.spi = fsp->m_u.ah_ip4_spec.spi; in iavf_add_fdir_fltr_info()
1296 fltr->ip_mask.tos = fsp->m_u.ah_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1299 fltr->ip_data.v4_addrs.src_ip = fsp->h_u.usr_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1300 fltr->ip_data.v4_addrs.dst_ip = fsp->h_u.usr_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1301 fltr->ip_data.l4_header = fsp->h_u.usr_ip4_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1302 fltr->ip_data.tos = fsp->h_u.usr_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1303 fltr->ip_data.proto = fsp->h_u.usr_ip4_spec.proto; in iavf_add_fdir_fltr_info()
1304 fltr->ip_mask.v4_addrs.src_ip = fsp->m_u.usr_ip4_spec.ip4src; in iavf_add_fdir_fltr_info()
1305 fltr->ip_mask.v4_addrs.dst_ip = fsp->m_u.usr_ip4_spec.ip4dst; in iavf_add_fdir_fltr_info()
1306 fltr->ip_mask.l4_header = fsp->m_u.usr_ip4_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1307 fltr->ip_mask.tos = fsp->m_u.usr_ip4_spec.tos; in iavf_add_fdir_fltr_info()
1308 fltr->ip_mask.proto = fsp->m_u.usr_ip4_spec.proto; in iavf_add_fdir_fltr_info()
1313 memcpy(&fltr->ip_data.v6_addrs.src_ip, fsp->h_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1315 memcpy(&fltr->ip_data.v6_addrs.dst_ip, fsp->h_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1317 fltr->ip_data.src_port = fsp->h_u.tcp_ip6_spec.psrc; in iavf_add_fdir_fltr_info()
1318 fltr->ip_data.dst_port = fsp->h_u.tcp_ip6_spec.pdst; in iavf_add_fdir_fltr_info()
1319 fltr->ip_data.tclass = fsp->h_u.tcp_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1320 memcpy(&fltr->ip_mask.v6_addrs.src_ip, fsp->m_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1322 memcpy(&fltr->ip_mask.v6_addrs.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1324 fltr->ip_mask.src_port = fsp->m_u.tcp_ip6_spec.psrc; in iavf_add_fdir_fltr_info()
1325 fltr->ip_mask.dst_port = fsp->m_u.tcp_ip6_spec.pdst; in iavf_add_fdir_fltr_info()
1326 fltr->ip_mask.tclass = fsp->m_u.tcp_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1330 memcpy(&fltr->ip_data.v6_addrs.src_ip, fsp->h_u.ah_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1332 memcpy(&fltr->ip_data.v6_addrs.dst_ip, fsp->h_u.ah_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1334 fltr->ip_data.spi = fsp->h_u.ah_ip6_spec.spi; in iavf_add_fdir_fltr_info()
1335 fltr->ip_data.tclass = fsp->h_u.ah_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1336 memcpy(&fltr->ip_mask.v6_addrs.src_ip, fsp->m_u.ah_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1338 memcpy(&fltr->ip_mask.v6_addrs.dst_ip, fsp->m_u.ah_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1340 fltr->ip_mask.spi = fsp->m_u.ah_ip6_spec.spi; in iavf_add_fdir_fltr_info()
1341 fltr->ip_mask.tclass = fsp->m_u.ah_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1344 memcpy(&fltr->ip_data.v6_addrs.src_ip, fsp->h_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1346 memcpy(&fltr->ip_data.v6_addrs.dst_ip, fsp->h_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1348 fltr->ip_data.l4_header = fsp->h_u.usr_ip6_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1349 fltr->ip_data.tclass = fsp->h_u.usr_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1350 fltr->ip_data.proto = fsp->h_u.usr_ip6_spec.l4_proto; in iavf_add_fdir_fltr_info()
1351 memcpy(&fltr->ip_mask.v6_addrs.src_ip, fsp->m_u.usr_ip6_spec.ip6src, in iavf_add_fdir_fltr_info()
1353 memcpy(&fltr->ip_mask.v6_addrs.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst, in iavf_add_fdir_fltr_info()
1355 fltr->ip_mask.l4_header = fsp->m_u.usr_ip6_spec.l4_4_bytes; in iavf_add_fdir_fltr_info()
1356 fltr->ip_mask.tclass = fsp->m_u.usr_ip6_spec.tclass; in iavf_add_fdir_fltr_info()
1357 fltr->ip_mask.proto = fsp->m_u.usr_ip6_spec.l4_proto; in iavf_add_fdir_fltr_info()
1360 fltr->eth_data.etype = fsp->h_u.ether_spec.h_proto; in iavf_add_fdir_fltr_info()
1361 fltr->eth_mask.etype = fsp->m_u.ether_spec.h_proto; in iavf_add_fdir_fltr_info()
1371 err = iavf_parse_rx_flow_user_data(fsp, fltr); in iavf_add_fdir_fltr_info()
1387 struct ethtool_rx_flow_spec *fsp = &cmd->fs; in iavf_add_fdir_ethtool() local
1395 if (fsp->flow_type & FLOW_MAC_EXT) in iavf_add_fdir_ethtool()
1406 if (iavf_find_fdir_fltr_by_loc(adapter, fsp->location)) { in iavf_add_fdir_ethtool()
1425 err = iavf_add_fdir_fltr_info(adapter, fsp, fltr); in iavf_add_fdir_ethtool()
1455 struct ethtool_rx_flow_spec *fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; in iavf_del_fdir_ethtool() local
1463 fltr = iavf_find_fdir_fltr_by_loc(adapter, fsp->location); in iavf_del_fdir_ethtool()