DPDK logo

Elixir Cross Referencer

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright 2008-2012 Freescale Semiconductor Inc.
 * Copyright 2017-2020 NXP
 */

#ifndef __FM_PCD_EXT_H
#define __FM_PCD_EXT_H

#include "ncsw_ext.h"
#include "net_ext.h"
#include "fm_ext.h"

/*
 * @Description	  FM PCD ...
 * @Group	  lnx_ioctl_FM_grp Frame Manager Linux IOCTL API
 * @Description	  Frame Manager Linux ioctls definitions and enums
 * @{
 */

/*
 * @Group	  lnx_ioctl_FM_PCD_grp FM PCD
 * @Description	  Frame Manager PCD API functions, definitions and enums
 *
 *		  The FM PCD module is responsible for the initialization of all
 *		  global classifying FM modules. This includes the parser
 *		  general and common registers, the key generator global and
 *		  common registers, and the policer global and common registers.
 *		  In addition, the FM PCD SW module will initialize all required
 *		  key generator schemes, coarse classification flows, and
 *		  policer profiles. When an FM module is configured to work with
 *		  one of these entities, it will register to it using the FM
 *		  PORT API. The PCD module will manage the PCD resources - i.e.
 *		  resource management of KeyGen schemes, etc.
 *
 * @{
 */

/*
 * @Collection	General PCD defines
 */
#define IOC_FM_PCD_MAX_NUM_OF_PRIVATE_HDRS		2
/**< Number of units/headers saved for user */

#define IOC_FM_PCD_PRS_NUM_OF_HDRS			16
/**< Number of headers supported by HW parser */
#define IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS \
	(32 - IOC_FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)
/**< Number of distinction units is limited by register size (32 bits) minus
 * reserved bits for private headers.
 */
#define IOC_FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS	4
/**< Maximum number of interchangeable headers in a distinction unit */
#define IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS		8
/**< Total number of generic KeyGen registers */
#define IOC_FM_PCD_KG_MAX_EXTRACTS_PER_KEY	35
/**< Max number allowed on any configuration; For HW implementation reasons,
 * in most cases less than this will be allowed; The driver will return an
 * initialization error if resource is unavailable.
 */
#define IOC_FM_PCD_KG_NUM_OF_EXTRACT_MASKS		4
/**< Total number of masks allowed on KeyGen extractions. */
#define IOC_FM_PCD_KG_NUM_OF_DEFAULT_GROUPS		16
/**< Number of default value logical groups */
#define IOC_FM_PCD_PRS_NUM_OF_LABELS			32
/**< Maximum number of SW parser labels */
#define IOC_FM_PCD_SW_PRS_SIZE			0x00000800
/**< Total size of SW parser area */

#define IOC_FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE	128
/**< Maximum size of insertion template for insert manipulation */

#define IOC_FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES	64
/**< Maximum possible entries for frame replicator group */
/* @} */

/*
 * @Group	  lnx_ioctl_FM_PCD_init_grp FM PCD Initialization Unit
 *
 * @Description   Frame Manager PCD Initialization Unit API
 *
 * @{
 */

/*
 * @Description   PCD counters
 *		  (must match enum ioc_fm_pcd_counters defined in fm_pcd_ext.h)
 */
typedef enum ioc_fm_pcd_counters {
	e_IOC_FM_PCD_KG_COUNTERS_TOTAL,		/**< KeyGen counter */
	e_IOC_FM_PCD_PLCR_COUNTERS_RED,
	/**< Policer counter - counts the total number of RED packets that exit
	 * the Policer.
	 */
	e_IOC_FM_PCD_PLCR_COUNTERS_YELLOW,
	/**< Policer counter - counts the total number of YELLOW packets that
	 * exit the Policer.
	 */
	e_IOC_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_RED,
	/**< Policer counter - counts the number of packets that changed color
	 * to RED by the Policer; This is a subset of
	 * e_IOC_FM_PCD_PLCR_COUNTERS_RED packet count, indicating active color
	 * changes.
	 */
	e_IOC_FM_PCD_PLCR_COUNTERS_RECOLORED_TO_YELLOW,
	/**< Policer counter - counts the number of packets that changed color
	 * to YELLOW by the Policer; This is a subset of
	 * e_IOC_FM_PCD_PLCR_COUNTERS_YELLOW packet count, indicating active
	 * color changes.
	 */
	e_IOC_FM_PCD_PLCR_COUNTERS_TOTAL,
	/**< Policer counter - counts the total number of packets passed in the
	 * Policer.
	 */
	e_IOC_FM_PCD_PLCR_COUNTERS_LENGTH_MISMATCH,
	/**< Policer counter - counts the number of packets with length
	 * mismatch.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_PARSE_DISPATCH,
	/**< Parser counter - counts the number of times the parser block is
	 * dispatched.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED,
	/**< Parser counter - counts the number of times L2 parse result is
	 * returned (including errors).
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED,
	/**< Parser counter - counts the number of times L3 parse result is
	 * returned (including errors).
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED,
	/**< Parser counter - counts the number of times L4 parse result is
	 * returned (including errors).
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED,
	/**< Parser counter - counts the number of times SHIM parse result is
	 * returned (including errors).
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_L2_PARSE_RESULT_RETURNED_WITH_ERR,
	/**< Parser counter - counts the number of times L2 parse result is
	 * returned with errors.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_L3_PARSE_RESULT_RETURNED_WITH_ERR,
	/**< Parser counter - counts the number of times L3 parse result is
	 * returned with errors.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_L4_PARSE_RESULT_RETURNED_WITH_ERR,
	/**< Parser counter - counts the number of times L4 parse result is
	 * returned with errors.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_SHIM_PARSE_RESULT_RETURNED_WITH_ERR,
	/**< Parser counter - counts the number of times SHIM parse result is
	 * returned with errors.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_SOFT_PRS_CYCLES,
	/**< Parser counter - counts the number of cycles spent executing soft
	 * parser instruction (including stall cycles).
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_SOFT_PRS_STALL_CYCLES,
	/**< Parser counter - counts the number of cycles stalled waiting for
	 * parser internal memory reads while executing soft parser instruction.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_HARD_PRS_CYCLE_INCL_STALL_CYCLES,
	/**< Parser counter - counts the number of cycles spent executing hard
	 * parser (including stall cycles).
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_MURAM_READ_CYCLES,
	/**< MURAM counter - counts the number of cycles while performing FMan
	 * Memory read.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_MURAM_READ_STALL_CYCLES,
	/**< MURAM counter - counts the number of cycles stalled while
	 * performing FMan Memory read.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_MURAM_WRITE_CYCLES,
	/**< MURAM counter - counts the number of cycles while performing FMan
	 * Memory write.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_MURAM_WRITE_STALL_CYCLES,
	/**< MURAM counter - counts the number of cycles stalled while
	 * performing FMan Memory write.
	 */
	e_IOC_FM_PCD_PRS_COUNTERS_FPM_COMMAND_STALL_CYCLES
	/**< FPM counter - counts the number of cycles stalled while performing
	 * a FPM Command.
	 */
} ioc_fm_pcd_counters;

/*
 * @Description   PCD interrupts
 *		  (must match enum ioc_fm_pcd_exceptions defined in
 *		  fm_pcd_ext.h)
 */
typedef enum ioc_fm_pcd_exceptions {
	e_IOC_FM_PCD_KG_EXCEPTION_DOUBLE_ECC,
	/**< KeyGen double-bit ECC error is detected on internal memory read
	 * access.
	 */
	e_IOC_FM_PCD_KG_EXCEPTION_KEYSIZE_OVERFLOW,
	/**< KeyGen scheme configuration error indicating a key size larger than
	 * 56 bytes.
	 */
	e_IOC_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC,
	/**< Policer double-bit ECC error has been detected on PRAM read access.
	 */
	e_IOC_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR,
	/**< Policer access to a non-initialized profile has been detected. */
	e_IOC_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE,
	/**< Policer RAM self-initialization complete */
	e_IOC_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE,
	/**< Policer atomic action complete */
	e_IOC_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC,
	/**< Parser double-bit ECC error */
	e_IOC_FM_PCD_PRS_EXCEPTION_SINGLE_ECC
	/**< Parser single-bit ECC error */
} ioc_fm_pcd_exceptions;

/** @} */ /* end of lnx_ioctl_FM_PCD_init_grp group */

/*
 * @Group	  lnx_ioctl_FM_PCD_Runtime_grp FM PCD Runtime Unit
 *
 * @Description   Frame Manager PCD Runtime Unit
 *
 *		  The runtime control allows creation of PCD infrastructure
 *		  modules such as Network Environment Characteristics,
 *		  Classification Plan Groups and Coarse Classification Trees.
 *		  It also allows on-the-fly initialization, modification and
 *		  removal of PCD modules such as KeyGen schemes, coarse
 *		  classification nodes and Policer profiles.
 *
 *		  In order to explain the programming model of the PCD driver
 *		  interface a few terms should be explained, and will be used
 *		  below.
 *		  - Distinction Header - One of the 16 protocols supported by
 *		    the FM parser, or one of the SHIM headers (1 or 2). May be a
 *		    header with a special option (see below).
 *		  - Interchangeable Headers Group - This is a group of Headers
 *		    recognized by either one of them. For example, if in a
 *		    specific context the user chooses to treat IPv4 and IPV6 in
 *		    the same way, they may create an interchangeable Headers
 *		    Unit consisting of these 2 headers.
 *		  - A Distinction Unit - a Distinction Header or an
 *		    Interchangeable Headers Group.
 *		  - Header with special option - applies to Ethernet, MPLS,
 *		    VLAN, IPv4 and IPv6, includes multicast, broadcast and other
 *		    protocol specific options. In terms of hardware it relates
 *		    to the options available in the classification plan.
 *		  - Network Environment Characteristics - a set of Distinction
 *		    Units that define the total recognizable header selection
 *		    for a certain environment. This is NOT the list of all
 *		    headers that will ever appear in a flow, but rather
 *		    everything that needs distinction in a flow, where
 *		    distinction is made by KeyGen schemes and coarse
 *		    classification action descriptors.
 *
 *		  The PCD runtime modules initialization is done in stages. The
 *		  first stage after initializing the PCD module itself is to
 *		  establish a Network Flows Environment Definition. The
 *		  application may choose to establish one or more such
 *		  environments. Later, when needed, the application will have to
 *		  state, for some of its modules, to which single environment it
 *		  belongs.
 *
 * @{
 */

/*
 * @Description   structure for FM counters
 */
typedef struct ioc_fm_pcd_counters_params_t {
	ioc_fm_pcd_counters cnt;	/**< The requested counter */
	uint32_t	val;
			/**< The requested value to get/set from/into the
			 * counter
			 */
} ioc_fm_pcd_counters_params_t;

/*
 * @Description   structure for FM exception definitios
 */
typedef struct ioc_fm_pcd_exception_params_t {
	ioc_fm_pcd_exceptions exception;	/**< The requested exception */
	bool		enable;
			/**< TRUE to enable interrupt, FALSE to mask it. */
} ioc_fm_pcd_exception_params_t;

/*
 * @Description   A structure for SW parser labels (must be identical to struct
 *		  t_fm_pcd_prs_label_params defined in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_prs_label_params_t {
	uint32_t instruction_offset;
		/**< SW parser label instruction offset (2 bytes resolution),
		 * relative to Parser RAM
		 */
	ioc_net_header_type	hdr;
		/**< The existence of this header will invoke the SW parser
		 * code.
		 */
	uint8_t	index_per_hdr;
		/**< Normally 0, if more than one SW parser attachments for the
		 * same header, use this index to distinguish between them.
		 */
} ioc_fm_pcd_prs_label_params_t;

/*
 * @Description   A structure for SW parser (Must match struct
 *		  ioc_fm_pcd_prs_sw_params_t defined in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_prs_sw_params_t {
	bool		override;
			/**< FALSE to invoke a check that nothing else was
			 * loaded to this address, including internal patches.
			 * TRUE to override any existing code.
			 */
	uint32_t	size;		/**< SW parser code size */
	uint16_t	base;
			/**< SW parser base (in instruction counts! must be
			 * larger than 0x20)
			 */
	uint8_t		*p_code;	/**< SW parser code */
	uint32_t	sw_prs_data_params[IOC_FM_PCD_PRS_NUM_OF_HDRS];
					/**< SW parser data (parameters) */
	uint8_t		num_of_labels;	/**< Number of labels for SW parser. */
	ioc_fm_pcd_prs_label_params_t
			labels_table[IOC_FM_PCD_PRS_NUM_OF_LABELS];
			/**< SW parser labels table, containing num_of_labels
			 * entries
			 */
} ioc_fm_pcd_prs_sw_params_t;

/*
 * @Description   A structure to set the a KeyGen default value
 */
typedef struct ioc_fm_pcd_kg_dflt_value_params_t {
	uint8_t		value_id;/**< 0,1 - one of 2 global default values */
	uint32_t	value;	/**< The requested default value */
} ioc_fm_pcd_kg_dflt_value_params_t;

/*
 * @Function	  fm_pcd_enable
 *
 * @Description   This routine should be called after PCD is initialized for
 *		  enabling all PCD engines according to their existing
 *		  configuration.
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only when PCD is disabled.
 */
#define FM_PCD_IOC_ENABLE  _IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(1))

/*
 * @Function	  fm_pcd_disable
 *
 * @Description   This routine may be called when PCD is enabled in order to
 *		  disable all PCD engines. It may be called only when none of
 *		  the ports in the system are using the PCD.
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only when PCD is enabled.
 */
#define FM_PCD_IOC_DISABLE  _IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(2))

/*
 * @Function	  fm_pcd_prs_load_sw
 *
 * @Description   This routine may be called only when all ports in the
 *		  system are actively using the classification plan scheme.
 *		  In such cases it is recommended in order to save resources.
 *		  The driver automatically saves 8 classification plans for
 *		  ports that do NOT use the classification plan mechanism, to
 *		  avoid this (in order to save those entries) this routine may
 *		  be called.
 *
 * @Param[in]	  ioc_fm_pcd_prs_sw_params_t
 *		  A pointer to the image of the software parser code.
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only when PCD is disabled.
 */
#define FM_PCD_IOC_PRS_LOAD_SW \
	_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(3), ioc_fm_pcd_prs_sw_params_t)

/*
 * @Function	  fm_pcd_kg_set_dflt_value
 *
 * @Description   Calling this routine sets a global default value to be used
 *		  by the KeyGen when parser does not recognize a required
 *		  field/header.
 *		  default value is 0.
 *
 * @Param[in]	  ioc_fm_pcd_kg_dflt_value_params_t	A pointer to a structure
 *							with the relevant
 *							parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only when PCD is disabled.
 */
#define FM_PCD_IOC_KG_SET_DFLT_VALUE \
	_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(6), \
	     ioc_fm_pcd_kg_dflt_value_params_t)

/*
 * @Function	  fm_pcd_kg_set_additional_data_after_parsing
 *
 * @Description   Calling this routine allows the keygen to access data past
 *		  the parser finishing point.
 *
 * @Param[in]	  uint8_t	payload-offset; the number of bytes beyond the
 *				parser location.
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only when PCD is disabled.
 */
#define FM_PCD_IOC_KG_SET_ADDITIONAL_DATA_AFTER_PARSING \
	_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(7), uint8_t)

/*
 * @Function	  fm_pcd_set_exception
 *
 * @Description   Calling this routine enables/disables PCD interrupts.
 *
 * @Param[in]	  ioc_fm_pcd_exception_params_t
 *		  Arguments struct with exception to be enabled/disabled.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_SET_EXCEPTION \
	_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(8), ioc_fm_pcd_exception_params_t)

/*
 * @Function	  fm_pcd_get_counter
 *
 * @Description   Reads one of the FM PCD counters.
 *
 * @Param[in,out] ioc_fm_pcd_counters_params_t The requested counter parameters.
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  It is user's responsibility to call this routine only
 *		  for enabled counters, and there will be no indication if a
 *		  disabled counter is accessed.
 */
#define FM_PCD_IOC_GET_COUNTER \
	_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(9), ioc_fm_pcd_counters_params_t)

/*
 * @Function	  fm_pcd_kg_scheme_get_counter
 *
 * @Description   Reads scheme packet counter.
 *
 * @Param[in]	  h_scheme	scheme handle as returned by
 *				fm_pcd_kg_scheme_set().
 *
 * @Return	  Counter's current value.
 *
 * @Cautions	  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().
 */
#define FM_PCD_IOC_KG_SCHEME_GET_CNTR \
	_IOR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(4), ioc_fm_pcd_kg_scheme_spc_t)

/*
 * @Function	  FM_PCD_ForceIntr
 *
 * @Description   Causes an interrupt event on the requested source.
 *
 * @Param[in]	  ioc_fm_pcd_exceptions - An exception to be forced.
 *
 * @Return	  0 on success; error code if the exception is not enabled,
 *		  or is not able to create interrupt.
 */
#define FM_PCD_IOC_FORCE_INTR \
	_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(11), ioc_fm_pcd_exceptions)

/*
 * @Collection	Definitions of coarse classification parameters as required by
 *		KeyGen (when coarse classification is the next engine after this
 *		scheme).
 */
#define IOC_FM_PCD_MAX_NUM_OF_CC_TREES		8
#define IOC_FM_PCD_MAX_NUM_OF_CC_GROUPS		16
#define IOC_FM_PCD_MAX_NUM_OF_CC_UNITS		4
#define IOC_FM_PCD_MAX_NUM_OF_KEYS		256
#define IOC_FM_PCD_MAX_NUM_OF_FLOWS		(4 * KILOBYTE)
#define IOC_FM_PCD_MAX_SIZE_OF_KEY		56
#define IOC_FM_PCD_MAX_CC_ENTRY_IN_GRP		16
#define IOC_FM_PCD_LAST_KEY_INDEX		0xffff
#define IOC_FM_PCD_MANIP_DSCP_VALUES		64
/* @} */

/*
 * @Collection	A set of definitions to allow protocol
 *		special option description.
 */
typedef uint32_t		ioc_protocol_opt_t;
		/**< A general type to define a protocol option. */

typedef ioc_protocol_opt_t  ioc_eth_protocol_opt_t;
			/**< Ethernet protocol options. */
#define IOC_ETH_BROADCAST		0x80000000   /**< Ethernet Broadcast. */
#define IOC_ETH_MULTICAST		0x40000000   /**< Ethernet Multicast. */

typedef ioc_protocol_opt_t  ioc_vlan_protocol_opt_t;
				/**< Vlan protocol options. */
#define IOC_VLAN_STACKED		0x20000000   /**< Stacked VLAN. */

typedef ioc_protocol_opt_t  ioc_mpls_protocol_opt_t;
				/**< MPLS protocol options. */
#define IOC_MPLS_STACKED		0x10000000   /**< Stacked MPLS. */

typedef ioc_protocol_opt_t  ioc_ipv4_protocol_opt_t;
			/**< IPv4 protocol options. */
#define IOC_IPV4_BROADCAST_1		0x08000000   /**< IPv4 Broadcast. */
#define IOC_IPV4_MULTICAST_1		0x04000000   /**< IPv4 Multicast. */
#define IOC_IPV4_UNICAST_2		0x02000000
					/**< Tunneled IPv4 - Unicast.
					 */
#define IOC_IPV4_MULTICAST_BROADCAST_2  0x01000000
					/**< Tunneled IPv4 -
					 * Broadcast/Multicast.
					 */

#define IOC_IPV4_FRAG_1		0x00000008
				/**< IPV4 reassembly option. IPV4
				 * Reassembly manipulation requires network
				 * environment with IPV4 header and IPV4_FRAG_1
				 * option
				 */

typedef ioc_protocol_opt_t  ioc_ipv6_protocol_opt_t;
					/**< IPv6 protocol options. */
#define IOC_IPV6_MULTICAST_1		0x00800000   /**< IPv6 Multicast. */
#define IOC_IPV6_UNICAST_2		0x00400000
					/**< Tunneled IPv6 - Unicast. */
#define IOC_IPV6_MULTICAST_2		0x00200000
					/**< Tunneled IPv6 - Multicast. */

#define IOC_IPV6_FRAG_1		0x00000004
				/**< IPV6 reassembly option. IPV6 Reassembly
				 * manipulation requires network environment
				 * with IPV6 header and IPV6_FRAG_1 option
				 */
typedef ioc_protocol_opt_t   ioc_capwap_protocol_opt_t;
					/**< CAPWAP protocol options. */
#define CAPWAP_FRAG_1		0x00000008
				/**< CAPWAP reassembly option. CAPWAP Reassembly
				 * manipulation requires network environment
				 * with CAPWAP header and CAPWAP_FRAG_1 option;
				 * in case where fragment found, the
				 * fragment-extension offset may be found at
				 * 'shim2' (in parser-result).
				 */

/* @} */

#define IOC_FM_PCD_MANIP_MAX_HDR_SIZE		256
#define IOC_FM_PCD_MANIP_DSCP_TO_VLAN_TRANS	64
/**
 * @Collection	A set of definitions to support Header Manipulation selection.
 */
typedef uint32_t			ioc_hdr_manip_flags_t;
	/**< A general type to define a HMan update command flags. */

typedef ioc_hdr_manip_flags_t	ioc_ipv4_hdr_manip_update_flags_t;
	/**< IPv4 protocol HMan update command flags. */

#define IOC_HDR_MANIP_IPV4_TOS	0x80000000
			/**< update TOS with the given value ('tos' field of
			 * ioc_fm_pcd_manip_hdr_field_update_ipv4_t)
			 */
#define IOC_HDR_MANIP_IPV4_ID	0x40000000
			/**< update IP ID with the given value ('id' field of
			 * ioc_fm_pcd_manip_hdr_field_update_ipv4_t)
			 */
#define IOC_HDR_MANIP_IPV4_TTL	0x20000000	/**< Decrement TTL by 1 */
#define IOC_HDR_MANIP_IPV4_SRC	0x10000000
		/**< update IP source address with the given value ('src' field
		 * of ioc_fm_pcd_manip_hdr_field_update_ipv4_t)
		 */
#define IOC_HDR_MANIP_IPV4_DST	0x08000000
		/**< update IP destination address with the given value
		 * ('dst' field of ioc_fm_pcd_manip_hdr_field_update_ipv4_t)
		 */

typedef ioc_hdr_manip_flags_t	ioc_ipv6_hdr_manip_update_flags_t;
			/**< IPv6 protocol HMan update command flags. */

#define IOC_HDR_MANIP_IPV6_TC	0x80000000
	/**< update Traffic Class address with the given value ('traffic_class'
	 * field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t)
	 */
#define IOC_HDR_MANIP_IPV6_HL	0x40000000	/**< Decrement Hop Limit by 1 */
#define IOC_HDR_MANIP_IPV6_SRC	0x20000000
		/**< update IP source address with the given value ('src' field
		 * of ioc_fm_pcd_manip_hdr_field_update_ipv6_t)
		 */
#define IOC_HDR_MANIP_IPV6_DST	0x10000000
		/**< update IP destination address with the given value ('dst'
		 * field of ioc_fm_pcd_manip_hdr_field_update_ipv6_t)
		 */

typedef ioc_hdr_manip_flags_t	ioc_tcp_udp_hdr_manip_update_flags_t;
		/**< TCP/UDP protocol HMan update command flags. */

#define IOC_HDR_MANIP_TCP_UDP_SRC	0x80000000
		/**< update TCP/UDP source address with the given value
		 * ('src' field of ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t)
		 */
#define IOC_HDR_MANIP_TCP_UDP_DST	0x40000000
		/**< update TCP/UDP destination address with the given value
		 * ('dst' field of ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t)
		 */
#define IOC_HDR_MANIP_TCP_UDP_CHECKSUM  0x20000000
		/**< update TCP/UDP checksum */

/* @} */

/*
 * @Description   A type used for returning the order of the key extraction.
 *		  each value in this array represents the index of the
 *		  extraction command as defined by the user in the
 *		  initialization extraction array. The valid size of this array
 *		  is the user define number of extractions required (also
 *		  marked by the second '0' in this array).
 */
typedef	uint8_t
	ioc_fm_pcd_kg_key_order_t [IOC_FM_PCD_KG_MAX_EXTRACTS_PER_KEY];

/*
 *@Description   All PCD engines
 *		(must match enum e_FmPcdEngine defined in fm_pcd_ext.h)
 */

typedef enum ioc_fm_pcd_engine {
	e_IOC_FM_PCD_INVALID = 0,   /**< Invalid PCD engine */
	e_IOC_FM_PCD_DONE,	/**< No PCD Engine indicated */
	e_IOC_FM_PCD_KG,		/**< KeyGen */
	e_IOC_FM_PCD_CC,		/**< Coarse Classifier */
	e_IOC_FM_PCD_PLCR,	/**< Policer */
	e_IOC_FM_PCD_PRS,	/**< Parser */
	e_IOC_FM_PCD_FR,	/**< Frame Replicator */
	e_IOC_FM_PCD_HASH	/**< Hash Table */
} ioc_fm_pcd_engine;

/*
 * @Description   An enum for selecting extraction by header types
 *		  (Must match enum e_FmPcdExtractByHdrType defined in
 *		  fm_pcd_ext.h)
 */
typedef enum ioc_fm_pcd_extract_by_hdr_type {
	e_IOC_FM_PCD_EXTRACT_FROM_HDR,	/**< Extract bytes from header */
	e_IOC_FM_PCD_EXTRACT_FROM_FIELD,/**< Extract bytes from header field */
	e_IOC_FM_PCD_EXTRACT_FULL_FIELD	/**< Extract a full field */
} ioc_fm_pcd_extract_by_hdr_type;

/*
 * @Description   An enum for selecting extraction source (when it is not the
 *		  header) (Must match enum e_FmPcdExtractFrom defined in
 *		  fm_pcd_ext.h)
 */
typedef enum ioc_fm_pcd_extract_from {
	e_IOC_FM_PCD_EXTRACT_FROM_FRAME_START,
			/**< KG & CC: Extract from beginning of frame */
	e_IOC_FM_PCD_EXTRACT_FROM_DFLT_VALUE,
				/**< KG only: Extract from a default value */
	e_IOC_FM_PCD_EXTRACT_FROM_CURR_END_OF_PARSE,
			/**< KG only: Extract from the point where parsing had
			 * finished
			 */
	e_IOC_FM_PCD_EXTRACT_FROM_KEY,	/**< CC only: Field where saved KEY */
	e_IOC_FM_PCD_EXTRACT_FROM_HASH,	/**< CC only: Field where saved HASH */
	e_IOC_FM_PCD_EXTRACT_FROM_PARSE_RESULT,
				/**< KG & CC: Extract from the parser result */
	e_IOC_FM_PCD_EXTRACT_FROM_ENQ_FQID,
				/**< KG & CC: Extract from enqueue FQID */
	e_IOC_FM_PCD_EXTRACT_FROM_FLOW_ID
				/**< CC only: Field where saved Dequeue FQID */
} ioc_fm_pcd_extract_from;

