|
7 | 7 |
|
8 | 8 | /* Each recipe can match up to 5 different fields. Fields to match can be meta-
|
9 | 9 | * data, values extracted from packet headers, or results from other recipes.
|
10 |
| - * One of the 5 fields is reserved for matching the switch ID. So, up to 4 |
11 |
| - * recipes can provide intermediate results to another one through chaining, |
12 |
| - * e.g. recipes 0, 1, 2, and 3 can provide intermediate results to recipe 4. |
| 10 | + * Therefore, up to 5 recipes can provide intermediate results to another one |
| 11 | + * through chaining, e.g. recipes 0, 1, 2, 3 and 4 can provide intermediate |
| 12 | + * results to recipe 5. Note that one of the fields in one of the recipes must |
| 13 | + * always be reserved for matching the switch ID. |
13 | 14 | */
|
14 |
| -#define ICE_NUM_WORDS_RECIPE 4 |
| 15 | +#define ICE_NUM_WORDS_RECIPE 5 |
15 | 16 |
|
16 |
| -/* Max recipes that can be chained */ |
| 17 | +/* Max recipes that can be chained, not including the last one, which combines |
| 18 | + * intermediate results. |
| 19 | + */ |
17 | 20 | #define ICE_MAX_CHAIN_RECIPE 5
|
18 | 21 |
|
19 |
| -/* 1 word reserved for switch ID from allowed 5 words. |
20 |
| - * So a recipe can have max 4 words. And you can chain 5 such recipes |
21 |
| - * together. So maximum words that can be programmed for look up is 5 * 4. |
| 22 | +/* Total max recipes in chain recipe (including intermediate results) */ |
| 23 | +#define ICE_MAX_CHAIN_RECIPE_RES (ICE_MAX_CHAIN_RECIPE + 1) |
| 24 | + |
| 25 | +/* A recipe can have max 5 words, and 5 recipes can be chained together (using |
| 26 | + * the 6th one, which would contain only result indexes). So maximum words that |
| 27 | + * can be programmed for lookup is 5 * 5 (not including intermediate results). |
22 | 28 | */
|
23 | 29 | #define ICE_MAX_CHAIN_WORDS (ICE_NUM_WORDS_RECIPE * ICE_MAX_CHAIN_RECIPE)
|
24 | 30 |
|
@@ -449,32 +455,11 @@ struct ice_prot_ext_tbl_entry {
|
449 | 455 |
|
450 | 456 | /* Extractions to be looked up for a given recipe */
|
451 | 457 | struct ice_prot_lkup_ext {
|
452 |
| - u16 prot_type; |
453 | 458 | u8 n_val_words;
|
454 | 459 | /* create a buffer to hold max words per recipe */
|
455 |
| - u16 field_off[ICE_MAX_CHAIN_WORDS]; |
456 | 460 | u16 field_mask[ICE_MAX_CHAIN_WORDS];
|
457 | 461 |
|
458 | 462 | struct ice_fv_word fv_words[ICE_MAX_CHAIN_WORDS];
|
459 |
| - |
460 |
| - /* Indicate field offsets that have field vector indices assigned */ |
461 |
| - DECLARE_BITMAP(done, ICE_MAX_CHAIN_WORDS); |
462 | 463 | };
|
463 | 464 |
|
464 |
| -struct ice_pref_recipe_group { |
465 |
| - u8 n_val_pairs; /* Number of valid pairs */ |
466 |
| - struct ice_fv_word pairs[ICE_NUM_WORDS_RECIPE]; |
467 |
| - u16 mask[ICE_NUM_WORDS_RECIPE]; |
468 |
| -}; |
469 |
| - |
470 |
| -struct ice_recp_grp_entry { |
471 |
| - struct list_head l_entry; |
472 |
| - |
473 |
| -#define ICE_INVAL_CHAIN_IND 0xFF |
474 |
| - u16 rid; |
475 |
| - u8 chain_idx; |
476 |
| - u16 fv_idx[ICE_NUM_WORDS_RECIPE]; |
477 |
| - u16 fv_mask[ICE_NUM_WORDS_RECIPE]; |
478 |
| - struct ice_pref_recipe_group r_group; |
479 |
| -}; |
480 | 465 | #endif /* _ICE_PROTOCOL_TYPE_H_ */
|
0 commit comments