|
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 |
|
|
0 commit comments