/*
 * @Description   An enum for selecting extraction type
 */
typedef enum ioc_fm_pcd_extract_type {
	e_IOC_FM_PCD_EXTRACT_BY_HDR,	/**< Extract according to header */
	e_IOC_FM_PCD_EXTRACT_NON_HDR,
		/**< Extract from data that is not the header */
	e_IOC_FM_PCD_KG_EXTRACT_PORT_PRIVATE_INFO
			/**< Extract private info as specified by user */
} ioc_fm_pcd_extract_type;

/*
 * @Description   An enum for selecting a default
 */
typedef enum ioc_fm_pcd_kg_extract_dflt_select {
	e_IOC_FM_PCD_KG_DFLT_GBL_0,
		/**< Default selection is KG register 0 */
	e_IOC_FM_PCD_KG_DFLT_GBL_1,
		/**< Default selection is KG register 1 */
	e_IOC_FM_PCD_KG_DFLT_PRIVATE_0,
		/**< Default selection is a per scheme register 0 */
	e_IOC_FM_PCD_KG_DFLT_PRIVATE_1,
		/**< Default selection is a per scheme register 1 */
	e_IOC_FM_PCD_KG_DFLT_ILLEGAL	/**< Illegal selection */
} ioc_fm_pcd_kg_extract_dflt_select;

/*
 * @Description   Enumeration type defining all default groups - each group
 *		  shares a default value, one of four user-initialized values.
 */
typedef enum ioc_fm_pcd_kg_known_fields_dflt_types {
	e_IOC_FM_PCD_KG_MAC_ADDR,		/**< MAC Address */
	e_IOC_FM_PCD_KG_TCI,			/**< TCI field */
	e_IOC_FM_PCD_KG_ENET_TYPE,		/**< ENET Type */
	e_IOC_FM_PCD_KG_PPP_SESSION_ID,		/**< PPP Session id */
	e_IOC_FM_PCD_KG_PPP_PROTOCOL_ID,	/**< PPP Protocol id */
	e_IOC_FM_PCD_KG_MPLS_LABEL,		/**< MPLS label */
	e_IOC_FM_PCD_KG_IP_ADDR,		/**< IP addr */
	e_IOC_FM_PCD_KG_PROTOCOL_TYPE,		/**< Protocol type */
	e_IOC_FM_PCD_KG_IP_TOS_TC,		/**< TOS or TC */
	e_IOC_FM_PCD_KG_IPV6_FLOW_LABEL,	/**< IPV6 flow label */
	e_IOC_FM_PCD_KG_IPSEC_SPI,		/**< IPSEC SPI */
	e_IOC_FM_PCD_KG_L4_PORT,		/**< L4 Port */
	e_IOC_FM_PCD_KG_TCP_FLAG,		/**< TCP Flag */
	e_IOC_FM_PCD_KG_GENERIC_FROM_DATA,
		/**< grouping implemented by SW, any data extraction that is not
		 * the full field described above
		 */
	e_IOC_FM_PCD_KG_GENERIC_FROM_DATA_NO_V,
		/**< grouping implemented by SW, any data extraction without
		 * validation
		 */
	e_IOC_FM_PCD_KG_GENERIC_NOT_FROM_DATA
		/**< grouping implemented by SW, extraction from parser result
		 * or direct use of default value
		 */
} ioc_fm_pcd_kg_known_fields_dflt_types;

/*
 * @Description   Enumeration type for defining header index for scenarios with
 *		  multiple (tunneled) headers
 */
typedef enum ioc_fm_pcd_hdr_index {
	e_IOC_FM_PCD_HDR_INDEX_NONE	=   0,
				/**< used when multiple headers not used, also
				 * to specify regular IP (not tunneled).
				 */
	e_IOC_FM_PCD_HDR_INDEX_1,/**< may be used for VLAN, MPLS, tunneled IP */
	e_IOC_FM_PCD_HDR_INDEX_2,/**< may be used for MPLS, tunneled IP */
	e_IOC_FM_PCD_HDR_INDEX_3,/**< may be used for MPLS */
	e_IOC_FM_PCD_HDR_INDEX_LAST =   0xFF /**< may be used for VLAN, MPLS */
} ioc_fm_pcd_hdr_index;

/*
 * @Description   Enumeration type for selecting the policer profile functional
 *		  type
 */
typedef enum ioc_fm_pcd_profile_type_selection {
	e_IOC_FM_PCD_PLCR_PORT_PRIVATE,		/**< Port dedicated profile */
	e_IOC_FM_PCD_PLCR_SHARED
			/**< Shared profile (shared within partition) */
} ioc_fm_pcd_profile_type_selection;

/*
 * @Description   Enumeration type for selecting the policer profile algorithm
 */
typedef enum ioc_fm_pcd_plcr_algorithm_selection {
	e_IOC_FM_PCD_PLCR_PASS_THROUGH, /**< Policer pass through */
	e_IOC_FM_PCD_PLCR_RFC_2698,	/**< Policer algorithm RFC 2698 */
	e_IOC_FM_PCD_PLCR_RFC_4115	/**< Policer algorithm RFC 4115 */
} ioc_fm_pcd_plcr_algorithm_selection;

/*
 * @Description   Enumeration type for selecting a policer profile color mode
 */
typedef enum ioc_fm_pcd_plcr_color_mode {
	e_IOC_FM_PCD_PLCR_COLOR_BLIND,  /**< Color blind */
	e_IOC_FM_PCD_PLCR_COLOR_AWARE   /**< Color aware */
} ioc_fm_pcd_plcr_color_mode;

/*
 * @Description   Enumeration type for selecting a policer profile color
 */
typedef enum ioc_fm_pcd_plcr_color {
	e_IOC_FM_PCD_PLCR_GREEN,	/**< Green */
	e_IOC_FM_PCD_PLCR_YELLOW,	/**< Yellow */
	e_IOC_FM_PCD_PLCR_RED,		/**< Red */
	e_IOC_FM_PCD_PLCR_OVERRIDE	/**< Color override */
} ioc_fm_pcd_plcr_color;

/*
 * @Description   Enumeration type for selecting the policer profile packet
 *		  frame length selector
 */
typedef enum ioc_fm_pcd_plcr_frame_length_select {
	e_IOC_FM_PCD_PLCR_L2_FRM_LEN,	/**< L2 frame length */
	e_IOC_FM_PCD_PLCR_L3_FRM_LEN,	/**< L3 frame length */
	e_IOC_FM_PCD_PLCR_L4_FRM_LEN,	/**< L4 frame length */
	e_IOC_FM_PCD_PLCR_FULL_FRM_LEN	/**< Full frame length */
} ioc_fm_pcd_plcr_frame_length_select;

/*
 * @Description   Enumeration type for selecting roll-back frame
 */
typedef enum ioc_fm_pcd_plcr_roll_back_frame_select {
	e_IOC_FM_PCD_PLCR_ROLLBACK_L2_FRM_LEN,	/**< Rollback L2 frame length */
	e_IOC_FM_PCD_PLCR_ROLLBACK_FULL_FRM_LEN
				/**< Rollback Full frame length */
} ioc_fm_pcd_plcr_roll_back_frame_select;

/*
 * @Description   Enumeration type for selecting the policer profile packet or
 *		  byte mode
 */
typedef enum ioc_fm_pcd_plcr_rate_mode {
	e_IOC_FM_PCD_PLCR_BYTE_MODE,	/**< Byte mode */
	e_IOC_FM_PCD_PLCR_PACKET_MODE   /**< Packet mode */
} ioc_fm_pcd_plcr_rate_mode;

/*
 * @Description   Enumeration type for defining action of frame
 */
typedef enum ioc_fm_pcd_done_action {
	e_IOC_FM_PCD_ENQ_FRAME = 0,	/**< Enqueue frame */
	e_IOC_FM_PCD_DROP_FRAME	/**< Drop frame */
} ioc_fm_pcd_done_action;

/*
 * @Description   Enumeration type for selecting the policer counter
 */
typedef enum ioc_fm_pcd_plcr_profile_counters {
	e_IOC_FM_PCD_PLCR_PROFILE_GREEN_PACKET_TOTAL_COUNTER,
					/**< Green packets counter */
	e_IOC_FM_PCD_PLCR_PROFILE_YELLOW_PACKET_TOTAL_COUNTER,
					/**< Yellow packets counter */
	e_IOC_FM_PCD_PLCR_PROFILE_RED_PACKET_TOTAL_COUNTER,
					/**< Red packets counter */
	e_IOC_FM_PCD_PLCR_PROFILE_RECOLOURED_YELLOW_PACKET_TOTAL_COUNTER,
					/**< Recolored yellow packets counter */
	e_IOC_FM_PCD_PLCR_PROFILE_RECOLOURED_RED_PACKET_TOTAL_COUNTER
					/**< Recolored red packets counter */
} ioc_fm_pcd_plcr_profile_counters;

/*
 * @Description   Enumeration type for selecting the PCD action after extraction
 */
typedef enum ioc_fm_pcd_action {
	e_IOC_FM_PCD_ACTION_NONE,		/**< NONE  */
	e_IOC_FM_PCD_ACTION_EXACT_MATCH,
		/**< Exact match on the selected extraction */
	e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP
		/**< Indexed lookup on the selected extraction */
} ioc_fm_pcd_action;

/*
 * @Description   Enumeration type for selecting type of insert manipulation
 */
typedef enum ioc_fm_pcd_manip_hdr_insrt_type {
	e_IOC_FM_PCD_MANIP_INSRT_GENERIC,
		/**< Insert according to offset & size */
	e_IOC_FM_PCD_MANIP_INSRT_BY_HDR,
		/**< Insert according to protocol */
} ioc_fm_pcd_manip_hdr_insrt_type;

/*
 * @Description   Enumeration type for selecting type of remove manipulation
 */
typedef enum ioc_fm_pcd_manip_hdr_rmv_type {
	e_IOC_FM_PCD_MANIP_RMV_GENERIC,
		/**< Remove according to offset & size */
	e_IOC_FM_PCD_MANIP_RMV_BY_HDR
		/**< Remove according to offset & size */
} ioc_fm_pcd_manip_hdr_rmv_type;

/*
 * @Description   An enum for selecting specific L2 fields removal
 */
typedef enum ioc_fm_pcd_manip_hdr_rmv_specific_l2 {
	e_IOC_FM_PCD_MANIP_HDR_RMV_ETHERNET,	/**< Ethernet/802.3 MAC */
	e_IOC_FM_PCD_MANIP_HDR_RMV_STACKED_QTAGS,	/**< stacked QTags */
	e_IOC_FM_PCD_MANIP_HDR_RMV_ETHERNET_AND_MPLS,
			/**< MPLS and Ethernet/802.3 MAC header unitl the header
			 * which follows the MPLS header
			 */
	e_IOC_FM_PCD_MANIP_HDR_RMV_MPLS
			/**< Remove MPLS header (Unlimited MPLS labels) */
} ioc_fm_pcd_manip_hdr_rmv_specific_l2;

/*
 * @Description   Enumeration type for selecting specific fields updates
 */
typedef enum ioc_fm_pcd_manip_hdr_field_update_type {
	e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN,	/**< VLAN updates */
	e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4,	/**< IPV4 updates */
	e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6,	/**< IPV6 updates */
	e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP,	/**< TCP_UDP updates */
} ioc_fm_pcd_manip_hdr_field_update_type;

/*
 * @Description   Enumeration type for selecting VLAN updates
 */
typedef enum ioc_fm_pcd_manip_hdr_field_update_vlan {
	e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_VPRI,
				/**< Replace VPri of outer most VLAN tag. */
	e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN
				/**< DSCP to VLAN priority bits translation */
} ioc_fm_pcd_manip_hdr_field_update_vlan;

/*
 * @Description   Enumeration type for selecting specific L2 fields removal
 */
typedef enum ioc_fm_pcd_manip_hdr_insrt_specific_l2 {
	e_IOC_FM_PCD_MANIP_HDR_INSRT_MPLS
		/**< Insert MPLS header (Unlimited MPLS labels) */
} ioc_fm_pcd_manip_hdr_insrt_specific_l2;

/*
 * @Description   Enumeration type for selecting QoS mapping mode
 *
 *		  Note: In all cases except
 *		  'e_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE' User should instruct the
 *		  port to read the parser-result
 */
typedef enum ioc_fm_pcd_manip_hdr_qos_mapping_mode {
	e_IOC_FM_PCD_MANIP_HDR_QOS_MAPPING_NONE = 0,
			/**< No mapping, QoS field will not be changed */
	e_IOC_FM_PCD_MANIP_HDR_QOS_MAPPING_AS_IS,
			/**< QoS field will be overwritten by the last byte in
			 * the parser-result.
			 */
} ioc_fm_pcd_manip_hdr_qos_mapping_mode;

/*
 * @Description   Enumeration type for selecting QoS source
 *
 *		  Note: In all cases except 'e_FM_PCD_MANIP_HDR_QOS_SRC_NONE'
 *		  User should left room for the parser-result on input/output
 *		  buffer and instruct the port to read/write the parser-result
 *		  to the buffer (RPD should be set)
 */
typedef enum ioc_fm_pcd_manip_hdr_qos_src {
	e_IOC_FM_PCD_MANIP_HDR_QOS_SRC_NONE = 0,
			/**< TODO */
	e_IOC_FM_PCD_MANIP_HDR_QOS_SRC_USER_DEFINED,
			/**< QoS will be taken from the last byte in the
			 * parser-result.
			 */
} ioc_fm_pcd_manip_hdr_qos_src;

/*
 * @Description   Enumeration type for selecting type of header insertion
 */
typedef enum ioc_fm_pcd_manip_hdr_insrt_by_hdr_type {
	e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2,
			/**< Specific L2 fields insertion */
	e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_IP,		/**< IP insertion */
	e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_UDP,		/**< UDP insertion */
	e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE,
			/**< UDP lite insertion */
	e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP		/**< CAPWAP insertion */
} ioc_fm_pcd_manip_hdr_insrt_by_hdr_type;

/*
 * @Description   Enumeration type for selecting specific custom command
 */
typedef enum ioc_fm_pcd_manip_hdr_custom_type {
	e_IOC_FM_PCD_MANIP_HDR_CUSTOM_IP_REPLACE,
			/**< Replace IPv4/IPv6 */
	e_IOC_FM_PCD_MANIP_HDR_CUSTOM_GEN_FIELD_REPLACE,
} ioc_fm_pcd_manip_hdr_custom_type;

/*
 * @Description   Enumeration type for selecting specific custom command
 */
typedef enum ioc_fm_pcd_manip_hdr_custom_ip_replace {
	e_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV4_BY_IPV6,
					/**< Replace IPv4 by IPv6 */
	e_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4
					/**< Replace IPv6 by IPv4 */
} ioc_fm_pcd_manip_hdr_custom_ip_replace;

/*
 * @Description   Enumeration type for selecting type of header removal
 */
typedef enum ioc_fm_pcd_manip_hdr_rmv_by_hdr_type {
	e_IOC_FM_PCD_MANIP_RMV_BY_HDR_SPECIFIC_L2 = 0,
			/**< Specific L2 fields removal */
	e_IOC_FM_PCD_MANIP_RMV_BY_HDR_CAPWAP,	/**< CAPWAP removal */
	e_IOC_FM_PCD_MANIP_RMV_BY_HDR_FROM_START,
				/**< Locate from data that is not the header */
} ioc_fm_pcd_manip_hdr_rmv_by_hdr_type;

/*
 * @Description   Enumeration type for selecting type of timeout mode
 */
typedef enum ioc_fm_pcd_manip_reassem_time_out_mode {
	e_IOC_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAMES,
					/**< Limits the time of the reassembly
					 * process from the first fragment to
					 * the last
					 */
	e_IOC_FM_PCD_MANIP_TIME_OUT_BETWEEN_FRAG
					/**< Limits the time of receiving the
					 * fragment
					 */
} ioc_fm_pcd_manip_reassem_time_out_mode;

/*
 * @Description   Enumeration type for selecting type of WaysNumber mode
 */
typedef enum ioc_fm_pcd_manip_reassem_ways_number {
	e_IOC_FM_PCD_MANIP_ONE_WAY_HASH = 1,	/**< One way hash    */
	e_IOC_FM_PCD_MANIP_TWO_WAYS_HASH,	/**< Two ways hash   */
	e_IOC_FM_PCD_MANIP_THREE_WAYS_HASH,	/**< Three ways hash */
	e_IOC_FM_PCD_MANIP_FOUR_WAYS_HASH,	/**< Four ways hash  */
	e_IOC_FM_PCD_MANIP_FIVE_WAYS_HASH,	/**< Five ways hash  */
	e_IOC_FM_PCD_MANIP_SIX_WAYS_HASH,	/**< Six ways hash   */
	e_IOC_FM_PCD_MANIP_SEVEN_WAYS_HASH,	/**< Seven ways hash */
	e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH	/**< Eight ways hash */
} ioc_fm_pcd_manip_reassem_ways_number;

/*
 * @Description   Enumeration type for selecting manipulation type
 */
typedef enum ioc_fm_pcd_manip_type {
	e_IOC_FM_PCD_MANIP_HDR = 0,		/**< Header manipulation */
	e_IOC_FM_PCD_MANIP_REASSEM,		/**< Reassembly */
	e_IOC_FM_PCD_MANIP_FRAG,		/**< Fragmentation */
	e_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD	/**< Special Offloading */
} ioc_fm_pcd_manip_type;

/*
 * @Description   Enumeration type for selecting type of statistics mode
 */
typedef enum ioc_fm_pcd_cc_stats_mode {
	e_IOC_FM_PCD_CC_STATS_MODE_NONE = 0,	/**< No statistics support */
	e_IOC_FM_PCD_CC_STATS_MODE_FRAME,	/**< Frame count statistics */
	e_IOC_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME,
			/**< Byte and frame count statistics */
	e_IOC_FM_PCD_CC_STATS_MODE_RMON,
			/**< Byte and frame length range count statistics */
} ioc_fm_pcd_cc_stats_mode;

/*
 * @Description   Enumeration type for determining the action in case an IP
 *		  packet is larger than MTU but its DF (Don't Fragment) bit is
 *		  set.
 */
typedef enum ioc_fm_pcd_manip_donot_frag_action {
	e_IOC_FM_PCD_MANIP_DISCARD_PACKET = 0,	/**< Discard packet */
	e_IOC_FM_PCD_MANIP_ENQ_TO_ERR_Q_OR_DISCARD_PACKET =
			e_IOC_FM_PCD_MANIP_DISCARD_PACKET,
				/**< Obsolete, cannot enqueue to error queue; In
				 * practice, selects to discard packets; Will be
				 * removed in the future
				 */
	e_IOC_FM_PCD_MANIP_FRAGMENT_PACKECT,
				/**< Fragment packet and continue normal
				 * processing
				 */
	e_IOC_FM_PCD_MANIP_CONTINUE_WITHOUT_FRAG
				/**< Continue normal processing without
				 * fragmenting the packet
				 */
} ioc_fm_pcd_manip_donot_frag_action;

/*
 * @Description   Enumeration type for selecting type of special offload
 *		  manipulation
 */
typedef enum ioc_fm_pcd_manip_special_offload_type {
	e_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC,
					/**< IPSec offload manipulation */
	e_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP
					/**< CAPWAP offload manipulation */
} ioc_fm_pcd_manip_special_offload_type;

/*
 * @Description   A union of protocol dependent special options
 *		  (Must match union u_FmPcdHdrProtocolOpt defined in
 *		  fm_pcd_ext.h)
 */
typedef union ioc_fm_pcd_hdr_protocol_opt_u {
	ioc_eth_protocol_opt_t	eth_opt;	/**< Ethernet options */
	ioc_vlan_protocol_opt_t   vlan_opt;	/**< Vlan options */
	ioc_mpls_protocol_opt_t   mpls_opt;	/**< MPLS options */
	ioc_ipv4_protocol_opt_t   ipv4_opt;	/**< IPv4 options */
	ioc_ipv6_protocol_opt_t   ipv6_opt;	/**< IPv6 options */
	ioc_capwap_protocol_opt_t capwap_opt;  /**< CAPWAP options */
} ioc_fm_pcd_hdr_protocol_opt_u;

/*
 * @Description   A union holding all known protocol fields
 */
typedef union ioc_fm_pcd_fields_u {
	ioc_header_field_eth_t		eth;		/**< Ethernet*/
	ioc_header_field_vlan_t		vlan;		/**< VLAN*/
	ioc_header_field_llc_snap_t	llc_snap;	/**< LLC SNAP*/
	ioc_header_field_pppoe_t		pppoe;	/**< PPPoE*/
	ioc_header_field_mpls_t		mpls;		/**< MPLS*/
	ioc_header_field_ip_t		ip;		/**< IP	*/
	ioc_header_field_ipv4_t		ipv4;		/**< IPv4*/
	ioc_header_field_ipv6_t		ipv6;		/**< IPv6*/
	ioc_header_field_udp_t		udp;		/**< UDP	*/
	ioc_header_field_udp_lite_t	udp_lite;	/**< UDP_Lite*/
	ioc_header_field_tcp_t		tcp;		/**< TCP	*/
	ioc_header_field_sctp_t		sctp;		/**< SCTP*/
	ioc_header_field_dccp_t		dccp;		/**< DCCP*/
	ioc_header_field_gre_t		gre;		/**< GRE	*/
	ioc_header_field_minencap_t	minencap;/**< Minimal Encapsulation  */
	ioc_header_field_ipsec_ah_t	ipsec_ah;	/**< IPSec AH*/
	ioc_header_field_ipsec_esp_t	ipsec_esp;	/**< IPSec ESP*/
	ioc_header_field_udp_encap_esp_t	udp_encap_esp;
						/**< UDP Encapsulation ESP  */
} ioc_fm_pcd_fields_u;

/*
 * @Description   Parameters for defining header extraction for key generation
 */
typedef struct ioc_fm_pcd_from_hdr_t {
	uint8_t		size;	/**< Size in byte */
	uint8_t		offset;	/**< Byte offset */
} ioc_fm_pcd_from_hdr_t;

/*
 * @Description   Parameters for defining field extraction for key generation
 */
typedef struct ioc_fm_pcd_from_field_t {
	ioc_fm_pcd_fields_u field;	/**< Field selection */
	uint8_t		size;	/**< Size in byte */
	uint8_t		offset;	/**< Byte offset */
} ioc_fm_pcd_from_field_t;

/*
 * @Description   Parameters for defining a single network environment unit
 *		  A distinction unit should be defined if it will later be used
 *		  by one or more PCD engines to distinguish between flows.
 *		  (Must match struct t_FmPcdDistinctionUnit defined in
 *		  fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_distinction_unit_t {
	struct {
	ioc_net_header_type	hdr;
				/**< One of the headers supported by the FM */
	ioc_fm_pcd_hdr_protocol_opt_u  opt;	/**< Select only one option! */
	} hdrs[IOC_FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS];
} ioc_fm_pcd_distinction_unit_t;

/*
 * @Description   Parameters for defining all different distinction units
 *		  supported by a specific PCD Network Environment
 *		  Characteristics module.
 *
 *		  Each unit represent a protocol or a group of protocols that
 *		  may be used later by the different PCD engines to distinguish
 *		  between flows.
 *		  (Must match struct t_FmPcdNetEnvParams defined in
 *		  fm_pcd_ext.h)
 */
struct fm_pcd_net_env_params_t {
	uint8_t num_of_distinction_units;
	/**< Number of different units to be identified */
	ioc_fm_pcd_distinction_unit_t
		units[IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];
	/**< An array of num_of_distinction_units of the different units to be
	 * identified
	 */
};

typedef struct ioc_fm_pcd_net_env_params_t {
	struct fm_pcd_net_env_params_t param;
	void				*id;
		/**< Output parameter; Returns the net-env Id to be used */
} ioc_fm_pcd_net_env_params_t;

/*
 * @Description   Parameters for defining a single extraction action when
 *		  creating a key
 */
typedef struct ioc_fm_pcd_extract_entry_t {
	ioc_fm_pcd_extract_type		type;	/**< Extraction type select */
	union {
	struct {
		ioc_net_header_type	hdr;		/**< Header selection */
		bool			ignore_protocol_validation;
					/**< Ignore protocol validation */
		ioc_fm_pcd_hdr_index	hdr_index;
					/**< Relevant only for MPLS, VLAN and
					 * tunneled IP. Otherwise should be
					 * cleared.
					 */
		ioc_fm_pcd_extract_by_hdr_type  type;
					/**< Header extraction type select */
		union {
		ioc_fm_pcd_from_hdr_t	from_hdr;
					/**< Extract bytes from header
					 * parameters
					 */
		ioc_fm_pcd_from_field_t	from_field;
					/**< Extract bytes from field parameters
					 */
		ioc_fm_pcd_fields_u	full_field;
					/**< Extract full field parameters */
		} extract_by_hdr_type;
	} extract_by_hdr;/**< Used when type = e_IOC_FM_PCD_KG_EXTRACT_BY_HDR */
	struct {
		ioc_fm_pcd_extract_from	src;
					/**< Non-header extraction source */
		ioc_fm_pcd_action	action;	/**< Relevant for CC Only */
		uint16_t	ic_indx_mask;
				/**< Relevant only for CC whenaction =
				 * e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP; Note that
				 * the number of bits that are set within this
				 * mask must be log2 of the CC-node
				 * 'num_of_keys'. Note that the mask cannot be
				 * set on the lower bits.
				 */
		uint8_t			offset;	/**< Byte offset */
		uint8_t			size;	/**< Size in bytes */
	} extract_non_hdr;
		/**< Used when type = e_IOC_FM_PCD_KG_EXTRACT_NON_HDR */
	} extract_params;
} ioc_fm_pcd_extract_entry_t;

/*
 * @Description   A structure for defining masks for each extracted
 *		  field in the key.
 */
typedef struct ioc_fm_pcd_kg_extract_mask_t {
	uint8_t		extract_array_index;
				/**< Index in the extraction array, as
				 * initialized by user
				 */
	uint8_t		offset;	/**< Byte offset */
	uint8_t		mask;
			/**< A byte mask (selected bits will be ignored) */
} ioc_fm_pcd_kg_extract_mask_t;

