Lines Matching refs:tab
925 static void gfar_set_mask(u32 mask, struct filer_table *tab) in gfar_set_mask() argument
927 tab->fe[tab->index].ctrl = RQFCR_AND | RQFCR_PID_MASK | RQFCR_CMP_EXACT; in gfar_set_mask()
928 tab->fe[tab->index].prop = mask; in gfar_set_mask()
929 tab->index++; in gfar_set_mask()
933 static void gfar_set_parse_bits(u32 value, u32 mask, struct filer_table *tab) in gfar_set_parse_bits() argument
935 gfar_set_mask(mask, tab); in gfar_set_parse_bits()
936 tab->fe[tab->index].ctrl = RQFCR_CMP_EXACT | RQFCR_PID_PARSE | in gfar_set_parse_bits()
938 tab->fe[tab->index].prop = value; in gfar_set_parse_bits()
939 tab->index++; in gfar_set_parse_bits()
943 struct filer_table *tab) in gfar_set_general_attribute() argument
945 gfar_set_mask(mask, tab); in gfar_set_general_attribute()
946 tab->fe[tab->index].ctrl = RQFCR_CMP_EXACT | RQFCR_AND | flag; in gfar_set_general_attribute()
947 tab->fe[tab->index].prop = value; in gfar_set_general_attribute()
948 tab->index++; in gfar_set_general_attribute()
966 struct filer_table *tab) in gfar_set_attribute() argument
1019 gfar_set_general_attribute(value, mask, flag, tab); in gfar_set_attribute()
1025 struct filer_table *tab) in gfar_set_basic_ip() argument
1029 RQFCR_PID_SIA, tab); in gfar_set_basic_ip()
1032 RQFCR_PID_DIA, tab); in gfar_set_basic_ip()
1035 RQFCR_PID_DPT, tab); in gfar_set_basic_ip()
1038 RQFCR_PID_SPT, tab); in gfar_set_basic_ip()
1039 gfar_set_attribute(value->tos, mask->tos, RQFCR_PID_TOS, tab); in gfar_set_basic_ip()
1045 struct filer_table *tab) in gfar_set_user_ip() argument
1049 RQFCR_PID_SIA, tab); in gfar_set_user_ip()
1052 RQFCR_PID_DIA, tab); in gfar_set_user_ip()
1053 gfar_set_attribute(value->tos, mask->tos, RQFCR_PID_TOS, tab); in gfar_set_user_ip()
1054 gfar_set_attribute(value->proto, mask->proto, RQFCR_PID_L4P, tab); in gfar_set_user_ip()
1057 RQFCR_PID_ARB, tab); in gfar_set_user_ip()
1063 struct filer_table *tab) in gfar_set_ether() argument
1085 upper_temp_mask, RQFCR_PID_SAH, tab); in gfar_set_ether()
1090 lower_temp_mask, RQFCR_PID_SAL, tab); in gfar_set_ether()
1097 gfar_set_parse_bits(RQFPR_EBC, RQFPR_EBC, tab); in gfar_set_ether()
1115 upper_temp_mask, RQFCR_PID_DAH, tab); in gfar_set_ether()
1120 lower_temp_mask, RQFCR_PID_DAL, tab); in gfar_set_ether()
1126 RQFCR_PID_ETY, tab); in gfar_set_ether()
1163 struct filer_table *tab) in gfar_convert_to_filer() argument
1169 u32 old_index = tab->index; in gfar_convert_to_filer()
1200 RQFPR_IPV4 | RQFPR_TCP | vlan_mask, tab); in gfar_convert_to_filer()
1202 &rule->m_u.tcp_ip4_spec, tab); in gfar_convert_to_filer()
1206 RQFPR_IPV4 | RQFPR_UDP | vlan_mask, tab); in gfar_convert_to_filer()
1208 &rule->m_u.udp_ip4_spec, tab); in gfar_convert_to_filer()
1212 tab); in gfar_convert_to_filer()
1213 gfar_set_attribute(132, 0, RQFCR_PID_L4P, tab); in gfar_convert_to_filer()
1216 tab); in gfar_convert_to_filer()
1220 tab); in gfar_convert_to_filer()
1223 tab); in gfar_convert_to_filer()
1227 gfar_set_parse_bits(vlan, vlan_mask, tab); in gfar_convert_to_filer()
1229 (struct ethhdr *) &rule->m_u, tab); in gfar_convert_to_filer()
1237 gfar_set_attribute(id, id_mask, RQFCR_PID_VID, tab); in gfar_convert_to_filer()
1238 gfar_set_attribute(prio, prio_mask, RQFCR_PID_PRI, tab); in gfar_convert_to_filer()
1242 if (tab->index == old_index) { in gfar_convert_to_filer()
1243 gfar_set_mask(0xFFFFFFFF, tab); in gfar_convert_to_filer()
1244 tab->fe[tab->index].ctrl = 0x20; in gfar_convert_to_filer()
1245 tab->fe[tab->index].prop = 0x0; in gfar_convert_to_filer()
1246 tab->index++; in gfar_convert_to_filer()
1250 tab->fe[tab->index - 1].ctrl &= (~RQFCR_AND); in gfar_convert_to_filer()
1254 tab->fe[tab->index - 1].ctrl |= RQFCR_RJE; in gfar_convert_to_filer()
1256 tab->fe[tab->index - 1].ctrl |= (rule->ring_cookie << 10); in gfar_convert_to_filer()
1259 if (tab->index > (old_index + 2)) { in gfar_convert_to_filer()
1260 tab->fe[old_index + 1].ctrl |= RQFCR_CLE; in gfar_convert_to_filer()
1261 tab->fe[tab->index - 1].ctrl |= RQFCR_CLE; in gfar_convert_to_filer()
1267 if (tab->index > MAX_FILER_CACHE_IDX - 1) in gfar_convert_to_filer()
1275 struct filer_table *tab) in gfar_write_filer_table() argument
1278 if (tab->index > MAX_FILER_IDX - 1) in gfar_write_filer_table()
1282 for (; i < MAX_FILER_IDX && (tab->fe[i].ctrl | tab->fe[i].prop); i++) in gfar_write_filer_table()
1283 gfar_write_filer(priv, i, tab->fe[i].ctrl, tab->fe[i].prop); in gfar_write_filer_table()
1318 struct filer_table *tab; in gfar_process_filer_changes() local
1322 tab = kzalloc(sizeof(*tab), GFP_KERNEL); in gfar_process_filer_changes()
1323 if (tab == NULL) in gfar_process_filer_changes()
1330 ret = gfar_convert_to_filer(&j->fs, tab); in gfar_process_filer_changes()
1344 ret = gfar_write_filer_table(priv, tab); in gfar_process_filer_changes()
1351 kfree(tab); in gfar_process_filer_changes()