Lines Matching refs:table

27  * table is full.
51 u32 offset; /* address of table relative to BAR */
62 struct efx_filter_table table[EFX_FILTER_TABLE_COUNT];
113 return &state->table[efx_filter_spec_table_id(spec)];
116 static void efx_filter_table_reset_search_depth(struct efx_filter_table *table)
118 memset(table->search_depth, 0, sizeof(table->search_depth));
124 struct efx_filter_table *table;
129 table = &state->table[EFX_FILTER_TABLE_RX_IP];
131 table->search_depth[EFX_FILTER_TCP_FULL] +
134 table->search_depth[EFX_FILTER_TCP_WILD] +
137 table->search_depth[EFX_FILTER_UDP_FULL] +
140 table->search_depth[EFX_FILTER_UDP_WILD] +
143 table = &state->table[EFX_FILTER_TABLE_RX_MAC];
144 if (table->size) {
147 table->search_depth[EFX_FILTER_MAC_FULL] +
151 table->search_depth[EFX_FILTER_MAC_WILD] +
155 table = &state->table[EFX_FILTER_TABLE_RX_DEF];
156 if (table->size) {
159 table->spec[EFX_FILTER_INDEX_UC_DEF].dmaq_id);
162 !!(table->spec[EFX_FILTER_INDEX_UC_DEF].flags &
166 !!(table->spec[EFX_FILTER_INDEX_UC_DEF].flags &
170 table->spec[EFX_FILTER_INDEX_MC_DEF].dmaq_id);
173 !!(table->spec[EFX_FILTER_INDEX_MC_DEF].flags &
177 !!(table->spec[EFX_FILTER_INDEX_MC_DEF].flags &
187 struct efx_filter_table *table;
192 table = &state->table[EFX_FILTER_TABLE_TX_MAC];
193 if (table->size) {
196 table->search_depth[EFX_FILTER_MAC_FULL] +
200 table->search_depth[EFX_FILTER_MAC_WILD] +
418 struct efx_filter_table *table = &state->table[EFX_FILTER_TABLE_RX_DEF];
419 struct efx_filter_spec *spec = &table->spec[filter_idx];
424 table->used_bitmap[0] |= 1 << filter_idx;
533 static int efx_filter_search(struct efx_filter_table *table,
542 filter_idx = hash & (table->size - 1);
547 table->search_depth[spec->type]);
553 if (test_bit(filter_idx, table->used_bitmap) ?
554 efx_filter_equal(spec, &table->spec[filter_idx]) :
564 filter_idx = (filter_idx + incr) & (table->size - 1);
639 if (state->table[table_id].size != 0)
642 state->table[table_id].size;
662 struct efx_filter_table *table = efx_filter_spec_table(state, spec);
669 if (!table || table->size == 0)
676 table->search_depth[spec->type]);
680 rc = efx_filter_search(table, spec, key, true, &depth);
684 BUG_ON(filter_idx >= table->size);
685 saved_spec = &table->spec[filter_idx];
687 if (test_bit(filter_idx, table->used_bitmap)) {
698 __set_bit(filter_idx, table->used_bitmap);
699 ++table->used;
703 if (table->id == EFX_FILTER_TABLE_RX_DEF) {
706 if (table->search_depth[spec->type] < depth) {
707 table->search_depth[spec->type] = depth;
715 table->offset + table->step * filter_idx);
721 rc = efx_filter_make_id(table->id, filter_idx, spec->flags);
729 struct efx_filter_table *table,
734 if (table->id == EFX_FILTER_TABLE_RX_DEF) {
738 } else if (test_bit(filter_idx, table->used_bitmap)) {
739 __clear_bit(filter_idx, table->used_bitmap);
740 --table->used;
741 memset(&table->spec[filter_idx], 0, sizeof(table->spec[0]));
744 table->offset + table->step * filter_idx);
763 struct efx_filter_table *table;
772 table = &state->table[table_id];
775 if (filter_idx >= table->size)
777 spec = &table->spec[filter_idx];
783 if (test_bit(filter_idx, table->used_bitmap) &&
786 efx_filter_table_clear_entry(efx, table, filter_idx);
787 if (table->used == 0)
788 efx_filter_table_reset_search_depth(table);
815 struct efx_filter_table *table;
824 table = &state->table[table_id];
827 if (filter_idx >= table->size)
829 spec = &table->spec[filter_idx];
835 if (test_bit(filter_idx, table->used_bitmap) &&
854 struct efx_filter_table *table = &state->table[table_id];
859 for (filter_idx = 0; filter_idx < table->size; ++filter_idx)
860 if (table->spec[filter_idx].priority <= priority)
861 efx_filter_table_clear_entry(efx, table, filter_idx);
862 if (table->used == 0)
863 efx_filter_table_reset_search_depth(table);
884 struct efx_filter_table *table;
893 table = &state->table[table_id];
894 for (filter_idx = 0; filter_idx < table->size; filter_idx++) {
895 if (test_bit(filter_idx, table->used_bitmap) &&
896 table->spec[filter_idx].priority == priority)
912 struct efx_filter_table *table;
921 table = &state->table[table_id];
922 for (filter_idx = 0; filter_idx < table->size; filter_idx++) {
923 if (test_bit(filter_idx, table->used_bitmap) &&
924 table->spec[filter_idx].priority == priority) {
931 table->spec[filter_idx].flags);
946 struct efx_filter_table *table;
953 table = &state->table[table_id];
955 /* Check whether this is a regular register table */
956 if (table->step == 0)
959 for (filter_idx = 0; filter_idx < table->size; filter_idx++) {
960 if (!test_bit(filter_idx, table->used_bitmap))
962 efx_filter_build(&filter, &table->spec[filter_idx]);
964 table->offset + table->step * filter_idx);
977 struct efx_filter_table *table;
995 table = &state->table[EFX_FILTER_TABLE_RX_IP];
996 table->id = EFX_FILTER_TABLE_RX_IP;
997 table->offset = FR_BZ_RX_FILTER_TBL0;
998 table->size = FR_BZ_RX_FILTER_TBL0_ROWS;
999 table->step = FR_BZ_RX_FILTER_TBL0_STEP;
1003 table = &state->table[EFX_FILTER_TABLE_RX_MAC];
1004 table->id = EFX_FILTER_TABLE_RX_MAC;
1005 table->offset = FR_CZ_RX_MAC_FILTER_TBL0;
1006 table->size = FR_CZ_RX_MAC_FILTER_TBL0_ROWS;
1007 table->step = FR_CZ_RX_MAC_FILTER_TBL0_STEP;
1009 table = &state->table[EFX_FILTER_TABLE_RX_DEF];
1010 table->id = EFX_FILTER_TABLE_RX_DEF;
1011 table->size = EFX_FILTER_SIZE_RX_DEF;
1013 table = &state->table[EFX_FILTER_TABLE_TX_MAC];
1014 table->id = EFX_FILTER_TABLE_TX_MAC;
1015 table->offset = FR_CZ_TX_MAC_FILTER_TBL0;
1016 table->size = FR_CZ_TX_MAC_FILTER_TBL0_ROWS;
1017 table->step = FR_CZ_TX_MAC_FILTER_TBL0_STEP;
1021 table = &state->table[table_id];
1022 if (table->size == 0)
1024 table->used_bitmap = kcalloc(BITS_TO_LONGS(table->size),
1027 if (!table->used_bitmap)
1029 table->spec = vzalloc(table->size * sizeof(*table->spec));
1030 if (!table->spec)
1034 if (state->table[EFX_FILTER_TABLE_RX_DEF].size) {
1056 kfree(state->table[table_id].used_bitmap);
1057 vfree(state->table[table_id].spec);
1119 struct efx_filter_table *table = &state->table[EFX_FILTER_TABLE_RX_IP];
1120 unsigned mask = table->size - 1;
1131 if (test_bit(index, table->used_bitmap) &&
1132 table->spec[index].priority == EFX_FILTER_PRI_HINT &&
1134 table->spec[index].dmaq_id,
1139 efx_filter_table_clear_entry(efx, table, index);
1145 if (table->used == 0)
1146 efx_filter_table_reset_search_depth(table);