/*
 * @Description   A structure for defining default selection per groups of
 *		  fields
 */
typedef struct ioc_fm_pcd_kg_extract_dflt_t {
	ioc_fm_pcd_kg_known_fields_dflt_types	type;
						/**< Default type select */
	ioc_fm_pcd_kg_extract_dflt_select	dflt_select;
						/**< Default register select */
} ioc_fm_pcd_kg_extract_dflt_t;


/*
 * @Description   A structure for defining all parameters needed for
 *		  generation a key and using a hash function
 */
typedef struct ioc_fm_pcd_kg_key_extract_and_hash_params_t {
	uint32_t			private_dflt0;
					/**< Scheme default register 0 */
	uint32_t			private_dflt1;
					/**< Scheme default register 1 */
	uint8_t				num_of_used_extracts;
					/**< defines the valid size of the
					 * following array
					 */
	ioc_fm_pcd_extract_entry_t
			extract_array[IOC_FM_PCD_KG_MAX_EXTRACTS_PER_KEY];
					/**< An array of extraction definitions.
					 */
	uint8_t				num_of_used_dflts;
					/**< defines the valid size of the
					 * following array
					 */
	ioc_fm_pcd_kg_extract_dflt_t
				dflts[IOC_FM_PCD_KG_NUM_OF_DEFAULT_GROUPS];
					/**< For each extraction used in this
					 * scheme, specify the required default
					 * register to be used when header is
					 * not found. types not specified in
					 * this array will get undefined value.
					 */
	uint8_t				num_of_used_masks;
					/**< Defines the valid size of the
					 * following array
					 */
	ioc_fm_pcd_kg_extract_mask_t
				masks[IOC_FM_PCD_KG_NUM_OF_EXTRACT_MASKS];
	uint8_t				hash_shift;
					/**< Hash result right shift. Selects
					 * the 24 bits out of the 64 hash
					 * result. 0 means using the 24 LSB's,
					 * otherwise use the 24 LSB's after
					 * shifting right.
					 */
	uint32_t			hash_dist_num_of_fqids;
					/**< must be > 1 and a power of 2.
					 * Represents the range of queues for
					 * the key and hash functionality
					 */
	uint8_t				hash_distribution_fqids_shift;
					/**< selects the FQID bits that will be
					 * effected by the hash
					 */
	bool				symmetric_hash;
					/**< TRUE to generate the same hash for
					 * frames with swapped source and
					 * destination fields on all layers; If
					 * TRUE, driver will check that for all
					 * layers, if SRC extraction is
					 * selected, DST extraction must also be
					 * selected, and vice versa.
					 */
} ioc_fm_pcd_kg_key_extract_and_hash_params_t;

/*
 * @Description   A structure of parameters for defining a single Qid mask
 *		  (extracted OR).
 */
typedef struct ioc_fm_pcd_kg_extracted_or_params_t {
	ioc_fm_pcd_extract_type		type;
					/**< Extraction type select */
	union {
	struct {
			/**< used when type = e_IOC_FM_PCD_KG_EXTRACT_BY_HDR */
		ioc_net_header_type		hdr;
		ioc_fm_pcd_hdr_index		hdr_index;
						/**< Relevant only for MPLS,
						 * VLAN and tunneled IP.
						 * Otherwise should be cleared.
						 */
		bool				ignore_protocol_validation;

	} extract_by_hdr;
	ioc_fm_pcd_extract_from		src;
					/**< used when type =
					 * e_IOC_FM_PCD_KG_EXTRACT_NON_HDR
					 */
	} extract_params;
	uint8_t				extraction_offset;
					/**< Offset for extraction */
	ioc_fm_pcd_kg_extract_dflt_select	dflt_value;
					/**< Select register from which
					 * extraction is taken if field not
					 * found
					 */
	uint8_t				mask;
					/**< Mask LSB byte of extraction
					 * (specified bits are ignored)
					 */

	uint8_t			bit_offset_in_fqid;
		/**< 0-31, Selects which bits of the 24 FQID bits to effect
		 * using the extracted byte; Assume byte is placed as the 8
		 * MSB's in a 32 bit word where the lower bits are the FQID; i.e
		 * if bitOffsetInFqid=1 than its LSB will effect the FQID MSB,
		 * if bitOffsetInFqid=24 than the extracted byte will effect the
		 * 8 LSB's of the FQID, if bitOffsetInFqid=31 than the byte's
		 * MSB will effect the FQID's LSB; 0 means - no effect on FQID;
		 * Note that one, and only one of bitOffsetInFqid or
		 * bitOffsetInPlcrProfile must be set (i.e, extracted byte must
		 * effect either FQID or Policer profile).
		 */
	uint8_t			bit_offset_in_plcr_profile;
		/**< 0-15, Selects which bits of the 8 policer profile id bits
		 * to effect using the extracted byte; Assume byte is placed as
		 * the 8 MSB's in a 16 bit word where the lower bits are the
		 * policer profile id; i.e if bitOffsetInPlcrProfile=1 than its
		 * LSB will effect the profile MSB, if bitOffsetInFqid=8 than
		 * the extracted byte will effect the whole policer profile id,
		 * if bitOffsetInFqid=15 than the byte's MSB will effect the
		 * Policer Profile id's LSB; 0 means - no effect on policer
		 * profile; Note that one, and only one of bitOffsetInFqid or
		 * bitOffsetInPlcrProfile must be set (i.e, extracted byte must
		 * effect either FQID or Policer profile).
		 */
} ioc_fm_pcd_kg_extracted_or_params_t;

/*
 * @Description   A structure for configuring scheme counter
 */
typedef struct ioc_fm_pcd_kg_scheme_counter_t {
	bool		update;
			/**< FALSE to keep the current counter state and
			 * continue from that point, TRUE to update/reset the
			 * counter when the scheme is written.
			 */
	uint32_t	value;
			/**< If update=TRUE, this value will be written into the
			 * counter; clear this field to reset the counter.
			 */
} ioc_fm_pcd_kg_scheme_counter_t;


/*
 * @Description   A structure for retrieving FMKG_SE_SPC
 */
typedef struct ioc_fm_pcd_kg_scheme_spc_t {
	uint32_t	val;	/**< return value */
	void	*id;		/**< scheme handle */
} ioc_fm_pcd_kg_scheme_spc_t;

/*
 * @Description   A structure for defining policer profile parameters as
 *		  required by keygen (when policer is the next engine after this
 *		  scheme).
 *		  (Must match struct t_FmPcdKgPlcrProfile defined in
 *		  fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_kg_plcr_profile_t {
	bool		shared_profile;
			/**< TRUE if this profile is shared between ports (i.e.
			 * managed by primary partition) May not be TRUE if
			 * profile is after Coarse Classification
			 */
	bool		direct;
			/**< If TRUE, direct_relative_profile_id only selects
			 * the profile id, if FALSE
			 * fqid_offset_relative_profile_id_base is used together
			 * with fqid_offset_shift and num_of_profiles
			 * parameters, to define a range of profiles from which
			 * the KeyGen result will determine the destination
			 * policer profile.
			 */
	union {
	uint16_t	direct_relative_profile_id;
			/**< Used if 'direct' is TRUE, to select policer
			 * profile. This parameter should indicate the policer
			 * profile offset within the port's policer profiles or
			 * SHARED window.
			 */
	struct {
		uint8_t	fqid_offset_shift;
			/**< Shift of KG results without the qid base */
		uint8_t	fqid_offset_relative_profile_id_base;
			/**< OR of KG results without the qid base This
			 * parameter should indicate the policer profile offset
			 * within the port's policer profiles window or SHARED
			 * window depends on shared_profile
			 */
		uint8_t	num_of_profiles;
			/**< Range of profiles starting at base */
	} indirect_profile;		/**< Indirect profile parameters */
	} profile_select;
			/**< Direct/indirect profile selection and parameters */
} ioc_fm_pcd_kg_plcr_profile_t;

/*
 * @Description   Parameters for configuring a storage profile for a KeyGen
 *		  scheme.
 */
typedef struct ioc_fm_pcd_kg_storage_profile_t {
	bool	direct;
		/**< If TRUE, directRelativeProfileId only selects the profile
		 * id; If FALSE, fqidOffsetRelativeProfileIdBase is used
		 * together with fqidOffsetShift and num_of_profiles parameters
		 * to define a range of profiles from which the KeyGen result
		 * will determine the destination storage profile.
		 */
	union {
		uint16_t	direct_relative_profile_id;
		/**< Used when 'direct' is TRUE, to select a storage profile;
		 * should indicate the storage profile offset within the port's
		 * storage profiles window.
		 */
		struct {
			uint8_t	fqid_offset_shift;
			/**< Shift of KeyGen results without the FQID base */
			uint8_t	fqid_offset_relative_profile_id_base;
			/**< OR of KeyGen results without the FQID base; should
			 * indicate the policer profile offset within the port's
			 * storage profiles window.
			 */
			uint8_t	num_of_profiles;
			/**< Range of profiles starting at base. */
		} indirect_profile;
		/**< Indirect profile parameters. */
	} profile_select;
	/**< Direct/indirect profile selection and parameters. */
} ioc_fm_pcd_kg_storage_profile_t;

/*
 * @Description   Parameters for defining CC as the next engine after KeyGen
 *		  (Must match struct t_FmPcdKgCc defined in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_kg_cc_t {
	void				*tree_id;
					/**< CC Tree id */
	uint8_t				grp_id;
					/**< CC group id within the CC tree */
	bool				plcr_next;
					/**< TRUE if after CC, in case of data
					 * frame, policing is required.
					 */
	bool				bypass_plcr_profile_generation;
					/**< TRUE to bypass KeyGen policer
					 * profile generation; selected profile
					 * is the one set at port initialization
					 */
	ioc_fm_pcd_kg_plcr_profile_t	plcr_profile;
					/**< Valid only if plcr_next = TRUE and
					 * bypass_plcr_profile_generation =
					 * FALSE
					 */
} ioc_fm_pcd_kg_cc_t;

/*
 * @Description   Parameters for defining initializing a KeyGen scheme (Must
 *		  match struct t_FmPcdKgSchemeParams defined in fm_pcd_ext.h)
 */
struct fm_pcd_kg_scheme_params_t {
	bool modify;	/**< TRUE to change an existing scheme */
	union {
		uint8_t relative_scheme_id;
		/**< if modify=FALSE: partition-relative scheme id */
		void *scheme_id;
		/**< if modify=TRUE: the id of an existing scheme */
	} scm_id;
	bool always_direct;
		/**< This scheme is reached only directly, i.e. no need for
		 * match vector; KeyGen will ignore it when matching
		 */
	struct {
		/**< HL relevant only if always_direct=FALSE */
		void *net_env_id;
		/**< The id of the Network Environment as returned
		 * by fm_pcd_net_env_characteristics_set()
		 */
		uint8_t num_of_distinction_units;
		/**< Number of NetEnv units listed in unit_ids array */
		uint8_t unit_ids[IOC_FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS];
		/**< Indexes as passed to SetNetEnvCharacteristics (?) array */
	} net_env_params;
	bool use_hash;
		/**< use the KG Hash functionality */
	ioc_fm_pcd_kg_key_extract_and_hash_params_t key_ext_and_hash;
		/**< used only if useHash = TRUE */
	bool bypass_fqid_generation;
		/**< Normally - FALSE, TRUE to avoid FQID update in the IC; In
		 * such a case FQID after KG will be the default FQID defined
		 * for the relevant port, or the FQID defined by CC in cases
		 * where CC was the previous engine.
		 */
	uint32_t base_fqid;
		/**< Base FQID; Relevant only if bypass_fqid_generation = FALSE;
		 * If hash is used and an even distribution is expected
		 * according to hash_dist_num_of_fqids, base_fqid must
		 * be aligned to hash_dist_num_of_fqids.
		 */
	uint8_t num_of_used_extracted_ors;
		/**< Number of FQID masks listed in extracted_ors array*/
	ioc_fm_pcd_kg_extracted_or_params_t
		extracted_ors[IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS];
		/**< IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS registers are shared
		 * between qid_masks functionality and some of the extraction
		 * actions; Normally only some will be used for qid_mask. Driver
		 * will return error if resource is full at initialization time.
		 */
	bool override_storage_profile;
		/**< TRUE if KeyGen override previously decided storage profile
		 */
	ioc_fm_pcd_kg_storage_profile_t storage_profile;
		/**< Used when override_storage_profile=TRUE */
	ioc_fm_pcd_engine next_engine;
		/**< may be BMI, PLCR or CC */
	union {
		/**< depends on nextEngine */
		ioc_fm_pcd_done_action done_action;
		/**< Used when next engine is BMI (done) */
		ioc_fm_pcd_kg_plcr_profile_t plcr_profile;
		/**< Used when next engine is PLCR */
		ioc_fm_pcd_kg_cc_t cc;
		/**< Used when next engine is CC */
	} kg_next_engine_params;
	ioc_fm_pcd_kg_scheme_counter_t scheme_counter;
		/**< A structure of parameters for updating the scheme counter*/
};

typedef struct ioc_fm_pcd_kg_scheme_params_t {
	struct fm_pcd_kg_scheme_params_t param;
	void *id;		/**< Returns the scheme Id to be used */
} ioc_fm_pcd_kg_scheme_params_t;

/*
 * @Collection
 */
#define IOC_FM_PCD_CC_STATS_MAX_FLR	10
			/* Maximal supported number of frame length ranges */
#define IOC_FM_PCD_CC_STATS_FLR_SIZE		2
			/* Size in bytes of a frame length range limit */
#define IOC_FM_PCD_CC_STATS_FLR_COUNT_SIZE	4
			/* Size in bytes of a frame length range counter */
/* @} */

/*
 * @Description   Parameters for defining CC as the next engine after a CC node.
 *		  (Must match struct t_FmPcdCcNextCcParams defined in
 *		  fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_next_cc_params_t {
	void	*cc_node_id;			/**< Id of the next CC node */
} ioc_fm_pcd_cc_next_cc_params_t;

/*
 * @Description   A structure for defining Frame Replicator as the next engine
 *		  after a CC node. (Must match struct t_FmPcdCcNextFrParams
 *		  defined in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_next_fr_params_t {
	void *frm_replic_id;
			/**< The id of the next frame replicator group */
} ioc_fm_pcd_cc_next_fr_params_t;

/*
 * @Description   A structure for defining PLCR params when PLCR is the
 *		  next engine after a CC node
 *		  (Must match struct t_FmPcdCcNextPlcrParams defined in
 *		  fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_next_plcr_params_t {
	bool	override_params;
		/**< TRUE if CC override previously decided parameters*/
	bool	shared_profile;
		/**< Relevant only if overrideParams=TRUE: TRUE if this profile
		 * is shared between ports
		 */
	uint16_t	new_relative_profile_id;
		/**< Relevant only if overrideParams=TRUE: (otherwise profile id
		 * is taken from keygen); This parameter should indicate the
		 * policer profile offset within the port's policer profiles or
		 * from SHARED window.
		 */
	uint32_t	new_fqid;
		/**< Relevant only if overrideParams=TRUE: FQID for enquing the
		 * frame; In earlier chips  if policer next engine is KEYGEN,
		 * this parameter can be 0, because the KEYGEN always decides
		 * the enqueue FQID.
		 */
	uint8_t	new_relative_storage_profile_id;
		/**< Indicates the relative storage profile offset within the
		 * port's storage profiles window; Relevant only if the port was
		 * configured with VSP.
		 */
} ioc_fm_pcd_cc_next_plcr_params_t;

/*
 * @Description   A structure for defining enqueue params when BMI is the next
 *		  engine after a CC node (Must match struct
 *		  t_FmPcdCcNextEnqueueParams defined in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_next_enqueue_params_t {
	ioc_fm_pcd_done_action  action;
				/**< Action - when next engine is BMI (done) */
	bool			override_fqid;
				/**< TRUE if CC override previously decided fqid
				 * and vspid, relevant if action =
				 * e_IOC_FM_PCD_ENQ_FRAME
				 */
	uint32_t		new_fqid;
				/**< Valid if overrideFqid=TRUE, FQID for
				 * enqueuing the frame (otherwise FQID is taken
				 * from KeyGen), relevant if action =
				 * e_IOC_FM_PCD_ENQ_FRAME
				 */
	uint8_t		new_relative_storage_profile_id;
			/**< Valid if override_fqid=TRUE, Indicates the relative
			 * virtual storage profile offset within the port's
			 * storage profiles window; Relevant only if the port
			 * was configured with VSP.
			 */

} ioc_fm_pcd_cc_next_enqueue_params_t;

/*
 * @Description   A structure for defining KG params when KG is the next engine
 *		  after a CC node (Must match struct t_FmPcdCcNextKgParams
 *		  defined in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_next_kg_params_t {
	bool	override_fqid;
		/**< TRUE if CC override previously decided fqid and vspid,
		 * Note - this parameters are irrelevant for earlier chips
		 */
	uint32_t   new_fqid;
		/**< Valid if overrideFqid=TRUE, FQID for enqueuing the frame
		 * (otherwise FQID is taken from KeyGen),
		 * Note - this parameters are irrelevant for earlier chips
		 */
	uint8_t   new_relative_storage_profile_id;
		/**< Valid if override_fqid=TRUE, Indicates the relative virtual
		 * storage profile offset within the port's storage profiles
		 * window; Relevant only if the port was configured with VSP.
		 */
	void	*p_direct_scheme;	/**< Direct scheme id to go to. */
} ioc_fm_pcd_cc_next_kg_params_t;

/*
 * @Description   Parameters for defining the next engine after a CC node.
 *		  (Must match struct ioc_fm_pcd_cc_next_engine_params_t defined
 *		  in fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_next_engine_params_t {
	ioc_fm_pcd_engine			next_engine;
				/**< User has to initialize parameters according
				 * to nextEngine definition
				 */
	union {
		ioc_fm_pcd_cc_next_cc_params_t	cc_params;
				/**< Parameters in case next engine is CC */
		ioc_fm_pcd_cc_next_plcr_params_t	plcr_params;
				/**< Parameters in case next engine is PLCR */
		ioc_fm_pcd_cc_next_enqueue_params_t enqueue_params;
				/**< Parameters in case next engine is BMI */
		ioc_fm_pcd_cc_next_kg_params_t	kg_params;
				/**< Parameters in case next engine is KG */
		ioc_fm_pcd_cc_next_fr_params_t	fr_params;
				/**< Parameters in case next engine is FR */
	} params;
		/**< Union used for all the next-engine parameters options */
	void					*manip_id;
				/**< Handle to Manipulation object. Relevant if
				 * next engine is of type result
				 * (e_IOC_FM_PCD_PLCR, e_IOC_FM_PCD_KG,
				 * e_IOC_FM_PCD_DONE)
				 */
	bool					statistics_en;
				/**< If TRUE, statistics counters are
				 * incremented for each frame passing through
				 * this Coarse Classification entry.
				 */
} ioc_fm_pcd_cc_next_engine_params_t;

/*
 * @Description   Parameters for defining a single CC key
 */
typedef struct ioc_fm_pcd_cc_key_params_t {
	uint8_t		*p_key;
			/**< pointer to the key of the size defined in key_size
			 */
	uint8_t		*p_mask;
			/**< pointer to the Mask per key of the size defined in
			 * key_size. p_key and p_mask (if defined) has to be of
			 * the same size defined in the key_size
			 */
	ioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;
			/**< parameters for the next for the defined Key in
			 * p_key
			 */

} ioc_fm_pcd_cc_key_params_t;

/*
 * @Description   Parameters for defining CC keys parameters
 *		  The driver supports two methods for CC node allocation:
 *		  dynamic and static. Static mode was created in order to
 *		  prevent runtime alloc/free of FMan memory (MURAM), which may
 *		  cause fragmentation; in this mode, the driver automatically
 *		  allocates the memory according to 'max_num_of_keys' parameter.
 *		  The driver calculates the maximal memory size that may be used
 *		  for this CC-Node taking into consideration 'mask_support' and
 *		  'statistics_mode' parameters. When 'action' =
 *		  e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction
 *		  parameters of this node, 'max_num_of_keys' must be equal to
 *		  'num_of_keys'. In dynamic mode, 'max_num_of_keys' must be
 *		  zero. At initialization, all required structures are allocated
 *		  according to 'num_of_keys' parameter. During runtime
 *		  modification, these structures are re-allocated according to
 *		  the updated number of keys.
 *		  Please note that 'action' and 'ic_indx_mask' mentioned in the
 *		  specific parameter explanations are passed in the extraction
 *		  parameters of the node (fields of
 *		  extractccparams.extractnonhdr).
 */
typedef struct ioc_keys_params_t {
	uint16_t		max_num_of_keys;
			/**< Maximum number of keys that will (ever) be used in
			 * this CC-Node; A value of zero may be used for dynamic
			 * memory allocation.
			 */
	bool			mask_support;
			/**< This parameter is relevant only if a node is
			 * initialized with action =
			 * e_IOC_FM_PCD_ACTION_EXACT_MATCH and max_num_of_keys >
			 * 0; Should be TRUE to reserve table memory for key
			 * masks, even if initial keys do not contain masks, or
			 * if the node was initialized as 'empty' (without
			 * keys); this will allow user to add keys with masks at
			 * runtime.
			 */
	ioc_fm_pcd_cc_stats_mode	statistics_mode;
			/**< Determines the supported statistics mode for all
			 * node's keys. To enable statistics gathering,
			 * statistics should be enabled per every key, using
			 * 'statistics_en' in next engine parameters structure
			 * of that key; If 'max_num_of_keys' is set, all
			 * required structures will be preallocated for all keys
			 */
	uint16_t	frame_length_ranges[IOC_FM_PCD_CC_STATS_MAX_FLR];
		/**< Relevant only for 'RMON' statistics mode (this feature is
		 * supported only on B4860 device); Holds a list of programmable
		 * thresholds. For each received frame, its length in bytes is
		 * examined against these range thresholds and the appropriate
		 * counter is incremented by 1. For example, to belong to range
		 * i, the following should hold: range i-1 threshold < frame
		 * length <= range i threshold Each range threshold must be
		 * larger then its preceding range threshold. Last range
		 * threshold must be 0xFFFF.
		 */
	uint16_t			num_of_keys;
		/**< Number of initial keys; Note that in case of 'action' =
		 * e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP, this field should be
		 * power-of-2 of the number of bits that are set in
		 * 'ic_indx_mask'.
		 */
	uint8_t			key_size;
		/**< Size of key - for extraction of type FULL_FIELD, 'key_size'
		 * has to be the standard size of the selected key; For other
		 * extraction types, 'key_size' has to be as size of extraction;
		 * When 'action' = e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP,
		 * 'key_size' must be 2.
		 */
	ioc_fm_pcd_cc_key_params_t  key_params[IOC_FM_PCD_MAX_NUM_OF_KEYS];
		/**< An array with 'num_of_keys' entries, each entry specifies
		 * the corresponding key parameters; When 'action' =
		 * e_IOC_FM_PCD_ACTION_EXACT_MATCH, this value must not exceed
		 * 255 (IOC_FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved
		 * for the 'miss' entry.
		 */
	ioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params_for_miss;
		/**< Parameters for defining the next engine when a key is not
		 * matched; Not relevant if action =
		 * e_IOC_FM_PCD_ACTION_INDEXED_LOOKUP.
		 */
} ioc_keys_params_t;

/*
 * @Description   Parameters for defining a CC node
 */
struct fm_pcd_cc_node_params_t {
	ioc_fm_pcd_extract_entry_t extract_cc_params;
	/**< Extraction parameters */
	ioc_keys_params_t keys_params;
	/**< Keys definition matching the selected extraction */
};

typedef struct ioc_fm_pcd_cc_node_params_t {
	struct fm_pcd_cc_node_params_t param;
	void *id;
	/**< Output parameter; returns the CC node Id to be used */
} ioc_fm_pcd_cc_node_params_t;

/*
 * @Description   Parameters for defining a hash table
 *		  (Must match struct ioc_fm_pcd_hash_table_params_t defined in
 *		  fm_pcd_ext.h)
 */
struct fm_pcd_hash_table_params_t {
	uint16_t max_num_of_keys;
		/**< Maximum Number Of Keys that will (ever) be used in this
		 * Hash-table
		 */
	ioc_fm_pcd_cc_stats_mode statistics_mode;
		/**< If not e_IOC_FM_PCD_CC_STATS_MODE_NONE, the required
		 * structures for the requested statistics mode will be
		 * allocated according to max_num_of_keys.
		 */
	uint8_t kg_hash_shift;
		/**< KG-Hash-shift as it was configured in the KG-scheme that
		 * leads to this hash-table.
		 */
	uint16_t hash_res_mask;
		/**< Mask that will be used on the hash-result; The
		 * number-of-sets for this hash will be calculated as (2^(number
		 * of bits set in 'hash_res_mask')); The 4 lower bits must be
		 * cleared.
		 */
	uint8_t hash_shift;
		/**< Byte offset from the beginning of the KeyGen hash result to
		 * the 2-bytes to be used as hash index.
		 */
	uint8_t match_key_size;
		/**< Size of the exact match keys held by the hash buckets */

	ioc_fm_pcd_cc_next_engine_params_t cc_next_engine_params_for_miss;
		/**< Parameters for defining the next engine when a key is not
		 * matched
		 */
};

typedef struct ioc_fm_pcd_hash_table_params_t {
	struct fm_pcd_hash_table_params_t param;
	void *id;
} ioc_fm_pcd_hash_table_params_t;

/*
 * @Description   A structure with the arguments for the
 *		  fm_pcd_hash_table_add_key ioctl() call
 */
typedef struct ioc_fm_pcd_hash_table_add_key_params_t {
	void			*p_hash_tbl;
	uint8_t			key_size;
	ioc_fm_pcd_cc_key_params_t  key_params;
} ioc_fm_pcd_hash_table_add_key_params_t;

/*
 * @Description   Parameters for defining a CC tree group.
 *
 *		  This structure defines a CC group in terms of NetEnv units and
 *		  the action to be taken in each case. The unit_ids list must be
 *		  given in order from low to high indices.
 *		  ioc_fm_pcd_cc_next_engine_params_t is a list of
 *		  2^num_of_distinction_units structures where each defines the
 *		  next action to be taken for each units combination. for
 *		  example: num_of_distinction_units = 2 unit_ids = {1,3}
 *		  next_engine_per_entries_in_grp[0] =
 *		  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -
 *		  not found; unit 3 - not found;
 *		  next_engine_per_entries_in_grp[1] =
 *		  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -
 *		  not found; unit 3 - found;
 *		  next_engine_per_entries_in_grp[2] =
 *		  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -
 *		  found; unit 3 - not found;
 *		  next_engine_per_entries_in_grp[3] =
 *		  ioc_fm_pcd_cc_next_engine_params_t for the case that unit 1 -
 *		  found; unit 3 - found;
 */
typedef struct ioc_fm_pcd_cc_grp_params_t {
	uint8_t		num_of_distinction_units;   /**< Up to 4 */
	uint8_t		unit_ids[IOC_FM_PCD_MAX_NUM_OF_CC_UNITS];
		/**< Indexes of the units as defined in
		 * fm_pcd_net_env_characteristics_set()
		 */
	ioc_fm_pcd_cc_next_engine_params_t
		next_engine_per_entries_in_grp[IOC_FM_PCD_MAX_CC_ENTRY_IN_GRP];
		/**< Maximum entries per group is 16 */
} ioc_fm_pcd_cc_grp_params_t;

/*
 * @Description   Parameters for defining the CC tree groups
 *		  (Must match struct ioc_fm_pcd_cc_tree_params_t defined in
 *		  fm_pcd_ext.h)
 */
typedef struct ioc_fm_pcd_cc_tree_params_t {
	void		*net_env_id;
			/**< Id of the Network Environment as returned
			 * by fm_pcd_net_env_characteristics_set()
			 */
	uint8_t		num_of_groups;
			/**< Number of CC groups within the CC tree */
	ioc_fm_pcd_cc_grp_params_t
			fm_pcd_cc_group_params[IOC_FM_PCD_MAX_NUM_OF_CC_GROUPS];
			/**< Parameters for each group. */
	void		*id;
			/**< Output parameter; Returns the tree Id to be used */
} ioc_fm_pcd_cc_tree_params_t;

/*
 * @Description   Parameters for defining policer byte rate
 */
typedef struct ioc_fm_pcd_plcr_byte_rate_mode_param_t {
	ioc_fm_pcd_plcr_frame_length_select	frame_length_selection;
			/**< Frame length selection */
	ioc_fm_pcd_plcr_roll_back_frame_select  roll_back_frame_selection;
			/**< relevant option only e_IOC_FM_PCD_PLCR_L2_FRM_LEN,
			 * e_IOC_FM_PCD_PLCR_FULL_FRM_LEN
			 */
} ioc_fm_pcd_plcr_byte_rate_mode_param_t;

/*
 * @Description   Parameters for defining the policer profile (based on
 *		  RFC-2698 or RFC-4115 attributes).
 */
typedef struct ioc_fm_pcd_plcr_non_passthrough_alg_param_t {
	ioc_fm_pcd_plcr_rate_mode		rate_mode;
			/**< Byte / Packet */
	ioc_fm_pcd_plcr_byte_rate_mode_param_t  byte_mode_param;
			/**< Valid for Byte NULL for Packet */
	uint32_t				committed_info_rate;
			/**< KBits/Sec or Packets/Sec */
	uint32_t				committed_burst_size;
			/**< KBits or Packets */
	uint32_t				peak_or_excess_info_rate;
			/**< KBits/Sec or Packets/Sec */
	uint32_t				peak_or_excess_burst_size;
			/**< KBits or Packets */
} ioc_fm_pcd_plcr_non_passthrough_alg_param_t;

/*
 * @Description   Parameters for defining the next engine after policer
 */
typedef union ioc_fm_pcd_plcr_next_engine_params_u {
	ioc_fm_pcd_done_action	action;
				/**< Action - when next engine is BMI (done) */
	void			*p_profile;
				/**< Policer profile handle -  used when next
				 * engine is PLCR, must be a SHARED profile
				 */
	void			*p_direct_scheme;
				/**< Direct scheme select - when next engine is
				 * Keygen
				 */
} ioc_fm_pcd_plcr_next_engine_params_u;

typedef struct ioc_fm_pcd_port_params_t {
	ioc_fm_port_type			port_type;
				/**< Type of port for this profile */
	uint8_t				port_id;
				/**< FM-Port id of port for this profile */
} ioc_fm_pcd_port_params_t;

/*
 * @Description   Parameters for defining the policer profile entry
 *		  (Must match struct ioc_fm_pcd_plcr_profile_params_t defined in
 *		  fm_pcd_ext.h)
 */
struct fm_pcd_plcr_profile_params_t {
	bool modify;
		/**< TRUE to change an existing profile */
	union {
		struct {
			ioc_fm_pcd_profile_type_selection profile_type;
				/**< Type of policer profile */
			ioc_fm_pcd_port_params_t *p_fm_port;
				/**< Relevant for per-port profiles only */
			uint16_t relative_profile_id;
				/**< Profile id - relative to shared group or to
				 * port
				 */
		} new_params;
			/**< Use it when modify = FALSE */
		void *p_profile;
			/**< A handle to a profile - use it when modify=TRUE */
	} profile_select;
	ioc_fm_pcd_plcr_algorithm_selection alg_selection;
	/**< Profile Algorithm PASS_THROUGH, RFC_2698, RFC_4115 */
	ioc_fm_pcd_plcr_color_mode color_mode;
	/**< COLOR_BLIND, COLOR_AWARE */

	union {
		ioc_fm_pcd_plcr_color dflt_color;
		/**< For Color-Blind Pass-Through mode; the policer will
		 * re-color any incoming packet with the default value.
		 */
		ioc_fm_pcd_plcr_color override;
		/**< For Color-Aware modes; the profile response to a pre-color
		 * value of 2'b11.
		 */
	} color;

	ioc_fm_pcd_plcr_non_passthrough_alg_param_t
		non_passthrough_alg_param;
		/**< RFC2698 or RFC4115 parameters */

	ioc_fm_pcd_engine next_engine_on_green;
		/**< Next engine for green-colored frames */
	ioc_fm_pcd_plcr_next_engine_params_u params_on_green;
		/**< Next engine parameters for green-colored frames */

	ioc_fm_pcd_engine next_engine_on_yellow;
		/**< Next engine for yellow-colored frames */
	ioc_fm_pcd_plcr_next_engine_params_u params_on_yellow;
		/**< Next engine parameters for yellow-colored frames */

	ioc_fm_pcd_engine next_engine_on_red;
		/**< Next engine for red-colored frames */
	ioc_fm_pcd_plcr_next_engine_params_u params_on_red;
		/**< Next engine parameters for red-colored frames */

	bool trap_profile_on_flow_A;
		/**< Obsolete - do not use */
	bool trap_profile_on_flow_B;
		/**< Obsolete - do not use */
	bool trap_profile_on_flow_C;
		/**< Obsolete - do not use */
};

typedef struct ioc_fm_pcd_plcr_profile_params_t {
	struct fm_pcd_plcr_profile_params_t param;
	void	*id;
		/**< output parameter; Returns the profile Id to be used */
} ioc_fm_pcd_plcr_profile_params_t;

/*
 * @Description   A structure for modifying CC tree next engine
 */
typedef struct ioc_fm_pcd_cc_tree_modify_next_engine_params_t {
	void				*id;
			/**< CC tree Id to be used */
	uint8_t				grp_indx;
			/**< A Group index in the tree */
	uint8_t				indx;
			/**< Entry index in the group defined by grp_index */
	ioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;
			/**< Parameters for the next for the defined Key in the
			 * p_key
			 */
} ioc_fm_pcd_cc_tree_modify_next_engine_params_t;

/*
 * @Description   A structure for modifying CC node next engine
 */
typedef struct ioc_fm_pcd_cc_node_modify_next_engine_params_t {
	void				*id;
			/**< CC node Id to be used */
	uint16_t				key_indx;
			/**< Key index for Next Engine Params modifications;
			 * NOTE: This parameter is IGNORED for miss-key!
			 */
	uint8_t				key_size;
			/**< Key size of added key */
	ioc_fm_pcd_cc_next_engine_params_t  cc_next_engine_params;
			/**< parameters for the next for the defined Key in the
			 * p_key
			 */
} ioc_fm_pcd_cc_node_modify_next_engine_params_t;

/*
 * @Description   A structure for remove CC node key
 */
typedef struct ioc_fm_pcd_cc_node_remove_key_params_t {
	void				*id;
			/**< CC node Id to be used */
	uint16_t				key_indx;
			/**< Key index for Next Engine Params modifications;
			 * NOTE: This parameter is IGNORED for miss-key!
			 */
} ioc_fm_pcd_cc_node_remove_key_params_t;

/*
 * @Description   A structure for modifying CC node key and next engine
 */
typedef struct ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t {
	void				*id;
			/**< CC node Id to be used */
	uint16_t				key_indx;
			/**< Key index for Next Engine Params modifications;
			 * NOTE: This parameter is IGNORED for miss-key!
			 */
	uint8_t				key_size;
			/**< Key size of added key */
	ioc_fm_pcd_cc_key_params_t	key_params;
			/**< it's array with num_of_keys entries each entry in
			 * the array of the type ioc_fm_pcd_cc_key_params_t
			 */
} ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t;

/*
 * @Description   A structure for modifying CC node key
 */
typedef struct ioc_fm_pcd_cc_node_modify_key_params_t {
	void				*id;
			/**< CC node Id to be used */
	uint16_t				key_indx;
			/**< Key index for Next Engine Params modifications;
			 * NOTE: This parameter is IGNORED for miss-key!
			 */
	uint8_t				key_size;
			/**< Key size of added key */
	uint8_t				*p_key;
			/**< Pointer to the key of the size defined in key_size
			 */
	uint8_t				*p_mask;
			/**< Pointer to the Mask per key of the size defined in
			 * key_size. p_key and p_mask (if defined) have to be of
			 * the same size as defined in the key_size
			 */
} ioc_fm_pcd_cc_node_modify_key_params_t;

/*
 * @Description   A structure with the arguments for the
 *		  fm_pcd_hash_table_remove_key ioctl() call
 */
typedef struct ioc_fm_pcd_hash_table_remove_key_params_t {
	void	*p_hash_tbl;	/**< The id of the hash table */
	uint8_t	key_size;	/**< The size of the key to remove */
	uint8_t	*p_key;		/**< Pointer to the key to remove */
} ioc_fm_pcd_hash_table_remove_key_params_t;

/*
 * @Description   Parameters for selecting a location for requested manipulation
 */
typedef struct ioc_fm_manip_hdr_info_t {
	ioc_net_header_type		hdr;		/**< Header selection */
	ioc_fm_pcd_hdr_index		hdr_index;
			/**< Relevant only for MPLS, VLAN and tunneled IP.
			 * Otherwise should be cleared.
			 */
	bool				by_field;
			/**< TRUE if the location of manipulation is according
			 * to some field in the specific header
			 */
	ioc_fm_pcd_fields_u		full_field;
			/**< Relevant only when by_field = TRUE: Extract field
			 */
} ioc_fm_manip_hdr_info_t;

/*
 * @Description   Parameters for defining header removal by header type
 */
typedef struct ioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t {
	ioc_fm_pcd_manip_hdr_rmv_by_hdr_type	type;
			/**< Selection of header removal location */
	union {
	ioc_fm_manip_hdr_info_t		hdr_info;
		/**< Relevant when type = e_FM_PCD_MANIP_RMV_BY_HDR_FROM_START
		 */
	ioc_fm_pcd_manip_hdr_rmv_specific_l2	specific_l2;
		/**< Relevant when type = e_IOC_FM_PCD_MANIP_BY_HDR_SPECIFIC_L2;
		 * Defines which L2 headers to remove.
		 */
	} u;
} ioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t;

/*
 * @Description   Parameters for configuring IP fragmentation manipulation
 */
typedef struct ioc_fm_pcd_manip_frag_ip_params_t {
	uint16_t			size_for_fragmentation;
		/**< If length of the frame is greater than this value, IP
		 * fragmentation will be executed.
		 */
	bool			sg_bpid_en;
		/**< Enable a dedicated buffer pool id for the Scatter/Gather
		 * buffer allocation; If disabled, the Scatter/Gather buffer
		 * will be allocated from the same pool as the received frame's
		 * buffer.
		 */
	uint8_t			sg_bpid;
		/**< Scatter/Gather buffer pool id; This parameter is relevant
		 * when 'sg_bpid_en=TRUE'; Same LIODN number is used for these
		 * buffers as for the received frames buffers, so buffers of
		 * this pool need to be allocated in the same memory area as the
		 * received buffers. If the received buffers arrive from
		 * different sources, the Scatter/Gather BP id should be mutual
		 * to all these sources.
		 */
	ioc_fm_pcd_manip_donot_frag_action  donot_frag_action;
		/**< Don't Fragment Action - If an IP packet is larger than MTU
		 * and its DF bit is set, then this field will determine the
		 * action to be taken.
		 */
} ioc_fm_pcd_manip_frag_ip_params_t;

/*
 * @Description   Parameters for configuring IP reassembly manipulation.
 *
 *		  This is a common structure for both IPv4 and IPv6 reassembly
 *		  manipulation. For reassembly of both IPv4 and IPv6, make sure
 *		  to set the 'hdr' field in ioc_fm_pcd_manip_reassem_params_t to
 *		  IOC_header_type_ipv_6.
 */
typedef struct ioc_fm_pcd_manip_reassem_ip_params_t {
	uint8_t			relative_scheme_id[2];
			/**< Partition relative scheme id: relativeSchemeId[0] -
			 * Relative scheme ID for IPV4 Reassembly manipulation;
			 * relativeSchemeId[1] -  Relative scheme ID for IPV6
			 * Reassembly manipulation; NOTE: The following comment
			 * is relevant only for FMAN v2 devices: Relative scheme
			 * ID for IPv4/IPv6 Reassembly manipulation must be
			 * smaller than the user schemes id to ensure that the
			 * reassembly's schemes will be first match. The
			 * remaining schemes, if defined, should have higher
			 * relative scheme ID.
			 */
	uint32_t			non_consistent_sp_fqid;
			/**< In case that other fragments of the frame
			 * corresponds to different storage profile than the
			 * opening fragment (Non-Consistent-SP state) then one
			 * of two possible scenarios occurs: if
			 * 'nonConsistentSpFqid != 0', the reassembled frame
			 * will be enqueued to this fqid, otherwise a 'Non
			 * Consistent SP' bit will be set in the FD[status].
			 */
	uint8_t				data_mem_id;
			/**< Memory partition ID for the IPR's external tables
			 * structure
			 */
	uint16_t			data_liodn_offset;
			/**< LIODN offset for access the IPR's external tables
			 * structure.
			 */
	uint16_t			min_frag_size[2];
			/**< Minimum fragment size: minFragSize[0] - for ipv4,
			 * minFragSize[1] - for ipv6
			 */
	ioc_fm_pcd_manip_reassem_ways_number   num_of_frames_per_hash_entry[2];
			/**< Number of frames per hash entry needed for
			 * reassembly process: num_of_frames_per_hash_entry[0] -
			 * for ipv4 (max value is
			 * e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH);
			 * num_of_frames_per_hash_entry[1] - for ipv6 (max value
			 * is e_IOC_FM_PCD_MANIP_SIX_WAYS_HASH).
			 */
	uint16_t			max_num_frames_in_process;
			/**< Number of frames which can be processed by
			 * Reassembly in the same time; Must be power of 2; In
			 * the case num_of_frames_per_hash_entry ==
			 * e_IOC_FM_PCD_MANIP_FOUR_WAYS_HASH,
			 * max_num_frames_in_process has to be in the range of
			 * 4 - 512; In the case num_of_frames_per_hash_entry ==
			 * e_IOC_FM_PCD_MANIP_EIGHT_WAYS_HASH,
			 * max_num_frames_in_process has to be in the range of
			 * 8 - 2048.
			 */
	ioc_fm_pcd_manip_reassem_time_out_mode  time_out_mode;
			/**< Expiration delay initialized by Reassembly process
			 */
	uint32_t			fqid_for_time_out_frames;
			/**< FQID in which time out frames will enqueue during
			 * Time Out Process
			 */
	uint32_t			timeout_threshold_for_reassm_process;
			/**< Represents the time interval in microseconds which
			 * defines if opened frame (at least one fragment was
			 * processed but not all the fragments)is found as too
			 * old
			 */
} ioc_fm_pcd_manip_reassem_ip_params_t;

/*
 * @Description   Parameters for defining IPSEC manipulation
 */
typedef struct ioc_fm_pcd_manip_special_offload_ipsec_params_t {
	bool	decryption;
			/**< TRUE if being used in decryption direction;
			 * FALSE if being used in encryption direction.
			 */
	bool	ecn_copy;
			/**< TRUE to copy the ECN bits from inner/outer to
			 * outer/inner (direction depends on the 'decryption'
			 * field).
			 */
	bool	dscp_copy;
			/**< TRUE to copy the DSCP bits from inner/outer to
			 * outer/inner (direction depends on the 'decryption'
			 * field).
			 */
	bool	variable_ip_hdr_len;
			/**< TRUE for supporting variable IP header length in
			 * decryption.
			 */
	bool	variable_ip_version;
			/**< TRUE for supporting both IP version on the same SA
			 * in encryption
			 */
	uint8_t outer_ip_hdr_len;
			/**< If 'variable_ip_version == TRUE' than this field
			 * must be set to non-zero value; It is specifies the
			 * length of the outer IP header that was configured in
			 * the corresponding SA.
			 */
	uint16_t	arw_size;
			/**< if <> '0' then will perform ARW check for this SA;
			 * The value must be a multiplication of 16
			 */
	void	*arw_addr;
			/**< if arwSize <> '0' then this field must be set to
			 * non-zero value; MUST be allocated from FMAN's MURAM
			 * that the post-sec op-port belong Must be 4B aligned.
			 * Required MURAM size is
			 * '(NEXT_POWER_OF_2(arwSize+32))/8+4' Bytes
			 */
} ioc_fm_pcd_manip_special_offload_ipsec_params_t;

/*
 * @Description   Parameters for configuring CAPWAP fragmentation manipulation
 *
 *		  Restrictions:
 *		  - Maximum number of fragments per frame is 16.
 *		  - Transmit confirmation is not supported.
 *		  - Fragmentation nodes must be set as the last PCD action (i.e.
 *		    the corresponding CC node key must have next engine set to
 *		    e_FM_PCD_DONE).
 *		  - Only BMan buffers shall be used for frames to be fragmented.
 *		  - NOTE: The following comment is relevant only for FMAN v3
 *		    devices: IPF does not support VSP. Therefore, on the same
 *		    port where we have IPF we cannot support VSP.
 */
typedef struct ioc_fm_pcd_manip_frag_capwap_params_t {
	uint16_t	size_for_fragmentation;
			/**< If length of the frame is greater than this value,
			 * CAPWAP fragmentation will be executed.
			 */
	bool		sg_bpid_en;
			/**< Enable a dedicated buffer pool id for the
			 * Scatter/Gather buffer allocation; If disabled, the
			 * Scatter/Gather buffer will be allocated from the same
			 * pool as the received frame's buffer.
			 */
	uint8_t		sg_bpid;
			/**< Scatter/Gather buffer pool id; This parameters is
			 * relevant when 'sg_bpidEn=TRUE'; Same LIODN number is
			 * used for these buffers as for the received frames
			 * buffers, so buffers of this pool need to be allocated
			 * in the same memory area as the received buffers. If
			 * the received buffers arrive from different sources,
			 * the Scatter/Gather BP id should be mutual to all
			 * these sources.
			 */
	bool	compress_mode_en;
			/**< CAPWAP Header Options Compress Enable mode; When
			 * this mode is enabled then only the first fragment
			 * include the CAPWAP header options field (if user
			 * provides it in the input frame) and all other
			 * fragments exclude the CAPWAP options field (CAPWAP
			 * header is updated accordingly).
			 */
} ioc_fm_pcd_manip_frag_capwap_params_t;

/*
 * @Description   Parameters for configuring CAPWAP reassembly manipulation.
 *
 *		  Restrictions:
 *		  - Application must define one scheme to catch the reassembled
 *		    frames.
 *		  - Maximum number of fragments per frame is 16.
 */
typedef struct ioc_fm_pcd_manip_reassem_capwap_params_t {
	uint8_t		relative_scheme_id;
			/**< Partition relative scheme id; NOTE: this id must be
			 * smaller than the user schemes id to ensure that the
			 * reassembly scheme will be first match; Rest schemes,
			 * if defined, should have higher relative scheme ID.
			 */
	uint8_t		data_mem_id;
			/**< Memory partition ID for the IPR's external tables
			 * structure
			 */
	uint16_t	data_liodn_offset;
			/**< LIODN offset for access the IPR's external tables
			 * structure.
			 */
	uint16_t	max_reassembled_frame_length;
			/**< The maximum CAPWAP reassembled frame length in
			 * bytes; If maxReassembledFrameLength == 0, any
			 * successful reassembled frame length is considered as
			 * a valid length; if maxReassembledFrameLength > 0, a
			 * successful reassembled frame which its length exceeds
			 * this value is considered as an error frame (FD
			 * status[CRE] bit is set).
			 */
	ioc_fm_pcd_manip_reassem_ways_number   num_of_frames_per_hash_entry;
			/**< Number of frames per hash entry needed for
			 * reassembly process
			 */
	uint16_t	max_num_frames_in_process;
			/**< Number of frames which can be processed by
			 * reassembly in the same time; Must be power of 2; In
			 * the case num_of_frames_per_hash_entry ==
			 * e_FM_PCD_MANIP_FOUR_WAYS_HASH,
			 * max_num_frames_in_process has to be in the range of
			 * 4 - 512; In the case num_of_frames_per_hash_entry ==
			 * e_FM_PCD_MANIP_EIGHT_WAYS_HASH,
			 * max_num_frames_in_process has to be in the range of
			 * 8 - 2048.
			 */
	ioc_fm_pcd_manip_reassem_time_out_mode  time_out_mode;
			/**< Expiration delay initialized by Reassembly process
			 */
	uint32_t	fqid_for_time_out_frames;
			/**< FQID in which time out frames will enqueue during
			 * Time Out Process; Recommended value for this field is
			 * 0; in this way timed-out frames will be discarded
			 */
	uint32_t	timeout_threshold_for_reassm_process;
			/**< Represents the time interval in microseconds which
			 * defines if opened frame (at least one fragment was
			 * processed but not all the fragments)is found as too
			 * old
			 */
} ioc_fm_pcd_manip_reassem_capwap_params_t;

/*
 * @Description   structure for defining CAPWAP manipulation
 */
typedef struct ioc_fm_pcd_manip_special_offload_capwap_params_t {
	bool			dtls;
			/**< TRUE if continue to SEC DTLS encryption */
	ioc_fm_pcd_manip_hdr_qos_src   qos_src;
			/**< TODO */
} ioc_fm_pcd_manip_special_offload_capwap_params_t;

/*
 * @Description   Parameters for defining special offload manipulation
 */
typedef struct ioc_fm_pcd_manip_special_offload_params_t {
	ioc_fm_pcd_manip_special_offload_type		type;
		/**< Type of special offload manipulation */
	union {
	ioc_fm_pcd_manip_special_offload_ipsec_params_t ipsec;
		/**< Parameters for IPSec; Relevant when type =
		 * e_IOC_FM_PCD_MANIP_SPECIAL_OFFLOAD_IPSEC
		 */

	ioc_fm_pcd_manip_special_offload_capwap_params_t capwap;
		/**< Parameters for CAPWAP; Relevant when type =
		 * e_FM_PCD_MANIP_SPECIAL_OFFLOAD_CAPWAP
		 */
	} u;
} ioc_fm_pcd_manip_special_offload_params_t;

/*
 * @Description   Parameters for defining generic removal manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_rmv_generic_params_t {
	uint8_t			offset;
		/**< Offset from beginning of header to the start location of
		 * the removal
		 */
	uint8_t			size;	/**< Size of removed section */
} ioc_fm_pcd_manip_hdr_rmv_generic_params_t;

/*
 * @Description   Parameters for defining insertion manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_insrt_t {
	uint8_t size;		/**< size of inserted section */
	uint8_t *p_data;	/**< data to be inserted */
} ioc_fm_pcd_manip_hdr_insrt_t;

/*
 * @Description   Parameters for defining generic insertion manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_insrt_generic_params_t {
	uint8_t			offset;
			/**< Offset from beginning of header to the start
			 * location of the insertion
			 */
	uint8_t			size;	/**< Size of inserted section */
	bool			replace;
			/**< TRUE to override (replace) existing data at
			 * 'offset', FALSE to insert
			 */
	uint8_t			*p_data;
			/**< Pointer to data to be inserted */
} ioc_fm_pcd_manip_hdr_insrt_generic_params_t;

/*
 * @Description   Parameters for defining header manipulation VLAN DSCP To Vpri
 *		  translation
 */
typedef struct ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t {
	uint8_t		dscp_to_vpri_table[IOC_FM_PCD_MANIP_DSCP_TO_VLAN_TRANS];
		/**< A table of VPri values for each DSCP value; The index is
		 * the D_SCP value (0-0x3F) and the value is the corresponding
		 * VPRI (0-15).
		 */
	uint8_t		vpri_def_val;
		/**< 0-7, Relevant only if update_type =
		 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN, this field
		 * is the Q Tag default value if the IP header is not found.
		 */
} ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t;

/*
 * @Description   Parameters for defining header manipulation VLAN fields
 *		  updates
 */
typedef struct ioc_fm_pcd_manip_hdr_field_update_vlan_t {
	ioc_fm_pcd_manip_hdr_field_update_vlan  update_type;
		/**< Selects VLAN update type */
	union {
	uint8_t					vpri;
		/**< 0-7, Relevant only if If update_type =
		 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN_PRI, this is the new
		 * VLAN pri.
		 */
	ioc_fm_pcd_manip_hdr_field_update_vlan_dscp_to_vpri_t	dscp_to_vpri;
		/**<  Parameters structure, Relevant only if update_type =
		 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_DSCP_TO_VLAN.
		 */
	} u;
} ioc_fm_pcd_manip_hdr_field_update_vlan_t;

/*
 * @Description   Parameters for defining header manipulation IPV4 fields
 *		  updates
 */
typedef struct ioc_fm_pcd_manip_hdr_field_update_ipv4_t {
	ioc_ipv4_hdr_manip_update_flags_t	valid_updates;
			/**< ORed flag, selecting the required updates */
	uint8_t		tos;
			/**< 8 bit New TOS; Relevant if valid_updates contains
			 * IOC_HDR_MANIP_IPV4_TOS
			 */
	uint16_t	id;
			/**< 16 bit New IP ID; Relevant only if
			 * valid_updates contains IOC_HDR_MANIP_IPV4_ID
			 */
	uint32_t	src;
			/**< 32 bit New IP SRC; Relevant only if
			 * valid_updates contains IOC_HDR_MANIP_IPV4_SRC
			 */
	uint32_t	dst;
			/**< 32 bit New IP DST; Relevant only if
			 * valid_updates contains IOC_HDR_MANIP_IPV4_DST
			 */
} ioc_fm_pcd_manip_hdr_field_update_ipv4_t;

/*
 * @Description   Parameters for defining header manipulation IPV6 fields
 *		  updates
 */
typedef struct ioc_fm_pcd_manip_hdr_field_update_ipv6_t {
	ioc_ipv6_hdr_manip_update_flags_t	valid_updates;
			/**< ORed flag, selecting the required updates */
	uint8_t		traffic_class;
			/**< 8 bit New Traffic Class; Relevant if valid_updates
			 * contains IOC_HDR_MANIP_IPV6_TC
			 */
	uint8_t		src[ioc_net_hf_ipv6_addr_size];
			/**< 16 byte new IP SRC; Relevant only if valid_updates
			 * contains IOC_HDR_MANIP_IPV6_SRC
			 */
	uint8_t		dst[ioc_net_hf_ipv6_addr_size];
			/**< 16 byte new IP DST; Relevant only if valid_updates
			 * contains IOC_HDR_MANIP_IPV6_DST
			 */
} ioc_fm_pcd_manip_hdr_field_update_ipv6_t;

/*
 * @Description   Parameters for defining header manipulation TCP/UDP fields
 *		  updates
 */
typedef struct ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t {
	ioc_tcp_udp_hdr_manip_update_flags_t	valid_updates;
			/**< ORed flag, selecting the required updates */
	uint16_t	src;
			/**< 16 bit New TCP/UDP SRC; Relevant only if
			 * valid_updates contains IOC_HDR_MANIP_TCP_UDP_SRC
			 */
	uint16_t	dst;
			/**< 16 bit New TCP/UDP DST; Relevant only if
			 * valid_updates contains IOC_HDR_MANIP_TCP_UDP_DST
			 */
} ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t;

/*
 * @Description   Parameters for defining header manipulation fields updates
 */
typedef struct ioc_fm_pcd_manip_hdr_field_update_params_t {
	ioc_fm_pcd_manip_hdr_field_update_type	type;
			/**< Type of header field update manipulation */
	union {
	ioc_fm_pcd_manip_hdr_field_update_vlan_t	vlan;
			/**< Parameters for VLAN update. Relevant when type =
			 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_VLAN
			 */
	ioc_fm_pcd_manip_hdr_field_update_ipv4_t	ipv4;
			/**< Parameters for IPv4 update. Relevant when type =
			 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV4
			 */
	ioc_fm_pcd_manip_hdr_field_update_ipv6_t	ipv6;
			/**< Parameters for IPv6 update. Relevant when type =
			 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_IPV6
			 */
	ioc_fm_pcd_manip_hdr_field_update_tcp_udp_t tcp_udp;
			/**< Parameters for TCP/UDP update. Relevant when type =
			 * e_IOC_FM_PCD_MANIP_HDR_FIELD_UPDATE_TCP_UDP
			 */
	} u;
} ioc_fm_pcd_manip_hdr_field_update_params_t;

/*
 * @Description   Parameters for defining custom header manipulation for IP
 *		  replacement
 */
typedef struct ioc_fm_pcd_manip_hdr_custom_ip_hdr_replace_t {
	ioc_fm_pcd_manip_hdr_custom_ip_replace  replace_type;
			/**< Selects replace update type */
	bool	dec_ttl_hl;
			/**< Decrement TTL (IPV4) or Hop limit (IPV6) by 1 */
	bool	update_ipv4_id;
			/**< Relevant when replace_type =
			 * e_IOC_FM_PCD_MANIP_HDR_CUSTOM_REPLACE_IPV6_BY_IPV4
			 */
	uint16_t id;
		/**< 16 bit New IP ID; Relevant only if update_ipv4_id = TRUE */
	uint8_t	hdr_size;
			/**< The size of the new IP header */
	uint8_t	hdr[IOC_FM_PCD_MANIP_MAX_HDR_SIZE];
			/**< The new IP header */
} ioc_fm_pcd_manip_hdr_custom_ip_hdr_replace_t;

/*
 * @Description   Parameters for defining custom header manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_custom_params_t {
	ioc_fm_pcd_manip_hdr_custom_type		type;
			/**< Type of header field update manipulation */
	union {
	ioc_fm_pcd_manip_hdr_custom_ip_hdr_replace_t	ip_hdr_replace;
			/**< Parameters IP header replacement */
	} u;
} ioc_fm_pcd_manip_hdr_custom_params_t;

/*
 * @Description   Parameters for defining specific L2 insertion manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t {
	ioc_fm_pcd_manip_hdr_insrt_specific_l2  specific_l2;
			/**< Selects which L2 headers to insert */
	bool					update;
			/**< TRUE to update MPLS header */
	uint8_t				size;
			/**< size of inserted section */
	uint8_t				*p_data;
			/**< data to be inserted */
} ioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t;

/*
 * @Description   Parameters for defining IP insertion manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_insrt_ip_params_t {
	bool	calc_l4_checksum;
			/**< Calculate L4 checksum. */
	ioc_fm_pcd_manip_hdr_qos_mapping_mode   mapping_mode;
			/**< TODO */
	uint8_t last_pid_offset;
			/**< the offset of the last Protocol within the inserted
			 * header
			 */
	uint16_t  id;	/**< 16 bit New IP ID */
	bool	donot_frag_overwrite;
			/**< IPv4 only. DF is overwritten with the hash-result
			 * next-to-last byte. This byte is configured to be
			 * overwritten when RPD is set.
			 */
	uint8_t	last_dst_offset;
			/**< IPv6 only. if routing extension exist, user should
			 * set the offset of the destination address in order
			 * to calculate UDP checksum pseudo header; Otherwise
			 * set it to '0'.
			 */
	ioc_fm_pcd_manip_hdr_insrt_t insrt;
			/**< size and data to be inserted. */
} ioc_fm_pcd_manip_hdr_insrt_ip_params_t;

/*
 * @Description   Parameters for defining header insertion manipulation by
 *		  header type
 */
typedef struct ioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t {
	ioc_fm_pcd_manip_hdr_insrt_by_hdr_type	type;
			/**< Selects manipulation type */
	union {
	ioc_fm_pcd_manip_hdr_insrt_specific_l2_params_t  specific_l2_params;
			/**< Used when type =
			 * e_IOC_FM_PCD_MANIP_INSRT_BY_HDR_SPECIFIC_L2: Selects
			 * which L2 headers to remove
			 */
	ioc_fm_pcd_manip_hdr_insrt_ip_params_t	ip_params;
			/**< Used when type = e_FM_PCD_MANIP_INSRT_BY_HDR_IP */
	ioc_fm_pcd_manip_hdr_insrt_t		insrt;
			/**< Used when type is one of
			 * e_FM_PCD_MANIP_INSRT_BY_HDR_UDP,
			 * e_FM_PCD_MANIP_INSRT_BY_HDR_UDP_LITE, or
			 * e_FM_PCD_MANIP_INSRT_BY_HDR_CAPWAP
			 */
	} u;
} ioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t;

/*
 * @Description   Parameters for defining header insertion manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_insrt_params_t {
	ioc_fm_pcd_manip_hdr_insrt_type			type;
			/**< Type of insertion manipulation */
	union {
	ioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t	by_hdr;
			/**< Parameters for defining header insertion
			 * manipulation by header type, relevant if 'type' =
			 * e_IOC_FM_PCD_MANIP_INSRT_BY_HDR
			 */
	ioc_fm_pcd_manip_hdr_insrt_generic_params_t	generic;
			/**< Parameters for defining generic header insertion
			 * manipulation, relevant if type =
			 * e_IOC_FM_PCD_MANIP_INSRT_GENERIC
			 */
	} u;
} ioc_fm_pcd_manip_hdr_insrt_params_t;

/*
 * @Description   Parameters for defining header removal manipulation
 */
typedef struct ioc_fm_pcd_manip_hdr_rmv_params_t {
	ioc_fm_pcd_manip_hdr_rmv_type		type;
			/**< Type of header removal manipulation */
	union {
	ioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t   by_hdr;
			/**< Parameters for defining header removal manipulation
			 * by header type, relevant if type =
			 * e_IOC_FM_PCD_MANIP_RMV_BY_HDR
			 */
	ioc_fm_pcd_manip_hdr_rmv_generic_params_t  generic;
			/**< Parameters for defining generic header removal
			 * manipulation, relevant if type =
			 * e_IOC_FM_PCD_MANIP_RMV_GENERIC
			 */
	} u;
} ioc_fm_pcd_manip_hdr_rmv_params_t;

/*
 * @Description   Parameters for defining header manipulation node
 */
typedef struct ioc_fm_pcd_manip_hdr_params_t {
	bool					rmv;
			/**< TRUE, to define removal manipulation */
	ioc_fm_pcd_manip_hdr_rmv_params_t	rmv_params;
			/**< Parameters for removal manipulation, relevant if
			 * 'rmv' = TRUE
			 */

	bool					insrt;
			/**< TRUE, to define insertion manipulation */
	ioc_fm_pcd_manip_hdr_insrt_params_t	insrt_params;
			/**< Parameters for insertion manipulation, relevant if
			 * 'insrt' = TRUE
			 */

	bool					field_update;
			/**< TRUE, to define field update manipulation */
	ioc_fm_pcd_manip_hdr_field_update_params_t  field_update_params;
			/**< Parameters for field update manipulation, relevant
			 * if 'fieldUpdate' = TRUE
			 */

	bool					custom;
			/**< TRUE, to define custom manipulation */
	ioc_fm_pcd_manip_hdr_custom_params_t	custom_params;
			/**< Parameters for custom manipulation, relevant if
			 * 'custom' = TRUE
			 */

	bool				donot_parse_after_manip;
			/**< FALSE to activate the parser a second time after
			 * completing the manipulation on the frame
			 */
} ioc_fm_pcd_manip_hdr_params_t;

/*
 * @Description   structure for defining fragmentation manipulation
 */
typedef struct ioc_fm_pcd_manip_frag_params_t {
	ioc_net_header_type			hdr;
			/**< Header selection */
	union {
	ioc_fm_pcd_manip_frag_capwap_params_t	capwap_frag;
			/**< Parameters for defining CAPWAP fragmentation,
			 * relevant if 'hdr' = HEADER_TYPE_CAPWAP
			 */
	ioc_fm_pcd_manip_frag_ip_params_t   ip_frag;
			/**< Parameters for defining IP fragmentation, relevant
			 * if 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6
			 */
	} u;
} ioc_fm_pcd_manip_frag_params_t;

/*
 * @Description   structure for defining reassemble manipulation
 */
typedef struct ioc_fm_pcd_manip_reassem_params_t {
	ioc_net_header_type			hdr;
			/**< Header selection */
	union {
	ioc_fm_pcd_manip_reassem_capwap_params_t capwap_reassem;
			/**< Parameters for defining CAPWAP reassembly, relevant
			 * if 'hdr' = HEADER_TYPE_CAPWAP
			 */
	ioc_fm_pcd_manip_reassem_ip_params_t	ip_reassem;
			/**< Parameters for defining IP reassembly, relevant if
			 * 'hdr' = HEADER_TYPE_Ipv4 or HEADER_TYPE_Ipv6
			 */
	} u;
} ioc_fm_pcd_manip_reassem_params_t;

/*
 * @Description   Parameters for defining a manipulation node
 */
struct fm_pcd_manip_params_t {
	ioc_fm_pcd_manip_type type;
		/**< Selects type of manipulation node */
	union {
		ioc_fm_pcd_manip_hdr_params_t hdr;
			/**< Parameters for defining header manipulation node */
		ioc_fm_pcd_manip_reassem_params_t reassem;
			/**< Parameters for defining reassembly manipulation
			 * node
			 */
		ioc_fm_pcd_manip_frag_params_t frag;
			/**< Parameters for defining fragmentation manipulation
			 * node
			 */
		ioc_fm_pcd_manip_special_offload_params_t special_offload;
			/**< Parameters for defining special offload
			 * manipulation node
			 */
	} u;
	void *p_next_manip;
		/**< Handle to another (previously defined) manipulation node;
		 * Allows concatenation of manipulation actions. This parameter
		 * is optional and may be NULL.
		 */
};

typedef struct ioc_fm_pcd_manip_params_t {
	struct fm_pcd_manip_params_t param;
	void *id;
} ioc_fm_pcd_manip_params_t;

/*
 * @Description   Structure for retrieving IP reassembly statistics
 */
typedef struct ioc_fm_pcd_manip_reassem_ip_stats_t {
	/* common counters for both IPv4 and IPv6 */
	uint32_t	timeout;
		/**< Counts the number of TimeOut occurrences */
	uint32_t	rfd_pool_busy;
		/**< Counts the number of failed attempts to allocate a
		 * Reassembly Frame Descriptor
		 */
	uint32_t	internal_buffer_busy;
		/**< Counts the number of times an internal buffer busy occurred
		 */
	uint32_t	external_buffer_busy;
		/**< Counts the number of times external buffer busy occurred */
	uint32_t	sg_fragments;
		/**< Counts the number of Scatter/Gather fragments */
	uint32_t	dma_semaphore_depletion;
		/**< Counts the number of failed attempts to allocate a DMA
		 * semaphore
		 */
	uint32_t	non_consistent_sp;
		/**< Counts the number of Non Consistent Storage Profile events
		 * for successfully reassembled frames
		 */
struct {
	uint32_t	successfully_reassembled;
		/**< Counts the number of successfully reassembled frames */
	uint32_t	valid_fragments;
		/**< Counts the total number of valid fragments that have been
		 * processed for all frames
		 */
	uint32_t	processed_fragments;
		/**< Counts the number of processed fragments (valid and error
		 * fragments) for all frames
		 */
	uint32_t	malformed_fragments;
		/**< Counts the number of malformed fragments processed for all
		 * frames
		 */
	uint32_t	discarded_fragments;
		/**< Counts the number of fragments discarded by the reassembly
		 * process
		 */
	uint32_t	auto_learn_busy;
		/**< Counts the number of times a busy condition occurs when
		 * attempting to access an IP-Reassembly Automatic Learning Hash
		 * set
		 */
	uint32_t	more_than16fragments;
		/**< Counts the fragment occurrences in which the number of
		 * fragments-per-frame exceeds 16
		 */
	} specific_hdr_statistics[2];
		/**< slot '0' is for IPv4, slot '1' is for IPv6 */
} ioc_fm_pcd_manip_reassem_ip_stats_t;

/*
 * @Description   Structure for retrieving IP fragmentation statistics
 */
typedef struct ioc_fm_pcd_manip_frag_ip_stats_t {
	uint32_t	total_frames;
			/**< Number of frames that passed through the
			 * manipulation node
			 */
	uint32_t	fragmented_frames;
			/**< Number of frames that were fragmented */
	uint32_t	generated_fragments;
			/**< Number of fragments that were generated */
} ioc_fm_pcd_manip_frag_ip_stats_t;

/*
 * @Description   Structure for retrieving CAPWAP reassembly statistics
 */
typedef struct ioc_fm_pcd_manip_reassem_capwap_stats_t {
	uint32_t	timeout;
			/**< Counts the number of timeout occurrences */
	uint32_t	rfd_pool_busy;
			/**< Counts the number of failed attempts to allocate a
			 * Reassembly Frame Descriptor
			 */
	uint32_t	internal_buffer_busy;
			/**< Counts the number of times an internal buffer busy
			 * occurred
			 */
	uint32_t	external_buffer_busy;
			/**< Counts the number of times external buffer busy
			 * occurred
			 */
	uint32_t	sg_fragments;
			/**< Counts the number of Scatter/Gather fragments */
	uint32_t	dma_semaphore_depletion;
			/**< Counts the number of failed attempts to allocate a
			 * DMA semaphore
			 */
	uint32_t	successfully_reassembled;
			/**< Counts the number of successfully reassembled
			 * frames
			 */
	uint32_t	valid_fragments;
			/**< Counts the total number of valid fragments that
			 * have been processed for all frames
			 */
	uint32_t	processed_fragments;
			/**< Counts the number of processed fragments (valid and
			 * error fragments) for all frames
			 */
	uint32_t	malformed_fragments;
			/**< Counts the number of malformed fragments processed
			 * for all frames
			 */
	uint32_t	auto_learn_busy;
			/**< Counts the number of times a busy condition occurs
			 * when attempting to access an Reassembly Automatic
			 * Learning Hash set
			 */
	uint32_t	discarded_fragments;
			/**< Counts the number of fragments discarded by the
			 * reassembly process
			 */
	uint32_t	more_than16fragments;
			/**< Counts the fragment occurrences in which the number
			 * of fragments-per-frame exceeds 16
			 */
	uint32_t	exceed_max_reassembly_frame_len;
			/**< ounts the number of times that a successful
			 * reassembled frame length exceeds
			 * MaxReassembledFrameLength value
			 */
} ioc_fm_pcd_manip_reassem_capwap_stats_t;

/*
 * @Description   Structure for retrieving CAPWAP fragmentation statistics
 */
typedef struct ioc_fm_pcd_manip_frag_capwap_stats_t {
	uint32_t	total_frames;
			/**< Number of frames that passed through the
			 * manipulation node
			 */
	uint32_t	fragmented_frames;
			/**< Number of frames that were fragmented */
	uint32_t	generated_fragments;
			/**< Number of fragments that were generated */
#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
	uint8_t	sg_allocation_failure;
			/**< Number of allocation failure of s/g buffers */
#endif /* (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0)) */
} ioc_fm_pcd_manip_frag_capwap_stats_t;

/*
 * @Description   Structure for retrieving reassembly statistics
 */
typedef struct ioc_fm_pcd_manip_reassem_stats_t {
	union {
	ioc_fm_pcd_manip_reassem_ip_stats_t  ip_reassem;
			/**< Structure for IP reassembly statistics */
	ioc_fm_pcd_manip_reassem_capwap_stats_t  capwap_reassem;
			/**< Structure for CAPWAP reassembly statistics */
	} u;
} ioc_fm_pcd_manip_reassem_stats_t;

/*
 * @Description   structure for retrieving fragmentation statistics
 */
typedef struct ioc_fm_pcd_manip_frag_stats_t {
	union {
	ioc_fm_pcd_manip_frag_ip_stats_t	ip_frag;
			/**< Structure for IP fragmentation statistics */
	ioc_fm_pcd_manip_frag_capwap_stats_t capwap_frag;
			/**< Structure for CAPWAP fragmentation statistics */
	} u;
} ioc_fm_pcd_manip_frag_stats_t;

/*
 * @Description   structure for defining manipulation statistics
 */
typedef struct ioc_fm_pcd_manip_stats_t {
	union {
	ioc_fm_pcd_manip_reassem_stats_t  reassem;
				/**< Structure for reassembly statistics */
	ioc_fm_pcd_manip_frag_stats_t	frag;
				/**< Structure for fragmentation statistics */
	} u;
} ioc_fm_pcd_manip_stats_t;

/*
 * @Description   Parameters for acquiring manipulation statistics
 */
typedef struct ioc_fm_pcd_manip_get_stats_t {
	void				*id;
	ioc_fm_pcd_manip_stats_t	stats;
} ioc_fm_pcd_manip_get_stats_t;

/*
 * @Description   Parameters for defining frame replicator group and its members
 */
struct fm_pcd_frm_replic_group_params_t {
	uint8_t			max_num_of_entries;
				/**< Maximal number of members in the group -
				 * must be at least two
				 */
	uint8_t			num_of_entries;
				/**< Number of members in the group - must be at
				 * least 1
				 */
	ioc_fm_pcd_cc_next_engine_params_t
		next_engine_params[IOC_FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES];
				/**< Array of members' parameters */
};

typedef struct ioc_fm_pcd_frm_replic_group_params_t {
	struct fm_pcd_frm_replic_group_params_t param;
	void *id;
} ioc_fm_pcd_frm_replic_group_params_t;

typedef struct ioc_fm_pcd_frm_replic_member_t {
	void *h_replic_group;
	uint16_t member_index;
} ioc_fm_pcd_frm_replic_member_t;

typedef struct ioc_fm_pcd_frm_replic_member_params_t {
	ioc_fm_pcd_frm_replic_member_t member;
	ioc_fm_pcd_cc_next_engine_params_t next_engine_params;
} ioc_fm_pcd_frm_replic_member_params_t;


typedef struct ioc_fm_pcd_cc_key_statistics_t {
	uint32_t	byte_count;
			/**< This counter reflects byte count of frames that
			 * were matched by this key.
			 */
	uint32_t	frame_count;
			/**< This counter reflects count of frames that were
			 * matched by this key.
			 */
	uint32_t	frame_length_range_count[IOC_FM_PCD_CC_STATS_MAX_FLR];
			/**< These counters reflect how many frames matched this
			 * key in 'RMON' statistics mode: Each counter holds the
			 * number of frames of a specific frames length range,
			 * according to the ranges provided at initialization.
			 */
} ioc_fm_pcd_cc_key_statistics_t;


typedef struct ioc_fm_pcd_cc_tbl_get_stats_t {
	void				*id;
	uint16_t			key_index;
	ioc_fm_pcd_cc_key_statistics_t  statistics;
} ioc_fm_pcd_cc_tbl_get_stats_t;

/*
 * @Function	  fm_pcd_match_table_get_key_statistics
 *
 * @Description   This routine may be used to get statistics counters of
 *		  specific key in a CC Node.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames passed that were
 *		  matched this key; The total frames count will be returned in
 *		  the counter of the first range (as only one frame length range
 *		  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for
 *		  this node, the total frame count will be separated to frame
 *		  length counters, based on provided frame length ranges.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_index		Key index for adding
 * @Param[out]	  p_key_statistics	Key statistics counters
 *
 * @Return	  The specific key statistics.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
#define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), \
		      ioc_fm_pcd_cc_tbl_get_stats_t)

/*
 * @Function	  fm_pcd_match_table_get_miss_statistics
 *
 * @Description   This routine may be used to get statistics counters of miss
 *		  entry in a CC Node.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames were not matched
 *		  to any existing key and therefore passed through the miss
 *		  entry; The total frames count will be returned in the counter
 *		  of the first range (as only one frame length range was
 *		  defined).
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[out]	  p_miss_statistics	Statistics counters for 'miss'
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */

#define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), \
		      ioc_fm_pcd_cc_tbl_get_stats_t)

/*
 * @Function	  fm_pcd_hash_table_get_miss_statistics
 *
 * @Description   This routine may be used to get statistics counters of 'miss'
 *		  entry of the a hash table.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames were not matched
 *		  to any existing key and therefore passed through the miss
 *		  entry;
 *
 * @Param[in]	  h_hash_tbl		A handle to a hash table
 * @Param[out]	  p_miss_statistics	Statistics counters for 'miss'
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
#define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), \
		      ioc_fm_pcd_cc_tbl_get_stats_t)

/*
 * @Function	  fm_pcd_net_env_characteristics_set
 *
 * @Description   Define a set of Network Environment Characteristics.
 *
 *		  When setting an environment it is important to understand its
 *		  application. It is not meant to describe the flows that will
 *		  run on the ports using this environment, but what the user
 *		  means TO DO with the PCD mechanisms in order to
 *		  parse-classify-distribute those frames.
 *		  By specifying a distinction unit, the user means it would use
 *		  that option for distinction between frames at either a KeyGen
 *		  scheme or a coarse classification action descriptor. Using
 *		  interchangeable headers to define a unit means that the user
 *		  is indifferent to which of the interchangeable headers is
 *		  present in the frame, and wants the distinction to be based on
 *		  the presence of either one of them.
 *
 *		  Depending on context, there are limitations to the use of
 *		  environments. A port using the PCD functionality is bound to
 *		  an environment. Some or even all ports may share an
 *		  environment but also an environment per port is possible. When
 *		  initializing a scheme, a classification plan group (see
 *		  below), or a coarse classification tree, one of the
 *		  initialized environments must be stated and related to. When a
 *		  port is bound to a scheme, a classification plan group, or a
 *		  coarse classification tree, it MUST be bound to the same
 *		  environment.
 *
 *		  The different PCD modules, may relate (for flows definition)
 *		  ONLY on distinction units as defined by their environment.
 *		  When initializing a scheme for example, it may not choose to
 *		  select IPV4 as a match for recognizing flows unless it was
 *		  defined in the relating environment. In fact, to guide the
 *		  user through the configuration of the PCD, each module's
 *		  characterization in terms of flows is not done using protocol
 *		  names, but using environment indexes.
 *
 *		  In terms of HW implementation, the list of distinction units
 *		  sets the LCV vectors and later used for match vector,
 *		  classification plan vectors and coarse classification
 *		  indexing.
 *
 * @Param[in,out] ioc_fm_pcd_net_env_params_t	A structure defining the
 *						distinction units for this
 *						configuration.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(20), \
		      ioc_fm_pcd_net_env_params_t)

/*
 * @Function	  fm_pcd_net_env_characteristics_delete
 *
 * @Description   Deletes a set of Network Environment Charecteristics.
 *
 * @Param[in]	  ioc_fm_obj_t		The id of a Network Environment object.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(21), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_kg_scheme_set
 *
 * @Description   Initializing or modifying and enabling a scheme for the
 *		  KeyGen. This routine should be called for adding or modifying
 *		  a scheme. When a scheme needs modifying, the API requires that
 *		  it will be rewritten. In such a case 'modify' should be TRUE.
 *		  If the routine is called for a valid scheme and 'modify' is
 *		  FALSE, it will return error.
 *
 * @Param[in,out] ioc_fm_pcd_kg_scheme_params_t		A structure of
 *							parameters for defining
 *							the scheme
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_KG_SCHEME_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(24), \
		      ioc_fm_pcd_kg_scheme_params_t)

/*
 * @Function	  fm_pcd_kg_scheme_delete
 *
 * @Description   Deleting an initialized scheme.
 *
 * @Param[in]	  ioc_fm_obj_t	scheme id as initialized by application at
 *				FM_PCD_IOC_KG_SET_SCHEME
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_KG_SCHEME_DELETE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(25), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_cc_root_build
 *
 * @Description   This routine must be called to define a complete coarse
 *		  classification tree. This is the way to define coarse
 *		  classification to a certain flow - the KeyGen schemes may
 *		  point only to trees defined in this way.
 *
 * @Param[in,out] ioc_fm_pcd_cc_tree_params_t	A structure of parameters to
 *						define the tree.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_CC_ROOT_BUILD \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(26), void *)
		/* workaround ...*/

/*
 * @Function	  fm_pcd_cc_root_delete
 *
 * @Description   Deleting a built tree.
 *
 * @Param[in]	  ioc_fm_obj_t - The id of a CC tree.
 */
#define FM_PCD_IOC_CC_ROOT_DELETE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(27), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_match_table_set
 *
 * @Description   This routine should be called for each CC (coarse
 *		  classification) node. The whole CC tree should be built bottom
 *		  up so that each node points to already defined nodes. p_NodeId
 *		  returns the node Id to be used by other nodes.
 *
 * @Param[in,out] ioc_fm_pcd_cc_node_params_t	A structure for defining the CC
 *						node params
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_MATCH_TABLE_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(28), void *)
		/* workaround ...*/

/*
 * @Function	  fm_pcd_match_table_delete
 *
 * @Description   Deleting a built node.
 *
 * @Param[in]	  ioc_fm_obj_t - The id of a CC node.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_MATCH_TABLE_DELETE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(29), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_cc_root_modify_next_engine
 *
 * @Description   Modify the Next Engine Parameters in the entry of the tree.
 *
 * @Param[in]	  ioc_fm_pcd_cc_tree_modify_next_engine_params_t
 *		  Pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_cc_root_build().
 */
#define FM_PCD_IOC_CC_ROOT_MODIFY_NEXT_ENGINE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(30), \
		     ioc_fm_pcd_cc_tree_modify_next_engine_params_t)

/*
 * @Function	  fm_pcd_match_table_modify_next_engine
 *
 * @Description   Modify the Next Engine Parameters in the relevant key entry of
 *		  the node.
 *
 * @Param[in]	  ioc_fm_pcd_cc_node_modify_next_engine_params_t
 *		  A pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
#define FM_PCD_IOC_MATCH_TABLE_MODIFY_NEXT_ENGINE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(31), \
		     ioc_fm_pcd_cc_node_modify_next_engine_params_t)

/*
 * @Function	  fm_pcd_match_table_modify_miss_next_engine
 *
 * @Description   Modify the Next Engine Parameters of the Miss key case of the
 *		  node.
 *
 * @Param[in]	  ioc_fm_pcd_cc_node_modify_next_engine_params_t
 *		  Pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
#define FM_PCD_IOC_MATCH_TABLE_MODIFY_MISS_NEXT_ENGINE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(32), \
		     ioc_fm_pcd_cc_node_modify_next_engine_params_t)

/*
 * @Function	  fm_pcd_match_table_remove_key
 *
 * @Description   Remove the key (including next engine parameters of this key)
 *		  defined by the index of the relevant node.
 *
 * @Param[in]	  ioc_fm_pcd_cc_node_remove_key_params_t
 *		  A pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only after fm_pcd_match_table_set() has been called
 *		  for this node and for all of the nodes that lead to it.
 */
#define FM_PCD_IOC_MATCH_TABLE_REMOVE_KEY \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(33), \
		     ioc_fm_pcd_cc_node_remove_key_params_t)

/*
 * @Function	  fm_pcd_match_table_add_key
 *
 * @Description   Add the key (including next engine parameters of this key in
 *		  the index defined by the key_index. Note that
 *		  'FM_PCD_LAST_KEY_INDEX' may be used when the user don't care
 *		  about the position of the key in the table - in that case, the
 *		  key will be automatically added by the driver in the last
 *		  available entry.
 *
 * @Param[in]	  ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t
 *		  A pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only after fm_pcd_match_table_set() has been called
 *		  for this node and for all of the nodes that lead to it.
 */
#define FM_PCD_IOC_MATCH_TABLE_ADD_KEY \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(34), \
		     ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)

/*
 * @Function	  fm_pcd_match_table_modify_key_and_next_engine
 *
 * @Description   Modify the key and Next Engine Parameters of this key in the
 *		  index defined by key_index.
 *
 * @Param[in]	  ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t
 *		  A pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() not only of
 *		  the relevnt node but also the node that points to this node.
 */
#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_AND_NEXT_ENGINE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(35), \
		     ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)

/*
 * @Function	  fm_pcd_match_table_modify_key
 *
 * @Description   Modify the key at the index defined by key_index.
 *
 * @Param[in]	  ioc_fm_pcd_cc_node_modify_key_params_t - Pointer to a
 * structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only after fm_pcd_match_table_set() has been called
 *		  for this node and for all of the nodes that lead to it.
 */
#define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(36), \
		     ioc_fm_pcd_cc_node_modify_key_params_t)

/*
 * @Function	  fm_pcd_hash_table_set
 *
 * @Description   This routine initializes a hash table structure.
 *		  KeyGen hash result determines the hash bucket.
 *		  Next, KeyGen key is compared against all keys of this bucket
 *		  (exact match).
 *		  Number of sets (number of buckets) of the hash equals to the
 *		  number of 1-s in 'hash_res_mask' in the provided parameters.
 *		  Number of hash table ways is then calculated by dividing
 *		  'max_num_of_keys' equally between the hash sets. This is the
 *		  maximal number of keys that a hash bucket may hold.
 *		  The hash table is initialized empty and keys may be added to
 *		  it following the initialization. Keys masks are not supported
 *		  in current hash table implementation. The initialized hash
 *		  table can be integrated as a node in a CC tree.
 *
 * @Param[in,out] ioc_fm_pcd_hash_table_params_t	Pointer to a structure
 *							with the relevant
 *							parameters.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_HASH_TABLE_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), \
		      ioc_fm_pcd_hash_table_params_t)

/*
 * @Function	  fm_pcd_hash_table_delete
 *
 * @Description   This routine deletes the provided hash table and released all
 *		  its allocated resources.
 *
 * @Param[in]	  ioc_fm_obj_t		The ID of a hash table.
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	Allowed only following fm_pcd_hash_table_set().
 */
#define FM_PCD_IOC_HASH_TABLE_DELETE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_hash_table_add_key
 *
 * @Description   This routine adds the provided key (including next engine
 *		  parameters of this key) to the hash table.
 *		  The key is added as the last key of the bucket that it is
 *		  mapped to.
 *
 * @Param[in]	  ioc_fm_pcd_hash_table_add_key_params_t
 *		  Pointer to a structure with the relevant parameters
 *
 * @Return	  0 on success; error code otherwise.
 *
 * @Cautions	Allowed only following fm_pcd_hash_table_set().
 */
#define FM_PCD_IOC_HASH_TABLE_ADD_KEY \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(39), \
		     ioc_fm_pcd_hash_table_add_key_params_t)

/*
 * @Function	  fm_pcd_hash_table_remove_key
 *
 * @Description   This routine removes the requested key (including next engine
 *		  parameters of this key) from the hash table.
 *
 * @Param[in]	  ioc_fm_pcd_hash_table_remove_key_params_t - Pointer to a
 *		  structure with the relevant parameters
 *
 * @Return	  0 on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
#define FM_PCD_IOC_HASH_TABLE_REMOVE_KEY \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(40), \
		     ioc_fm_pcd_hash_table_remove_key_params_t)

/*
 * @Function	  fm_pcd_plcr_profile_set
 *
 * @Description   Sets a profile entry in the policer profile table.
 *		  The routine overrides any existing value.
 *
 * @Param[in,out] ioc_fm_pcd_plcr_profile_params_t	A structure of
 *							parameters for defining
 *							a policer profile entry.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_PLCR_PROFILE_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), \
		      ioc_fm_pcd_plcr_profile_params_t)

/*
 * @Function	  fm_pcd_plcr_profile_delete
 *
 * @Description   Delete a profile entry in the policer profile table.
 *		  The routine set entry to invalid.
 *
 * @Param[in]	  ioc_fm_obj_t		The id of a policer profile.
 *
 * @Return	  0 on success; Error code otherwise.
 */
#define FM_PCD_IOC_PLCR_PROFILE_DELETE  \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_manip_node_set
 *
 * @Description   This routine should be called for defining a manipulation
 *		  node. A manipulation node must be defined before the CC node
 *		  that precedes it.
 *
 * @Param[in]	  ioc_fm_pcd_manip_params_t	A structure of parameters
 *						defining the manipulation.
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 */
#define FM_PCD_IOC_MANIP_NODE_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(43), \
		      ioc_fm_pcd_manip_params_t)

/*
 * @Function	  fm_pcd_manip_node_replace
 *
 * @Description   Change existing manipulation node to be according to new
 *		  requirement. (Here, it's implemented as a variant of the same
 *		  IOCTL as for fm_pcd_manip_node_set(), and one that when
 *		  called, the 'id' member in its 'ioc_fm_pcd_manip_params_t'
 *		  argument is set to contain the manip node's handle)
 *
 * @Param[in]	  ioc_fm_pcd_manip_params_t	A structure of parameters
 *						defining the manipulation.
 *
 * @Return	  0 on success; error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_manip_node_set().
 */
#define FM_PCD_IOC_MANIP_NODE_REPLACE	FM_PCD_IOC_MANIP_NODE_SET

/*
 * @Function	  fm_pcd_manip_node_delete
 *
 * @Description   Delete an existing manipulation node.
 *
 * @Param[in]	  ioc_fm_obj_t	The id of the manipulation node to delete.
 *
 * @Return	  0 on success; error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_manip_node_set().
 */
#define FM_PCD_IOC_MANIP_NODE_DELETE \
		_IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(44), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_manip_get_statistics
 *
 * @Description   Retrieve the manipulation statistics.
 *
 * @Param[in]	  h_manip_node		A handle to a manipulation node.
 * @Param[out]	  p_fm_pcd_manip_stats	A structure for retrieving the
 *					manipulation statistics.
 *
 * @Return	E_OK on success; Error code otherwise.
 *
 * @Cautions	Allowed only following fm_pcd_manip_node_set().
 */
#define FM_PCD_IOC_MANIP_GET_STATS \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(50), \
		      ioc_fm_pcd_manip_get_stats_t)

/*
 * @Function	  fm_pcd_set_advanced_offload_support
 *
 * @Description   This routine must be called in order to support the following
 *		  features: IP-fragmentation, IP-reassembly, IPsec,
 *		  Header-manipulation, frame-replicator.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 *
 * @Return	  0 on success; error code otherwise.
 *
 * @Cautions	  Allowed only when PCD is disabled.
 */
#define FM_PCD_IOC_SET_ADVANCED_OFFLOAD_SUPPORT \
		_IO(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45))

/*
 * @Function	  fm_pcd_frm_replic_set_group
 *
 * @Description   Initialize a Frame Replicator group.
 *
 * @Param[in]	  h_fm_pcd			FM PCD module descriptor.
 * @Param[in]	  p_frm_replic_group_param	A structure of parameters for
 *						the initialization of the frame
 *						replicator group.
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
#define FM_PCD_IOC_FRM_REPLIC_GROUP_SET \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(46), \
		      ioc_fm_pcd_frm_replic_group_params_t)

/*
 * @Function	  fm_pcd_frm_replic_delete_group
 *
 * @Description   Delete a Frame Replicator group.
 *
 * @Param[in]	  h_frm_replic_group  A handle to the frame replicator group.
 *
 * @Return	  E_OK on success;  Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_frm_replic_set_group().
 */
#define FM_PCD_IOC_FRM_REPLIC_GROUP_DELETE \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(47), ioc_fm_obj_t)

/*
 * @Function	  fm_pcd_frm_replic_add_member
 *
 * @Description   Add the member in the index defined by the member_index.
 *
 * @Param[in]	  h_frm_replic_group	A handle to the frame replicator group.
 * @Param[in]	  member_index		Member index for adding.
 * @Param[in]	  p_member_params	A pointer to the new member parameters.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_frm_replic_set_group() of this
 *		  group.
 */
#define FM_PCD_IOC_FRM_REPLIC_MEMBER_ADD \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(48), \
			ioc_fm_pcd_frm_replic_member_params_t)

/*
 * @Function	  fm_pcd_frm_replic_remove_member
 *
 * @Description   Remove the member defined by the index from the relevant group
 *
 * @Param[in]	  h_frm_replic_group	A handle to the frame replicator group.
 * @Param[in]	  member_index		Member index for removing.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_frm_replic_set_group() of this
 *		  group.
 */
#define FM_PCD_IOC_FRM_REPLIC_MEMBER_REMOVE \
		_IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(49), \
		      ioc_fm_pcd_frm_replic_member_t)

/*
 * @Group	  FM_grp Frame Manager API
 *
 * @Description   Frame Manager Application Programming Interface
 *
 * @{
 */

/*
 * @Group	  FM_PCD_grp FM PCD
 *
 * @Description   Frame Manager PCD (Parse-Classify-Distribute) API.
 *
 *		  The FM PCD module is responsible for the initialization of all
 *		  global classifying FM modules. This includes the parser
 *		  general and common registers, the key generator global and
 *		  common registers, and the policer global and common registers.
 *		  In addition, the FM PCD SW module will initialize all required
 *		  key generator schemes, coarse classification flows, and
 *		  policer profiles. When FM module is configured to work with
 *		  one of these entities, it will register to it using the FM
 *		  PORT API. The PCD module will manage the PCD resources - i.e.
 *		  resource management of KeyGen schemes, etc.
 *
 * @{
 */

/*
 * @Collection	  General PCD defines
 */
#define FM_PCD_MAX_NUM_OF_PRIVATE_HDRS		2
/**< Number of units/headers saved for user */

#define FM_PCD_PRS_NUM_OF_HDRS			16
/**< Number of headers supported by HW parser */
#define FM_PCD_MAX_NUM_OF_DISTINCTION_UNITS \
		(32 - FM_PCD_MAX_NUM_OF_PRIVATE_HDRS)
/**< Number of distinction units is limited by register size (32 bits) minus
 *reserved bits for private headers.
 */
#define FM_PCD_MAX_NUM_OF_INTERCHANGEABLE_HDRS	4
/**< Maximum number of interchangeable headers in a distinction unit */
#define FM_PCD_KG_NUM_OF_GENERIC_REGS		FM_KG_NUM_OF_GENERIC_REGS
/**< Total number of generic KeyGen registers */
#define FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY	35
/**< Max number allowed on any configuration; For HW implementation reasons, in
 * most cases less than this will be allowed; The driver will return an
 * initialization error if resource is unavailable.
 */
#define FM_PCD_KG_NUM_OF_EXTRACT_MASKS		4
/**< Total number of masks allowed on KeyGen extractions. */
#define FM_PCD_KG_NUM_OF_DEFAULT_GROUPS		16
/**< Number of default value logical groups */

#define FM_PCD_PRS_NUM_OF_LABELS			32
/**< Maximum number of SW parser labels */
#define FM_SW_PRS_MAX_IMAGE_SIZE \
	(FM_PCD_SW_PRS_SIZE \
	 /*- FM_PCD_PRS_SW_OFFSET -FM_PCD_PRS_SW_TAIL_SIZE*/ \
	 - FM_PCD_PRS_SW_PATCHES_SIZE)
/**< Maximum size of SW parser code */

#define FM_PCD_MAX_MANIP_INSRT_TEMPLATE_SIZE	128
/**< Maximum size of insertion template for insert manipulation */

#define FM_PCD_FRM_REPLIC_MAX_NUM_OF_ENTRIES	64
/**< Maximum possible entries for frame replicator group */
/* @} */

/*
 * @Group	  FM_PCD_init_grp FM PCD Initialization Unit
 *
 * @Description   Frame Manager PCD Initialization Unit API
 *
 * @{
 */

/*
 * @Description   Exceptions user callback routine, will be called upon an
 *		  exception passing the exception identification.
 *
 * @Param[in]	  h_app		User's application descriptor.
 * @Param[in]	  exception	The exception.
 */
typedef void (t_fm_pcd_exception_callback) (t_handle h_app,
					ioc_fm_pcd_exceptions exception);

/*
 * @Description   Exceptions user callback routine, will be called upon an
 *		  exception passing the exception identification.
 *
 * @Param[in]	  h_app		User's application descriptor.
 * @Param[in]	  exception	The exception.
 * @Param[in]	  index		id of the relevant source (may be scheme or
 *				profile id).
 */
typedef void (t_fm_pcd_id_exception_callback) (t_handle	h_app,
					ioc_fm_pcd_exceptions  exception,
					uint16_t	index);

/*
 * @Description   A callback for enqueuing frame onto a QM queue.
 *
 * @Param[in]	  h_qm_arg	Application's handle passed to QM module on
 *				enqueue.
 * @Param[in]	  p_fd		Frame descriptor for the frame.
 *
 * @Return	  E_OK on success; Error code otherwise.
 */
typedef uint32_t (t_fm_pcd_qm_enqueue_callback) (t_handle h_qm_arg, void *p_fd);

/*
 * @Description   Host-Command parameters structure.
 *
 *		  When using Host command for PCD functionalities, a dedicated
 *		  port must be used. If this routine is called for a PCD in a
 *		  single partition environment, or it is the Master partition in
 *		  a Multi-partition environment, The port will be initialized by
 *		  the PCD driver initialization routine.
 */
typedef struct t_fm_pcd_hc_params {
	uintptr_t		port_base_addr;
	/**< Virtual Address of Host-Command Port memory mapped registers.*/
	uint8_t			port_id;
	/**< Port Id (0-6 relative to Host-Command/Offline-Parsing ports);
	 * NOTE: When configuring Host Command port for FMANv3 devices
	 * (DPAA_VERSION 11 and higher), port_id=0 MUST be used.
	 */
	uint16_t			liodn_base;
	/**< LIODN base for this port, to be used together with LIODN offset
	 * (irrelevant for P4080 revision 1.0)
	 */
	uint32_t			err_fqid;
	/**< Host-Command Port error queue Id. */
	uint32_t			conf_fqid;
	/**< Host-Command Port confirmation queue Id. */
	uint32_t			qm_channel;
	/**< QM channel dedicated to this Host-Command port; will be used by the
	 * FM for dequeue.
	 */
	t_fm_pcd_qm_enqueue_callback	*f_qm_enqueue;
	/**< Callback routine for enqueuing a frame to the QM */
	t_handle			h_qm_arg;
	/**< Application's handle passed to QM module on enqueue */
} t_fm_pcd_hc_params;

/*
 * @Description   The main structure for PCD initialization
 */
typedef struct t_fm_pcd_params {
	bool			prs_support;
	/**< TRUE if Parser will be used for any of the FM ports. */
	bool			cc_support;
	/**< TRUE if Coarse Classification will be used for any of the FM ports.
	 */
	bool			kg_support;
	/**< TRUE if KeyGen will be used for any of the FM ports. */
	bool			plcr_support;
	/**< TRUE if Policer will be used for any of the FM ports. */
	t_handle		h_fm;
	/**< A handle to the FM module. */
	uint8_t			num_schemes;
	/**< Number of schemes dedicated to this partition.
	 * this parameter is relevant if 'kg_support'=TRUE.
	 */
	bool			use_host_command;
	/**< Optional for single partition, Mandatory for Multi partition */
	t_fm_pcd_hc_params		hc;
	/**< Host Command parameters, relevant only if 'use_host_command'=TRUE;
	 * Relevant when FM not runs in "guest-mode".
	 */
	t_fm_pcd_exception_callback	*f_exception;
	/**< Callback routine for general PCD exceptions; Relevant when FM not
	 * runs in "guest-mode".
	 */
	t_fm_pcd_id_exception_callback	*f_exception_id;
	/**< Callback routine for specific KeyGen scheme or Policer profile
	 * exceptions; Relevant when FM not runs in "guest-mode".
	 */
	t_handle		h_app;
	/**< A handle to an application layer object; This handle will be passed
	 * by the driver upon calling the above callbacks; Relevant when FM not
	 * runs in "guest-mode".
	 */
	uint8_t			part_plcr_profiles_base;
	/**< The first policer-profile-id dedicated to this partition. this
	 * parameter is relevant if 'plcr_support'=TRUE. NOTE: this parameter
	 * relevant only when working with multiple partitions.
	 */
	uint16_t		part_num_of_plcr_profiles;
	/**< Number of policer-profiles dedicated to this partition. This
	 * parameter is relevant if 'plcr_support'=TRUE. NOTE: this parameter
	 * relevant only when working with multiple partitions.
	 */
} t_fm_pcd_params;

typedef struct t_fm_pcd_prs_label_params {
	uint32_t instruction_offset;
	ioc_net_header_type hdr;
	uint8_t index_per_hdr;
} t_fm_pcd_prs_label_params;

typedef struct t_fm_pcd_prs_sw_params {
	bool override;
	uint32_t size;
	uint16_t base;
	uint8_t *p_code;
	uint32_t sw_prs_data_params[FM_PCD_PRS_NUM_OF_HDRS];
	uint8_t num_of_labels;
	t_fm_pcd_prs_label_params labels_table[FM_PCD_PRS_NUM_OF_LABELS];
} t_fm_pcd_prs_sw_params;

/*
 * @Function	  fm_pcd_config
 *
 * @Description   Basic configuration of the PCD module.
 *		  Creates descriptor for the FM PCD module.
 *
 * @Param[in]	  p_fm_pcd_params	A structure of parameters for the
					initialization of PCD.
 *
 * @Return	  A handle to the initialized module.
 */
t_handle fm_pcd_config(t_fm_pcd_params *p_fm_pcd_params);

/*
 * @Function	  fm_pcd_init
 *
 * @Description   Initialization of the PCD module.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 *
 * @Return	  E_OK on success; Error code otherwise.
 */
uint32_t fm_pcd_init(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_free
 *
 * @Description   Frees all resources that were assigned to FM module.
 *		  Calling this routine invalidates the descriptor.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 *
 * @Return	  E_OK on success; Error code otherwise.
 */
uint32_t fm_pcd_free(t_handle h_fm_pcd);

/*
 * @Group	  FM_PCD_advanced_cfg_grp	FM PCD Advanced Configuration
 *						Unit
 *
 * @Description   Frame Manager PCD Advanced Configuration API.
 *
 * @{
 */

/*
 * @Function	  fm_pcd_config_exception
 *
 * @Description   Calling this routine changes the internal driver data base
 *		  from its default selection of exceptions enabling.
 *		  [DEFAULT_num_of_shared_plcr_profiles].
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  exception	The exception to be selected.
 * @Param[in]	  enable	TRUE to enable interrupt, FALSE to mask it.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  This routine should NOT be called from guest-partition (i.e.
 *		  guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_config_exception(t_handle h_fm_pcd,
		ioc_fm_pcd_exceptions exception, bool enable);

/*
 * @Function	  fm_pcd_config_hc_frames_data_memory
 *
 * @Description   Configures memory-partition-id for FMan-Controller
 *		  Host-Command frames. Calling this routine changes the internal
 *		  driver data base from its default configuration [0].
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  mem_id	Memory partition ID.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  This routine may be called only if 'use_host_command' was TRUE
 *		  when fm_pcd_config() routine was called.
 */
uint32_t fm_pcd_config_hc_frames_data_memory(t_handle h_fm_pcd, uint8_t mem_id);

/*
 * @Function	  fm_pcd_config_plcr_num_of_shared_profiles
 *
 * @Description   Calling this routine changes the internal driver data base
 *		  from its default selection of exceptions enablement.
 *		  [DEFAULT_num_of_shared_plcr_profiles].
 *
 * @Param[in]	  h_fm_pcd			FM PCD module descriptor.
 * @Param[in]	  num_of_shared_plcr_profiles	Number of profiles to be shared
 *						between ports on this partition
 *
 * @Return	  E_OK on success; Error code otherwise.
 */
uint32_t fm_pcd_config_plcr_num_of_shared_profiles(t_handle h_fm_pcd,
		uint16_t num_of_shared_plcr_profiles);

/*
 * @Function	  fm_pcd_config_plcr_auto_refresh_mode
 *
 * @Description   Calling this routine changes the internal driver data base
 *		  from its default selection of exceptions enablement. By
 *		  default auto-refresh is [DEFAULT_plcrAutoRefresh].
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  enable	TRUE to enable, FALSE to disable
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_config_plcr_auto_refresh_mode(t_handle h_fm_pcd, bool enable);

/*
 * @Function	  fm_pcd_config_prs_max_cycle_limit
 *
 * @Description   Calling this routine changes the internal data structure for
 *		  the maximum parsing time from its default value
 *		  [DEFAULT_MAX_PRS_CYC_LIM].
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  value		0 to disable the mechanism, or new maximum
 *				parsing time.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_config_prs_max_cycle_limit(t_handle h_fm_pcd, uint16_t value);

/** @} */ /* end of FM_PCD_advanced_cfg_grp group */
/** @} */ /* end of FM_PCD_init_grp group */

/*
 * @Group	  FM_PCD_Runtime_grp FM PCD Runtime Unit
 *
 * @Description   Frame Manager PCD Runtime Unit API
 *
 *		  The runtime control allows creation of PCD infrastructure
 *		  modules such as Network Environment Characteristics,
 *		  Classification Plan Groups and Coarse Classification Trees.
 *		  It also allows on-the-fly initialization, modification and
 *		  removal of PCD modules such as KeyGen schemes, coarse
 *		  classification nodes and Policer profiles.
 *
 *		  In order to explain the programming model of the PCD driver
 *		  interface a few terms should be explained, and will be used
 *		  below.
 *		  - Distinction Header - One of the 16 protocols supported by
 *		    the FM parser, or one of the SHIM headers (1 or 2). May be a
 *		    header with a special option (see below).
 *		  - Interchangeable Headers Group - This is a group of Headers
 *		    recognized by either one of them. For example, if in a
 *		    specific context the user chooses to treat IPv4 and IPV6 in
 *		    the same way, they may create an interchangeable Headers
 *		    Unit consisting of these 2 headers.
 *		  - A Distinction Unit - a Distinction Header or an
 *		    Interchangeable Headers Group.
 *		  - Header with special option - applies to Ethernet, MPLS,
 *		    VLAN, IPv4 and IPv6, includes multicast, broadcast and other
 *		    protocol specific options. In terms of hardware it relates
 *		    to the options available in the classification plan.
 *		  - Network Environment Characteristics - a set of Distinction
 *		    Units that define the total recognizable header selection
 *		    for a certain environment. This is NOT the list of all
 *		    headers that will ever appear in a flow, but rather
 *		    everything that needs distinction in a flow, where
 *		    distinction is made by KeyGen schemes and coarse
 *		    classification action descriptors.
 *
 *		  The PCD runtime modules initialization is done in stages. The
 *		  first stage after initializing the PCD module itself is to
 *		  establish a Network Flows Environment Definition. The
 *		  application may choose to establish one or more such
 *		  environments. Later, when needed, the application will have to
 *		  state, for some of its modules, to which single environment it
 *		  belongs.
 *
 * @{
 */

t_handle fm_pcd_open(t_fm_pcd_params *p_fm_pcd_params);
void fm_pcd_close(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_enable
 *
 * @Description   This routine should be called after PCD is initialized for
 *		  enabling all PCD engines according to their existing
 *		  configuration.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() and when PCD is disabled.
 */
uint32_t fm_pcd_enable(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_disable
 *
 * @Description   This routine may be called when PCD is enabled in order to
 *		  disable all PCD engines. It may be called only when none of
 *		  the ports in the system are using the PCD.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() and when PCD is enabled.
 */
uint32_t fm_pcd_disable(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_get_counter
 *
 * @Description   Reads one of the FM PCD counters.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  counter	The requested counter.
 *
 * @Return	  Counter's current value.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  Note that it is user's responsibility to call this routine
 *		  only for enabled counters, and there will be no indication if
 *		  a disabled counter is accessed.
 */
uint32_t fm_pcd_get_counter(t_handle h_fm_pcd, ioc_fm_pcd_counters counter);

/*
 * @Function	fm_pcd_prs_load_sw
 *
 * @Description	This routine may be called in order to load software parsing
 *		code.
 *
 * @Param[in]	h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	p_sw_prs	A pointer to a structure of software
 *				parser parameters, including the software
 *				parser image.
 *
 * @Return	E_OK on success; Error code otherwise.
 *
 * @Cautions	Allowed only following fm_pcd_init() and when PCD is disabled.
 *		This routine should NOT be called from guest-partition
 *		(i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_prs_load_sw(t_handle h_fm_pcd,
		ioc_fm_pcd_prs_sw_params_t *p_sw_prs);

/*
 * @Function	  fm_pcd_set_advanced_offload_support
 *
 * @Description   This routine must be called in order to support the following
 *		  features: IP-fragmentation, IP-reassembly, IPsec,
 *		  Header-manipulation, frame-replicator.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() and when PCD is disabled.
 *		  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_set_advanced_offload_support(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_kg_set_dflt_value
 *
 * @Description   Calling this routine sets a global default value to be used
 *		  by the KeyGen when parser does not recognize a required
 *		  field/header.
 *		  default value is 0.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  value_id	0,1 - one of 2 global default values.
 * @Param[in]	  value		The requested default value.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() and when PCD is disabled.
 *		  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_kg_set_dflt_value(t_handle h_fm_pcd,
		uint8_t value_id, uint32_t value);

/*
 * @Function	  fm_pcd_kg_set_additional_data_after_parsing
 *
 * @Description   Calling this routine allows the KeyGen to access data past
 *		  the parser finishing point.
 *
 * @Param[in]	  h_fm_pcd		FM PCD module descriptor.
 * @Param[in]	  payload_offset	the number of bytes beyond the parser
 *					location.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() and when PCD is disabled.
 *		  This routine should NOT be called from guest-partition (i.e.
 *		  guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_kg_set_additional_data_after_parsing(t_handle h_fm_pcd,
		uint8_t payload_offset);

/*
 * @Function	  fm_pcd_set_exception
 *
 * @Description   Calling this routine enables/disables PCD interrupts.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  exception	The exception to be selected.
 * @Param[in]	  enable	TRUE to enable interrupt, FALSE to mask it.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_set_exception(t_handle h_fm_pcd,
		ioc_fm_pcd_exceptions exception, bool enable);

/*
 * @Function	  fm_pcd_modify_counter
 *
 * @Description   Sets a value to an enabled counter. Use "0" to reset the
 *		  counter.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  counter	The requested counter.
 * @Param[in]	  value		The requested value to be written into the
 *				counter.
 *
 * @Return	E_OK on success; Error code otherwise.
 *
 * @Cautions	Allowed only following fm_pcd_init().
 *		This routine should NOT be called from guest-partition
 *		(i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_modify_counter(t_handle h_fm_pcd,
		ioc_fm_pcd_counters counter, uint32_t value);

/*
 * @Function	  fm_pcd_set_plcr_statistics
 *
 * @Description   This routine may be used to enable/disable policer statistics
 *		  counter. By default the statistics is enabled.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor
 * @Param[in]	  enable	TRUE to enable, FALSE to disable.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
uint32_t fm_pcd_set_plcr_statistics(t_handle h_fm_pcd, bool enable);

/*
 * @Function	  fm_pcd_set_prs_statistics
 *
 * @Description   Defines whether to gather parser statistics including all
 *		  ports.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  enable	TRUE to enable, FALSE to disable.
 *
 * @Return	  None
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  This routine should NOT be called from guest-partition
 *		  (i.e. guestId != NCSW_PRIMARY_ID)
 */
void fm_pcd_set_prs_statistics(t_handle h_fm_pcd, bool enable);

#if (defined(DEBUG_ERRORS) && (DEBUG_ERRORS > 0))
/*
 * @Function	  fm_pcd_dump_regs
 *
 * @Description   Dumps all PCD registers
 *
 * @Param[in]	  h_fm_pcd	A handle to an FM PCD Module.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  NOTE: this routine may be called only for FM in master mode
 *		  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the
 *		  registers are mapped.
 */
uint32_t fm_pcd_dump_regs(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_kg_dump_regs
 *
 * @Description   Dumps all PCD KG registers
 *
 * @Param[in]	  h_fm_pcd	A handle to an FM PCD Module.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  NOTE: this routine may be called only for FM in master mode
 *		  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the
 *		  registers are mapped.
 */
uint32_t fm_pcd_kg_dump_regs(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_plcr_dump_regs
 *
 * @Description   Dumps all PCD Policer registers
 *
 * @Param[in]	  h_fm_pcd	A handle to an FM PCD Module.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  NOTE: this routine may be called only for FM in master mode
 *		  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the
 *		  registers are mapped.
 */
uint32_t fm_pcd_plcr_dump_regs(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_plcr_profile_dump_regs
 *
 * @Description   Dumps all PCD Policer profile registers
 *
 * @Param[in]	  h_profile	A handle to a Policer profile.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  NOTE: this routine may be called only for FM in master mode
 *		  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the
 *		  registers are mapped.
 */
uint32_t fm_pcd_plcr_profile_dump_regs(t_handle h_profile);

/*
 * @Function	  fm_pcd_prs_dump_regs
 *
 * @Description   Dumps all PCD Parser registers
 *
 * @Param[in]	  h_fm_pcd	A handle to an FM PCD Module.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  NOTE: this routine may be called only for FM in master mode
 *		  (i.e. 'guestId'=NCSW_PRIMARY_ID) or in a case that the
 *		  registers are mapped.
 */
uint32_t fm_pcd_prs_dump_regs(t_handle h_fm_pcd);

/*
 * @Function	  fm_pcd_hc_dump_regs
 *
 * @Description   Dumps HC Port registers
 *
 * @Param[in]	  h_fm_pcd	A handle to an FM PCD Module.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 *		  NOTE: this routine may be called only for FM in master mode
 *		  (i.e. 'guestId'=NCSW_PRIMARY_ID).
 */
uint32_t	fm_pcd_hc_dump_regs(t_handle h_fm_pcd);
#endif /* (defined(DEBUG_ERRORS) && ... */


/*
 * KeyGen	  FM_PCD_Runtime_build_grp FM PCD Runtime Building Unit
 *
 * @Description   Frame Manager PCD Runtime Building API
 *
 *		  This group contains routines for setting, deleting and
 *		  modifying PCD resources, for defining the total PCD tree.
 * @{
 */

/*
 * @Collection	  Definitions of coarse classification
 *		  parameters as required by KeyGen (when coarse classification
 *		  is the next engine after this scheme).
 */
#define FM_PCD_MAX_NUM_OF_CC_TREES		8
#define FM_PCD_MAX_NUM_OF_CC_GROUPS		16
#define FM_PCD_MAX_NUM_OF_CC_UNITS		4
#define FM_PCD_MAX_NUM_OF_KEYS		256
#define FM_PCD_MAX_NUM_OF_FLOWS		(4 * KILOBYTE)
#define FM_PCD_MAX_SIZE_OF_KEY		56
#define FM_PCD_MAX_NUM_OF_CC_ENTRIES_IN_GRP	16
#define FM_PCD_LAST_KEY_INDEX		0xffff

#define FM_PCD_MAX_NUM_OF_CC_NODES	255
			/* Obsolete, not used - will be removed in the future */
/* @} */

/*
 * @Collection	  A set of definitions to allow protocol
 *		  special option description.
 */
typedef uint32_t	protocol_opt_t;
			/**< A general type to define a protocol option. */

typedef protocol_opt_t   eth_protocol_opt_t;
			/**< Ethernet protocol options. */
#define ETH_BROADCAST		0x80000000  /**< Ethernet Broadcast. */
#define ETH_MULTICAST		0x40000000  /**< Ethernet Multicast. */

typedef protocol_opt_t   vlan_protocol_opt_t;	/**< VLAN protocol options. */
#define VLAN_STACKED		0x20000000  /**< Stacked VLAN. */

typedef protocol_opt_t   mpls_protocol_opt_t;	/**< MPLS protocol options. */
#define MPLS_STACKED		0x10000000  /**< Stacked MPLS. */

typedef protocol_opt_t   ipv_4protocol_opt_t;	/**< IPv4 protocol options. */
#define IPV4_BROADCAST_1		0x08000000  /**< IPv4 Broadcast. */
#define IPV4_MULTICAST_1		0x04000000  /**< IPv4 Multicast. */
#define IPV4_UNICAST_2		0x02000000  /**< Tunneled IPv4 - Unicast. */
#define IPV4_MULTICAST_BROADCAST_2  0x01000000
				/**< Tunneled IPv4 - Broadcast/Multicast. */

#define IPV4_FRAG_1		0x00000008
				/**< IPV4 reassembly option. IPV4 Reassembly
				 * manipulation requires network environment
				 * with IPV4 header and IPV4_FRAG_1 option
				 */

typedef protocol_opt_t   ipv_6protocol_opt_t;	/**< IPv6 protocol options. */
#define IPV6_MULTICAST_1	0x00800000  /**< IPv6 Multicast. */
#define IPV6_UNICAST_2		0x00400000  /**< Tunneled IPv6 - Unicast. */
#define IPV6_MULTICAST_2	0x00200000  /**< Tunneled IPv6 - Multicast. */

#define IPV6_FRAG_1		0x00000004
				/**< IPV6 reassembly option. IPV6 Reassembly
				 * manipulation requires network environment
				 * with IPV6 header and IPV6_FRAG_1 option; in
				 * case where fragment found, the
				 * fragment-extension offset may be found at
				 * 'shim2' (in parser-result).
				 */
typedef protocol_opt_t   capwap_protocol_opt_t;	/**< CAPWAP protocol options. */
#define CAPWAP_FRAG_1		0x00000008
				/**< CAPWAP reassembly option. CAPWAP Reassembly
				 * manipulation requires network environment
				 * with CAPWAP header and CAPWAP_FRAG_1 option;
				 * in case where fragment found, the
				 * fragment-extension offset may be found at
				 * 'shim2' (in parser-result).
				 */

/* @} */

#define FM_PCD_MANIP_MAX_HDR_SIZE	256
#define FM_PCD_MANIP_DSCP_TO_VLAN_TRANS	64

/*
 * @Collection	  A set of definitions to support Header Manipulation selection.
 */
typedef uint32_t		hdr_manip_flags_t;
		/**< A general type to define a HMan update command flags. */

typedef hdr_manip_flags_t	ipv_4hdr_manip_update_flags_t;
		/**< IPv4 protocol HMan update command flags. */

#define HDR_MANIP_IPV4_TOS	0x80000000
			/**< update TOS with the given value ('tos' field
			 * of t_FmPcdManipHdrFieldUpdateIpv4)
			 */
#define HDR_MANIP_IPV4_ID	0x40000000
			/**< update IP ID with the given value ('id' field
			 * of t_FmPcdManipHdrFieldUpdateIpv4)
			 */
#define HDR_MANIP_IPV4_TTL	0x20000000
			/**< Decrement TTL by 1 */
#define HDR_MANIP_IPV4_SRC	0x10000000
			/**< update IP source address with the given value
			 * ('src' field of t_FmPcdManipHdrFieldUpdateIpv4)
			 */
#define HDR_MANIP_IPV4_DST	0x08000000
			/**< update IP destination address with the given value
			 * ('dst' field of t_FmPcdManipHdrFieldUpdateIpv4)
			 */

typedef hdr_manip_flags_t	ipv_6hdr_manip_update_flags_t;
			/**< IPv6 protocol HMan update command flags. */

#define HDR_MANIP_IPV6_TC	0x80000000
			/**< update Traffic Class address with the given value
			 * ('trafficClass' field of
			 * t_FmPcdManipHdrFieldUpdateIpv6)
			 */
#define HDR_MANIP_IPV6_HL	0x40000000
			/**< Decrement Hop Limit by 1 */
#define HDR_MANIP_IPV6_SRC	0x20000000
			/**< update IP source address with the given value
			 * ('src' field of t_FmPcdManipHdrFieldUpdateIpv6)
			 */
#define HDR_MANIP_IPV6_DST	0x10000000
			/**< update IP destination address with the given value
			 * ('dst' field of t_FmPcdManipHdrFieldUpdateIpv6)
			 */

typedef hdr_manip_flags_t	tcp_udp_hdr_manip_update_flags_t;
		/**< TCP/UDP protocol HMan update command flags. */

#define HDR_MANIP_TCP_UDP_SRC	0x80000000
		/**< update TCP/UDP source address with the given value
		 * ('src' field of t_FmPcdManipHdrFieldUpdateTcpUdp)
		 */
#define HDR_MANIP_TCP_UDP_DST	0x40000000
		/**< update TCP/UDP destination address with the given value
		 * ('dst' field of t_FmPcdManipHdrFieldUpdateTcpUdp)
		 */
#define HDR_MANIP_TCP_UDP_CHECKSUM  0x20000000
		/**< update TCP/UDP checksum */

/* @} */

/*
 * @Description   A type used for returning the order of the key extraction.
 *		  each value in this array represents the index of the
 *		  extraction command as defined by the user in the
 *		  initialization extraction array. The valid size of this array
 *		  is the user define number of extractions required (also marked
 *		  by the second '0' in this array).
 */
typedef	uint8_t	t_fm_pcd_kg_key_order[FM_PCD_KG_MAX_NUM_OF_EXTRACTS_PER_KEY];

/*
 * @Collection	  Definitions for CC statistics
 */
#define FM_PCD_CC_STATS_MAX_NUM_OF_FLR	10
	/* Maximal supported number of frame length ranges */
#define FM_PCD_CC_STATS_FLR_SIZE	2
	/* Size in bytes of a frame length range limit */
#define FM_PCD_CC_STATS_COUNTER_SIZE	4
	/* Size in bytes of a frame length range counter */
/* @} */

/*
 * @Description   Parameters for defining CC keys parameters
 *		  The driver supports two methods for CC node allocation:
 *		  dynamic and static. Static mode was created in order to
 *		  prevent runtime alloc/free of FMan memory (MURAM), which may
 *		  cause fragmentation; in this mode, the driver automatically
 *		  allocates the memory according to 'max_num_of_keys' parameter.
 *		  The driver calculates the maximal memory size that may be used
 *		  for this CC-Node taking into consideration 'mask_support' and
 *		  'statistics_mode' parameters. When 'action' =
 *		  e_FM_PCD_ACTION_INDEXED_LOOKUP in the extraction parameters of
 *		  this node, 'max_num_of_keys' must be equal to 'num_of_keys'.
 *		  In dynamic mode, 'max_num_of_keys' must be zero. At
 *		  initialization, all required structures are allocated
 *		  according to 'num_of_keys' parameter. During runtime
 *		  modification, these structures are re-allocated according to
 *		  the updated number of keys.
 *
 *		  Please note that 'action' and 'icIndxMask' mentioned in the
 *		  specific parameter explanations are passed in the extraction
 *		  parameters of the node (fields of
 *		  extractCcParams.extractNonHdr).
 */
typedef struct t_keys_params {
	uint16_t	max_num_of_keys;
		/**< Maximum number of keys that will (ever) be used in this
		 * CC-Node; A value of zero may be used for dynamic memory
		 * allocation.
		 */
	bool		mask_support;
		/**< This parameter is relevant only if a node is initialized
		 * with 'action' = e_FM_PCD_ACTION_EXACT_MATCH and
		 * max_num_of_keys > 0; Should be TRUE to reserve table memory
		 * for key masks, even if initial keys do not contain masks, or
		 * if the node was initialized as 'empty' (without keys); this
		 * will allow user to add keys with masks at runtime.
		 * NOTE that if user want to use only global-masks (i.e. one
		 * common mask for all the entries within this table, this
		 * parameter should set to 'FALSE'.
		 */
	ioc_fm_pcd_cc_stats_mode	statistics_mode;
		/**< Determines the supported statistics mode for all node's
		 * keys. To enable statistics gathering, statistics should be
		 * enabled per every key, using 'statisticsEn' in next engine
		 * parameters structure of that key; If 'max_num_of_keys' is
		 * set, all required structures will be preallocated for all
		 * keys.
		 */
	uint16_t	frame_length_ranges[FM_PCD_CC_STATS_MAX_NUM_OF_FLR];
		/**< Relevant only for 'RMON' statistics mode (this feature is
		 * supported only on B4860 device); Holds a list of programmable
		 * thresholds - for each received frame, its length in bytes is
		 * examined against these range thresholds and the appropriate
		 * counter is incremented by 1 - for example, to belong to range
		 * i, the following should hold: range i-1 threshold < frame
		 * length <= range i threshold. Each range threshold must be
		 * larger then its preceding range threshold, and last range
		 * threshold must be 0xFFFF.
		 */
	uint16_t	num_of_keys;
		/**< Number of initial keys; Note that in case of 'action' =
		 * e_FM_PCD_ACTION_INDEXED_LOOKUP, this field should be
		 * power-of-2 of the number of bits that are set in 'icIndxMask'
		 */
	uint8_t		key_size;
		/**< Size of key - for extraction of type FULL_FIELD, 'key_size'
		 * has to be the standard size of the selected key; For other
		 * extraction types, 'key_size' has to be as size of extraction;
		 * When 'action' = e_FM_PCD_ACTION_INDEXED_LOOKUP, 'key_size'
		 * must be 2.
		 */
	ioc_fm_pcd_cc_key_params_t	key_params[FM_PCD_MAX_NUM_OF_KEYS];
		/**< An array with 'num_of_keys' entries, each entry specifies
		 * the corresponding key parameters; When 'action' =
		 * e_FM_PCD_ACTION_EXACT_MATCH, this value must not exceed 255
		 * (FM_PCD_MAX_NUM_OF_KEYS-1) as the last entry is saved for the
		 * 'miss' entry.
		 */
	ioc_fm_pcd_cc_next_engine_params_t   cc_next_engine_params_for_miss;
		/**< Parameters for defining the next engine when a key is not
		 * matched; Not relevant if action =
		 * e_FM_PCD_ACTION_INDEXED_LOOKUP.
		 */
} t_keys_params;

/*
 * @Description   Parameters for defining custom header manipulation for generic
 *		  field replacement
 */
typedef struct ioc_fm_pcd_manip_hdr_custom_gen_field_replace {
	uint8_t		src_offset;
			/**< Location of new data - Offset from Parse Result
			 * (>= 16, src_offset+size <= 32, )
			 */
	uint8_t		dst_offset;
			/**< Location of data to be overwritten - Offset from
			 * start of frame (dst_offset + size <= 256).
			 */
	uint8_t		size;
			/**< The number of bytes (<=16) to be replaced */
	uint8_t		mask;
			/**< Optional 1 byte mask. Set to select bits for
			 * replacement (1 - bit will be replaced); Clear to use
			 * field as is.
			 */
	uint8_t		mask_offset;
			/**< Relevant if mask != 0; Mask offset within the
			 * replaces "size"
			 */
} ioc_fm_pcd_manip_hdr_custom_gen_field_replace;

/*
 * @Function	  fm_pcd_net_env_characteristics_set
 *
 * @Description   Define a set of Network Environment Characteristics.
 *
 *		  When setting an environment it is important to understand its
 *		  application. It is not meant to describe the flows that will
 *		  run on the ports using this environment, but what the user
 *		  means TO DO with the PCD mechanisms in order to
 *		  parse-classify-distribute those frames.
 *		  By specifying a distinction unit, the user means it would use
 *		  that option for distinction between frames at either a KeyGen
 *		  scheme or a coarse classification action descriptor. Using
 *		  interchangeable headers to define a unit means that the user
 *		  is indifferent to which of the interchangeable headers is
 *		  present in the frame, and wants the distinction to be based on
 *		  the presence of either one of them.
 *
 *		  Depending on context, there are limitations to the use of
 *		  environments. A port using the PCD functionality is bound to
 *		  an environment. Some or even all ports may share an
 *		  environment but also an environment per port is possible. When
 *		  initializing a scheme, a classification plan group (see
 *		  below), or a coarse classification tree, one of the
 *		  initialized environments must be stated and related to. When a
 *		  port is bound to a scheme, a classification plan group, or a
 *		  coarse classification tree, it MUST be bound to the same
 *		  environment.
 *
 *		  The different PCD modules, may relate (for flows definition)
 *		  ONLY on distinction units as defined by their environment.
 *		  When initializing a scheme for example, it may not choose to
 *		  select IPV4 as a match for recognizing flows unless it was
 *		  defined in the relating environment. In fact, to guide the
 *		  user through the configuration of the PCD, each module's
 *		  characterization in terms of flows is not done using protocol
 *		  names, but using environment indexes.
 *
 *		  In terms of HW implementation, the list of distinction units
 *		  sets the LCV vectors and later used for match vector,
 *		  classification plan vectors and coarse classification
 *		  indexing.
 *
 * @Param[in]	  h_fm_pcd		FM PCD module descriptor.
 * @Param[in]	  p_netenv_params	A structure of parameters for the
 *					initialization of the network
 *					environment.
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_net_env_characteristics_set(t_handle h_fm_pcd,
				 ioc_fm_pcd_net_env_params_t *p_netenv_params);

/*
 * @Function	  fm_pcd_net_env_characteristics_delete
 *
 * @Description   Deletes a set of Network Environment Characteristics.
 *
 * @Param[in]	  h_net_env	A handle to the Network environment.
 *
 * @Return	  E_OK on success; Error code otherwise.
 */
uint32_t fm_pcd_net_env_characteristics_delete(t_handle h_net_env);

/*
 * @Function	  fm_pcd_kg_scheme_set
 *
 * @Description   Initializing or modifying and enabling a scheme for the
 *		  KeyGen. This routine should be called for adding or modifying
 *		  a scheme. When a scheme needs modifying, the API requires that
 *		  it will be rewritten. In such a case 'modify' should be TRUE.
 *		  If the routine is called for a valid scheme and 'modify' is
 *		  FALSE, it will return error.
 *
 * @Param[in]	  h_fm_pcd		If this is a new scheme - A handle to an
 *					FM PCD Module. Otherwise NULL (ignored
 *					by driver).
 * @Param[in,out] p_scheme_params	A structure of parameters for defining
 *					the scheme
 *
 * @Return	  A handle to the initialized scheme on success; NULL code
 *		  otherwise. When used as "modify" (rather than for setting a
 *		  new scheme), p_scheme_params->id.h_scheme will return NULL if
 *		  action fails due to scheme BUSY state.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_kg_scheme_set(t_handle h_fm_pcd,
			    ioc_fm_pcd_kg_scheme_params_t *p_scheme_params);

/*
 * @Function	  fm_pcd_kg_scheme_delete
 *
 * @Description   Deleting an initialized scheme.
 *
 * @Param[in]	  h_scheme	scheme handle as returned by
 *				fm_pcd_kg_scheme_set()
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().
 */
uint32_t	fm_pcd_kg_scheme_delete(t_handle h_scheme);

/*
 * @Function	  fm_pcd_kg_scheme_get_counter
 *
 * @Description   Reads scheme packet counter.
 *
 * @Param[in]	  h_scheme	scheme handle as returned by
 *				fm_pcd_kg_scheme_set().
 *
 * @Return	  Counter's current value.
 *
 * @Cautions	  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().
 */
uint32_t  fm_pcd_kg_scheme_get_counter(t_handle h_scheme);

/*
 * @Function	  fm_pcd_kg_scheme_set_counter
 *
 * @Description   Writes scheme packet counter.
 *
 * @Param[in]	  h_scheme	scheme handle as returned by
 *				fm_pcd_kg_scheme_set().
 * @Param[in]	  value		New scheme counter value - typically '0' for
 *				resetting the counter.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init() & fm_pcd_kg_scheme_set().
 */
uint32_t  fm_pcd_kg_scheme_set_counter(t_handle h_scheme,
			uint32_t value);

/*
 * @Function	  fm_pcd_plcr_profile_set
 *
 * @Description   Sets a profile entry in the policer profile table.
 *		  The routine overrides any existing value.
 *
 * @Param[in]	  h_fm_pcd	A handle to an FM PCD Module.
 * @Param[in]	  p_profile	A structure of parameters for defining a
 *				policer profile entry.
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise. When used as "modify" (rather than for setting a
 *		  new profile), p_profile->id.h_profile will return NULL if
 *		  action fails due to profile BUSY state.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_plcr_profile_set(t_handle h_fm_pcd,
			       ioc_fm_pcd_plcr_profile_params_t  *p_profile);

/*
 * @Function	  fm_pcd_plcr_profile_delete
 *
 * @Description   Delete a profile entry in the policer profile table.
 *		  The routine set entry to invalid.
 *
 * @Param[in]	  h_profile	A handle to the profile.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
uint32_t fm_pcd_plcr_profile_delete(t_handle h_profile);

/*
 * @Function	  fm_pcd_plcr_profile_get_counter
 *
 * @Description   Sets an entry in the classification plan.
 *		  The routine overrides any existing value.
 *
 * @Param[in]	  h_profile	A handle to the profile.
 * @Param[in]	  counter	Counter selector.
 *
 * @Return	  specific counter value.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
uint32_t fm_pcd_plcr_profile_get_counter(t_handle	h_profile,
			ioc_fm_pcd_plcr_profile_counters	counter);

/*
 * @Function	  fm_pcd_plcr_profile_set_counter
 *
 * @Description   Sets an entry in the classification plan.
 *		  The routine overrides any existing value.
 *
 * @Param[in]	  h_profile	A handle to the profile.
 * @Param[in]	  counter	Counter selector.
 * @Param[in]	  value		value to set counter with.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
uint32_t fm_pcd_plcr_profile_set_counter(t_handle h_profile,
				      ioc_fm_pcd_plcr_profile_counters counter,
					uint32_t		value);

/*
 * @Function	  fm_pcd_cc_root_build
 *
 * @Description   This routine must be called to define a complete coarse
 *		  classification tree. This is the way to define coarse
 *		  classification to a certain flow - the KeyGen schemes may
 *		  point only to trees defined in this way.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  p_params	A structure of parameters to define the tree.
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_cc_root_build(t_handle h_fm_pcd,
			     ioc_fm_pcd_cc_tree_params_t  *p_params);

/*
 * @Function	  fm_pcd_cc_root_delete
 *
 * @Description   Deleting an built tree.
 *
 * @Param[in]	  h_cc_tree	A handle to a CC tree.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
uint32_t fm_pcd_cc_root_delete(t_handle h_cc_tree);

/*
 * @Function	  fm_pcd_cc_root_modify_next_engine
 *
 * @Description   Modify the Next Engine Parameters in the entry of the tree.
 *
 * @Param[in]	  h_cc_tree			A handle to the tree
 * @Param[in]	  grp_id			A Group index in the tree
 * @Param[in]	  index				Entry index in the group
 *						defined by grp_id
 * @Param[in]	  p_fm_pcd_cc_next_engine	Pointer to new next
 *						engine parameters
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following FM_PCD_CcBuildTree().
 */
uint32_t fm_pcd_cc_root_modify_next_engine(t_handle h_cc_tree,
		uint8_t		grp_id,
		uint8_t		index,
		ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);

/*
 * @Function	  fm_pcd_match_table_set
 *
 * @Description   This routine should be called for each CC (coarse
 *		  classification) node. The whole CC tree should be built bottom
 *		  up so that each node points to already defined nodes.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  p_param	A structure of parameters defining the CC node
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle   fm_pcd_match_table_set(t_handle h_fm_pcd,
		ioc_fm_pcd_cc_node_params_t *p_param);

/*
 * @Function	  fm_pcd_match_table_delete
 *
 * @Description   Deleting an built node.
 *
 * @Param[in]	  h_cc_node	A handle to a CC node.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
uint32_t fm_pcd_match_table_delete(t_handle h_cc_node);

/*
 * @Function	  fm_pcd_match_table_modify_miss_next_engine
 *
 * @Description   Modify the Next Engine Parameters of the Miss key case of the
 *		  node.
 *
 * @Param[in]	  h_cc_node				A handle to the node
 * @Param[in]	  p_fm_pcd_cc_next_engine_params	Parameters for defining
 *							next engine
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set(); Not
 *		  relevant in the case the node is of type 'INDEXED_LOOKUP'.
 *		  When configuring nextEngine = e_FM_PCD_CC, note that
 *		  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		  different from the currently changed table.
 *
 */
uint32_t fm_pcd_match_table_modify_miss_next_engine(t_handle h_cc_node,
	ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine_params);

/*
 * @Function	  fm_pcd_match_table_remove_key
 *
 * @Description   Remove the key (including next engine parameters of this key)
 *		  defined by the index of the relevant node.
 *
 * @Param[in]	  h_cc_node	A handle to the node
 * @Param[in]	  key_index	Key index for removing
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() was called for
 *		  this node and the nodes that lead to it.
 */
uint32_t fm_pcd_match_table_remove_key(t_handle h_cc_node,
			uint16_t key_index);

/*
 * @Function	  fm_pcd_match_table_add_key
 *
 * @Description   Add the key (including next engine parameters of this key in
 *		  the index defined by the key_index. Note that
 *		  'FM_PCD_LAST_KEY_INDEX' may be used by user that don't care
 *		  about the position of the key in the table - in that case, the
 *		  key will be automatically added by the driver in the last
 *		  available entry.
 *
 * @Param[in]	  h_cc_node	A handle to the node
 * @Param[in]	  key_index	Key index for adding.
 * @Param[in]	  key_size	Key size of added key
 * @Param[in]	  p_key_params	A pointer to the parameters includes new key
 *				with Next Engine Parameters
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() was called for
 *		  this node and the nodes that lead to it.
 */
uint32_t fm_pcd_match_table_add_key(t_handle h_cc_node,
				uint16_t		key_index,
				uint8_t		key_size,
				ioc_fm_pcd_cc_key_params_t  *p_key_params);

/*
 * @Function	  fm_pcd_match_table_modify_next_engine
 *
 * @Description   Modify the Next Engine Parameters in the relevant key entry of
 *		  the node.
 *
 * @Param[in]	  h_cc_node			A handle to the node
 * @Param[in]	  key_index			Key index for Next
 *						Engine modifications
 * @Param[in]	  p_fm_pcd_cc_next_engine	Parameters for defining
 *						next engine
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set(). When
 *		  configuring nextEngine = e_FM_PCD_CC, note that
 *		  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		  different from the currently changed table.
 *
 */
uint32_t fm_pcd_match_table_modify_next_engine(t_handle h_cc_node,
		uint16_t		key_index,
		ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);

/*
 * @Function	  fm_pcd_match_table_modify_key_and_next_engine
 *
 * @Description   Modify the key and Next Engine Parameters of this key in the
 *		  index defined by the key_index.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_index		Key index for adding
 * @Param[in]	  key_size		Key size of added key
 * @Param[in]	  p_key_params		A pointer to the parameters includes
 *					modified key and modified Next Engine
 *					Params
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	Allowed only following fm_pcd_match_table_set() was called for
 *		this node and the nodes that lead to it. When configuring
 *		nextEngine = e_FM_PCD_CC, note that
 *		p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		different from the currently changed table.
 */
uint32_t fm_pcd_match_table_modify_key_and_next_engine(t_handle h_cc_node,
				uint16_t		key_index,
				uint8_t		key_size,
				ioc_fm_pcd_cc_key_params_t  *p_key_params);

/*
 * @Function	  fm_pcd_match_table_modify_key
 *
 * @Description   Modify the key in the index defined by the key_index.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_index		Key index for adding
 * @Param[in]	  key_size		Key size of added key
 * @Param[in]	  p_key			A pointer to the new key
 * @Param[in]	  p_mask		A pointer to the new mask if relevant,
 *					otherwise pointer to NULL
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() was called for
 *		  this node and the nodes that lead to it.
 */
uint32_t fm_pcd_match_table_modify_key(t_handle h_cc_node,
				uint16_t key_index,
				uint8_t  key_size,
				uint8_t  *p_key,
				uint8_t  *p_mask);

/*
 * @Function	  fm_pcd_match_table_find_nremove_key
 *
 * @Description   Remove the key (including next engine parameters of this key)
 *		  defined by the key and mask. Note that this routine will
 *		  search the node to locate the index of the required key
 *		  (& mask) to remove.
 *
 * @Param[in]	  h_cc_node	A handle to the node
 * @Param[in]	  key_size	Key size of the one to remove.
 * @Param[in]	  p_key		A pointer to the requested key to remove.
 * @Param[in]	  p_mask	A pointer to the mask if relevant,
 *				otherwise pointer to NULL
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() was called for
 *		  this node and the nodes that lead to it.
 */
uint32_t fm_pcd_match_table_find_nremove_key(t_handle h_cc_node,
					uint8_t  key_size,
					uint8_t  *p_key,
					uint8_t  *p_mask);

/*
 * @Function	  fm_pcd_match_table_find_nmodify_next_engine
 *
 * @Description   Modify the Next Engine Parameters in the relevant key entry of
 *		  the node. Note that this routine will search the node to
 *		  locate the index of the required key (& mask) to modify.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_size		Key size of the one to modify.
 * @Param[in]	  p_key			A pointer to the requested key to modify
 * @Param[in]	  p_mask		A pointer to the mask if relevant,
 *					otherwise pointer to NULL
 * @Param[in]	  p_fm_pcd_cc_next_engine	Parameters for defining
 *							next engine
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set(). When
 *		  configuring nextEngine = e_FM_PCD_CC, note that
 *		  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		  different from the currently changed table.
 */
uint32_t fm_pcd_match_table_find_nmodify_next_engine(t_handle h_cc_node,
		uint8_t		key_size,
		uint8_t		*p_key,
		uint8_t		*p_mask,
		ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);

/*
 * @Function	 fm_pcd_match_table_find_nmodify_key_and_next_engine
 *
 * @Description   Modify the key and Next Engine Parameters of this key in the
 *		  index defined by the key_index. Note that this routine will
 *		  search the node to locate the index of the required key
 *		  (& mask) to modify.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_size		Key size of the one to modify.
 * @Param[in]	  p_key			A pointer to the requested key to modify
 * @Param[in]	  p_mask		A pointer to the mask if relevant,
 *					otherwise pointer to NULL
 * @Param[in]	  p_key_params		A pointer to the parameters includes
 *					modified key and modified Next Engine
 *					Params
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() was called for
 *		  this node and the nodes that lead to it.
 *		  When configuring nextEngine = e_FM_PCD_CC, note that
 *		  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		  different from the currently changed table.
 */
uint32_t fm_pcd_match_table_find_nmodify_key_and_next_engine(t_handle h_cc_node,
				uint8_t key_size,
				uint8_t *p_key,
				uint8_t *p_mask,
				ioc_fm_pcd_cc_key_params_t *p_key_params);

/*
 * @Function	  fm_pcd_match_table_find_nmodify_key
 *
 * @Description   Modify the key  in the index defined by the key_index. Note
 *		  that this routine will search the node to locate the index of
 *		  the required key (& mask) to modify.
 *
 * @Param[in]	  h_cc_node	A handle to the node
 * @Param[in]	  key_size	Key size of the one to modify.
 * @Param[in]	  p_key		A pointer to the requested key to modify.
 * @Param[in]	  p_mask	A pointer to the mask if relevant,
 *				otherwise pointer to NULL
 * @Param[in]	  p_new_key	A pointer to the new key
 * @Param[in]	  p_new_mask	A pointer to the new mask if relevant,
 *				otherwise pointer to NULL
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set() was called for
 *		  this node and the nodes that lead to it.
 */
uint32_t fm_pcd_match_table_find_nmodify_key(t_handle h_cc_node,
					uint8_t  key_size,
					uint8_t  *p_key,
					uint8_t  *p_mask,
					uint8_t  *p_new_key,
					uint8_t  *p_new_mask);

/*
 * @Function	  fm_pcd_match_table_get_key_counter
 *
 * @Description   This routine may be used to get a counter of specific key in a
 *		  CC Node; This counter reflects how many frames passed that
 *		  were matched this key.
 *
 * @Param[in]	  h_cc_node	A handle to the node
 * @Param[in]	  key_index	Key index for adding
 *
 * @Return	  The specific key counter.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
uint32_t fm_pcd_match_table_get_key_counter(t_handle h_cc_node,
				uint16_t key_index);

/*
 * @Function	  fm_pcd_match_table_get_key_statistics
 *
 * @Description   This routine may be used to get statistics counters of
 *		  specific key in a CC Node.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames passed that were
 *		  matched this key; The total frames count will be returned in
 *		  the counter of the first range (as only one frame length range
 *		  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for
 *		  this node, the total frame count will be separated to frame
 *		  length counters, based on provided frame length ranges.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_index		Key index for adding
 * @Param[out]	  p_key_statistics	Key statistics counters
 *
 * @Return	  The specific key statistics.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
uint32_t fm_pcd_match_table_get_key_statistics(t_handle h_cc_node,
			uint16_t		key_index,
			ioc_fm_pcd_cc_key_statistics_t	*p_key_statistics);

/*
 * @Function	  fm_pcd_match_table_get_miss_statistics
 *
 * @Description   This routine may be used to get statistics counters of miss
 *		  entry in a CC Node.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames were not matched
 *		  to any existing key and therefore passed through the miss
 *		  entry; The total frames count will be returned in the counter
 *		  of the first range (as only one frame length range was
 *		  defined).
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[out]	  p_miss_statistics	Statistics counters for 'miss'
 *
 * @Return	  The statistics for 'miss'.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
uint32_t fm_pcd_match_table_get_miss_statistics(t_handle h_cc_node,
		    ioc_fm_pcd_cc_key_statistics_t	*p_miss_statistics);

/*
 * @Function	  fm_pcd_match_table_find_nget_key_statistics
 *
 * @Description   This routine may be used to get statistics counters of
 *		  specific key in a CC Node.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames passed that were
 *		  matched this key; The total frames count will be returned in
 *		  the counter of the first range (as only one frame length range
 *		  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for
 *		  this node, the total frame count will be separated to frame
 *		  length counters, based on provided frame length ranges.
 *		  Note that this routine will search the node to locate the
 *		  index of the required key based on received key parameters.
 *
 * @Param[in]	  h_cc_node		A handle to the node
 * @Param[in]	  key_size		Size of the requested key
 * @Param[in]	  p_key			A pointer to the requested key
 * @Param[in]	  p_mask		A pointer to the mask if relevant,
 *					otherwise pointer to NULL
 * @Param[out]	  p_key_statistics	Key statistics counters
 *
 * @Return	  The specific key statistics.
 *
 * @Cautions	  Allowed only following fm_pcd_match_table_set().
 */
uint32_t fm_pcd_match_table_find_nget_key_statistics(t_handle h_cc_node,
			uint8_t		key_size,
			uint8_t		*p_key,
			uint8_t		*p_mask,
			ioc_fm_pcd_cc_key_statistics_t   *p_key_statistics);

/*
 * @Function	  fm_pcd_match_table_get_next_engine
 *
 * @Description   Gets NextEngine of the relevant key_index.
 *
 * @Param[in]	  h_cc_node				A handle to the node.
 * @Param[in]	  key_index				key_index in the
 *							relevant node.
 * @Param[out]	  p_fm_pcd_cc_next_engine_params	here updated
 *							nextEngine parameters
 *							for the relevant
 *							key_index of the CC Node
 *							received as parameter to
 *							this function
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
uint32_t fm_pcd_match_table_get_next_engine(t_handle	h_cc_node,
	uint16_t			key_index,
	ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine_params);

/*
 * @Function	  fm_pcd_match_table_get_indexed_hash_bucket
 *
 * @Description   This routine simulates KeyGen operation on the provided key
 *		  and calculates to which hash bucket it will be mapped.
 *
 * @Param[in]	  h_cc_node			A handle to the node.
 * @Param[in]	  kg_key_size			Key size as it was configured in
 *						the KG scheme that leads to this
 *						hash.
 * @Param[in]	  p_kg_key			Pointer to the key; must be like
 *						the key that the KG is
 *						generated, i.e. the same
 *						extraction and with mask if
 *						exist.
 * @Param[in]	  kg_hash_shift			Hash-shift as it was configured
 *						in the KG scheme that leads to
 *						this hash.
 * @Param[out]	  p_cc_node_bucket_handle	Pointer to the bucket of the
 *						provided key.
 * @Param[out]	  p_bucket_index		Index to the bucket of the
 *						provided key
 * @Param[out]	  p_last_index			Pointer to last index in the
 *						bucket of the provided key.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set()
 */
uint32_t fm_pcd_match_table_get_indexed_hash_bucket(t_handle h_cc_node,
				uint8_t	kg_key_size,
				uint8_t	*p_kg_key,
				uint8_t	kg_hash_shift,
				t_handle	*p_cc_node_bucket_handle,
				uint8_t	*p_bucket_index,
				uint16_t	*p_last_index);

/*
 * @Function	  fm_pcd_hash_table_set
 *
 * @Description   This routine initializes a hash table structure.
 *		  KeyGen hash result determines the hash bucket.
 *		  Next, KeyGen key is compared against all keys of this bucket
 *		  (exact match).
 *		  Number of sets (number of buckets) of the hash equals to the
 *		  number of 1-s in 'hashResMask' in the provided parameters.
 *		  Number of hash table ways is then calculated by dividing
 *		  'max_num_of_keys' equally between the hash sets. This is the
 *		  maximal number of keys that a hash bucket may hold.
 *		  The hash table is initialized empty and keys may be added to
 *		  it following the initialization. Keys masks are not supported
 *		  in current hash table implementation.
 *		  The initialized hash table can be integrated as a node in a CC
 *		  tree.
 *
 * @Param[in]	  h_fm_pcd	FM PCD module descriptor.
 * @Param[in]	  p_param	A structure of parameters defining the hash
 *				table
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_hash_table_set(t_handle h_fm_pcd,
	ioc_fm_pcd_hash_table_params_t *p_param);

/*
 * @Function	  fm_pcd_hash_table_delete
 *
 * @Description   This routine deletes the provided hash table and released all
 *		  its allocated resources.
 *
 * @Param[in]	  h_hash_tbl	A handle to a hash table
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
uint32_t fm_pcd_hash_table_delete(t_handle h_hash_tbl);

/*
 * @Function	  fm_pcd_hash_table_add_key
 *
 * @Description   This routine adds the provided key (including next engine
 *		  parameters of this key) to the hash table.
 *		  The key is added as the last key of the bucket that it is
 *		  mapped to.
 *
 * @Param[in]	  h_hash_tbl	A handle to a hash table
 * @Param[in]	  key_size	Key size of added key
 * @Param[in]	  p_key_params  A pointer to the parameters includes
 *				new key with next engine parameters; The pointer
 *				to the key mask must be NULL, as masks are not
 *				supported in hash table implementation.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
uint32_t fm_pcd_hash_table_add_key(t_handle h_hash_tbl,
				uint8_t		key_size,
				ioc_fm_pcd_cc_key_params_t  *p_key_params);

/*
 * @Function	  fm_pcd_hash_table_remove_key
 *
 * @Description   This routine removes the requested key (including next engine
 *		  parameters of this key) from the hash table.
 *
 * @Param[in]	  h_hash_tbl	A handle to a hash table
 * @Param[in]	  key_size	Key size of the one to remove.
 * @Param[in]	  p_key		A pointer to the requested key to remove.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
uint32_t fm_pcd_hash_table_remove_key(t_handle h_hash_tbl,
				uint8_t  key_size,
				uint8_t  *p_key);

/*
 * @Function	  fm_pcd_hash_table_modify_next_engine
 *
 * @Description   This routine modifies the next engine for the provided key.
 *		  The key should be previously added to the hash table.
 *
 * @Param[in]	  h_hash_tbl			A handle to a hash table
 * @Param[in]	  key_size			Key size of the key to modify.
 * @Param[in]	  p_key				A pointer to the requested key
 *						to modify.
 * @Param[in]	  p_fm_pcd_cc_next_engine	A structure for defining
 *						new next engine parameters.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 *		  When configuring nextEngine = e_FM_PCD_CC, note that
 *		  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		  different from the currently changed table.
 */
uint32_t fm_pcd_hash_table_modify_next_engine(t_handle h_hash_tbl,
		uint8_t		key_size,
		uint8_t		*p_key,
		ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);

/*
 * @Function	  fm_pcd_hash_table_modify_miss_next_engine
 *
 * @Description   This routine modifies the next engine on key match miss.
 *
 * @Param[in]	  h_hash_tbl			A handle to a hash table
 * @Param[in]	  p_fm_pcd_cc_next_engine	A structure for defining
 *						new next engine parameters.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 *		  When configuring nextEngine = e_FM_PCD_CC, note that
 *		  p_fm_pcd_cc_next_engine_params->ccParams.h_cc_node must be
 *		  different from the currently changed table.
 */
uint32_t fm_pcd_hash_table_modify_miss_next_engine(t_handle h_hash_tbl,
	      ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine);

/*
 * @Function	  fm_pcd_hash_table_get_miss_next_engine
 *
 * @Description   Gets NextEngine in case of key match miss.
 *
 * @Param[in]	  h_hash_tbl				A handle to a hash table
 * @Param[out]	  p_fm_pcd_cc_next_engine_params	Next engine parameters
 *							for the specified hash
 *							table.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
uint32_t fm_pcd_hash_table_get_miss_next_engine(t_handle	h_hash_tbl,
	ioc_fm_pcd_cc_next_engine_params_t *p_fm_pcd_cc_next_engine_params);

/*
 * @Function	  fm_pcd_hash_table_find_nget_key_statistics
 *
 * @Description   This routine may be used to get statistics counters of
 *		  specific key in a hash table.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames passed that were
 *		  matched this key; The total frames count will be returned in
 *		  the counter of the first range (as only one frame length range
 *		  was defined). If 'e_FM_PCD_CC_STATS_MODE_RMON' was set for
 *		  this node, the total frame count will be separated to frame
 *		  length counters, based on provided frame length ranges. Note
 *		  that this routine will identify the bucket of this key in the
 *		  hash table and will search the bucket to locate the index of
 *		  the required key based on received key parameters.
 *
 * @Param[in]	  h_hash_tbl		A handle to a hash table
 * @Param[in]	  key_size		Size of the requested key
 * @Param[in]	  p_key			A pointer to the requested key
 * @Param[out]	  p_key_statistics	Key statistics counters
 *
 * @Return	  The specific key statistics.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
uint32_t fm_pcd_hash_table_find_nget_key_statistics(t_handle h_hash_tbl,
			uint8_t		key_size,
			uint8_t		*p_key,
			ioc_fm_pcd_cc_key_statistics_t   *p_key_statistics);

/*
 * @Function	  fm_pcd_hash_table_get_miss_statistics
 *
 * @Description   This routine may be used to get statistics counters of 'miss'
 *		  entry of the a hash table.
 *
 *		  If 'e_FM_PCD_CC_STATS_MODE_FRAME' and
 *		  'e_FM_PCD_CC_STATS_MODE_BYTE_AND_FRAME' were set for this
 *		  node, these counters reflect how many frames were not matched
 *		  to any existing key and therefore passed through the miss
 *		  entry;
 *
 * @Param[in]	  h_hash_tbl		A handle to a hash table
 * @Param[out]	  p_miss_statistics	Statistics counters for 'miss'
 *
 * @Return	  The statistics for 'miss'.
 *
 * @Cautions	  Allowed only following fm_pcd_hash_table_set().
 */
uint32_t fm_pcd_hash_table_get_miss_statistics(t_handle	h_hash_tbl,
			ioc_fm_pcd_cc_key_statistics_t   *p_miss_statistics);

/*
 * @Function	  fm_pcd_manip_node_set
 *
 * @Description   This routine should be called for defining a manipulation
 *		  node. A manipulation node must be defined before the CC node
 *		  that precedes it.
 *
 * @Param[in]	  h_fm_pcd			FM PCD module descriptor.
 * @Param[in]	  p_fm_pcd_manip_params		A structure of parameters
 *						defining the manipulation
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_manip_node_set(t_handle h_fm_pcd,
	ioc_fm_pcd_manip_params_t *p_fm_pcd_manip_params);

/*
 * @Function	  fm_pcd_manip_node_delete
 *
 * @Description   Delete an existing manipulation node.
 *
 * @Param[in]	  h_manip_node		A handle to a manipulation node.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_manip_node_set().
 */
uint32_t  fm_pcd_manip_node_delete(t_handle h_manip_node);

/*
 * @Function	  fm_pcd_manip_get_statistics
 *
 * @Description   Retrieve the manipulation statistics.
 *
 * @Param[in]	  h_manip_node		A handle to a manipulation node.
 * @Param[out]	  p_fm_pcd_manip_stats	A structure for retrieving the
 *					manipulation statistics
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_manip_node_set().
 */
uint32_t fm_pcd_manip_get_statistics(t_handle h_manip_node,
	ioc_fm_pcd_manip_stats_t *p_fm_pcd_manip_stats);

/*
 * @Function	  fm_pcd_manip_node_replace
 *
 * @Description   Change existing manipulation node to be according to new
 *		  requirement.
 *
 * @Param[in]	  h_manip_node		A handle to a manipulation node.
 * @Param[out]	  p_manip_params	A structure of parameters defining the
 *					change requirement
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_manip_node_set().
 */
uint32_t fm_pcd_manip_node_replace(t_handle h_manip_node,
ioc_fm_pcd_manip_params_t *p_manip_params);

/*
 * @Function	  fm_pcd_frm_replic_set_group
 *
 * @Description   Initialize a Frame Replicator group.
 *
 * @Param[in]	  h_fm_pcd			FM PCD module descriptor.
 * @Param[in]	  p_frm_replic_group_param	A structure of parameters for
 *						the initialization of the frame
 *						replicator group.
 *
 * @Return	  A handle to the initialized object on success; NULL code
 *		  otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_init().
 */
t_handle fm_pcd_frm_replic_set_group(t_handle h_fm_pcd,
		ioc_fm_pcd_frm_replic_group_params_t *p_frm_replic_group_param);

/*
 * @Function	  fm_pcd_frm_replic_delete_group
 *
 * @Description   Delete a Frame Replicator group.
 *
 * @Param[in]	  h_frm_replic_group	A handle to the frame replicator group.
 *
 * @Return	  E_OK on success;  Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_frm_replic_set_group().
 */
uint32_t fm_pcd_frm_replic_delete_group(t_handle h_frm_replic_group);

/*
 * @Function	  fm_pcd_frm_replic_add_member
 *
 * @Description   Add the member in the index defined by the member_index.
 *
 * @Param[in]	  h_frm_replic_group	A handle to the frame replicator group.
 * @Param[in]	  member_index		member index for adding.
 * @Param[in]	  p_member_params	A pointer to the new member parameters.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_frm_replic_set_group() of this
 *		  group.
 */
uint32_t fm_pcd_frm_replic_add_member(t_handle h_frm_replic_group,
			uint16_t		member_index,
			ioc_fm_pcd_cc_next_engine_params_t *p_member_params);

/*
 * @Function	  fm_pcd_frm_replic_remove_member
 *
 * @Description   Remove the member defined by the index from the relevant
 *		  group.
 *
 * @Param[in]	  h_frm_replic_group	A handle to the frame replicator group.
 * @Param[in]	  member_index		member index for removing.
 *
 * @Return	  E_OK on success; Error code otherwise.
 *
 * @Cautions	  Allowed only following fm_pcd_frm_replic_set_group() of this
 * group.
 */
uint32_t fm_pcd_frm_replic_remove_member(t_handle h_frm_replic_group,
				      uint16_t member_index);

/** @} */ /* end of FM_PCD_Runtime_build_grp group */
/** @} */ /* end of FM_PCD_Runtime_grp group */
/** @} */ /* end of FM_PCD_grp group */
/** @} */ /* end of FM_grp group */

#endif /* __FM_PCD_EXT_H */