vcap_model_kunit.c 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062
  1. // SPDX-License-Identifier: BSD-3-Clause
  2. /* Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries.
  3. * Microchip VCAP test model interface for kunit testing
  4. */
  5. /* This file is autogenerated by cml-utils 2023-02-10 11:16:00 +0100.
  6. * Commit ID: c30fb4bf0281cd4a7133bdab6682f9e43c872ada
  7. */
  8. #include <linux/types.h>
  9. #include <linux/kernel.h>
  10. #include "vcap_api.h"
  11. #include "vcap_model_kunit.h"
  12. /* keyfields */
  13. static const struct vcap_field is0_ll_full_keyfield[] = {
  14. [VCAP_KF_TYPE] = {
  15. .type = VCAP_FIELD_U32,
  16. .offset = 0,
  17. .width = 2,
  18. },
  19. [VCAP_KF_LOOKUP_FIRST_IS] = {
  20. .type = VCAP_FIELD_BIT,
  21. .offset = 2,
  22. .width = 1,
  23. },
  24. [VCAP_KF_IF_IGR_PORT] = {
  25. .type = VCAP_FIELD_U32,
  26. .offset = 3,
  27. .width = 7,
  28. },
  29. [VCAP_KF_8021Q_VLAN_TAGS] = {
  30. .type = VCAP_FIELD_U32,
  31. .offset = 10,
  32. .width = 3,
  33. },
  34. [VCAP_KF_8021Q_TPID0] = {
  35. .type = VCAP_FIELD_U32,
  36. .offset = 13,
  37. .width = 3,
  38. },
  39. [VCAP_KF_8021Q_PCP0] = {
  40. .type = VCAP_FIELD_U32,
  41. .offset = 16,
  42. .width = 3,
  43. },
  44. [VCAP_KF_8021Q_DEI0] = {
  45. .type = VCAP_FIELD_BIT,
  46. .offset = 19,
  47. .width = 1,
  48. },
  49. [VCAP_KF_8021Q_VID0] = {
  50. .type = VCAP_FIELD_U32,
  51. .offset = 20,
  52. .width = 12,
  53. },
  54. [VCAP_KF_8021Q_TPID1] = {
  55. .type = VCAP_FIELD_U32,
  56. .offset = 32,
  57. .width = 3,
  58. },
  59. [VCAP_KF_8021Q_PCP1] = {
  60. .type = VCAP_FIELD_U32,
  61. .offset = 35,
  62. .width = 3,
  63. },
  64. [VCAP_KF_8021Q_DEI1] = {
  65. .type = VCAP_FIELD_BIT,
  66. .offset = 38,
  67. .width = 1,
  68. },
  69. [VCAP_KF_8021Q_VID1] = {
  70. .type = VCAP_FIELD_U32,
  71. .offset = 39,
  72. .width = 12,
  73. },
  74. [VCAP_KF_8021Q_TPID2] = {
  75. .type = VCAP_FIELD_U32,
  76. .offset = 51,
  77. .width = 3,
  78. },
  79. [VCAP_KF_8021Q_PCP2] = {
  80. .type = VCAP_FIELD_U32,
  81. .offset = 54,
  82. .width = 3,
  83. },
  84. [VCAP_KF_8021Q_DEI2] = {
  85. .type = VCAP_FIELD_BIT,
  86. .offset = 57,
  87. .width = 1,
  88. },
  89. [VCAP_KF_8021Q_VID2] = {
  90. .type = VCAP_FIELD_U32,
  91. .offset = 58,
  92. .width = 12,
  93. },
  94. [VCAP_KF_L2_DMAC] = {
  95. .type = VCAP_FIELD_U48,
  96. .offset = 70,
  97. .width = 48,
  98. },
  99. [VCAP_KF_L2_SMAC] = {
  100. .type = VCAP_FIELD_U48,
  101. .offset = 118,
  102. .width = 48,
  103. },
  104. [VCAP_KF_ETYPE_LEN_IS] = {
  105. .type = VCAP_FIELD_BIT,
  106. .offset = 166,
  107. .width = 1,
  108. },
  109. [VCAP_KF_ETYPE] = {
  110. .type = VCAP_FIELD_U32,
  111. .offset = 167,
  112. .width = 16,
  113. },
  114. [VCAP_KF_IP_SNAP_IS] = {
  115. .type = VCAP_FIELD_BIT,
  116. .offset = 183,
  117. .width = 1,
  118. },
  119. [VCAP_KF_IP4_IS] = {
  120. .type = VCAP_FIELD_BIT,
  121. .offset = 184,
  122. .width = 1,
  123. },
  124. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  125. .type = VCAP_FIELD_U32,
  126. .offset = 185,
  127. .width = 2,
  128. },
  129. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = {
  130. .type = VCAP_FIELD_BIT,
  131. .offset = 187,
  132. .width = 1,
  133. },
  134. [VCAP_KF_L3_OPTIONS_IS] = {
  135. .type = VCAP_FIELD_BIT,
  136. .offset = 188,
  137. .width = 1,
  138. },
  139. [VCAP_KF_L3_DSCP] = {
  140. .type = VCAP_FIELD_U32,
  141. .offset = 189,
  142. .width = 6,
  143. },
  144. [VCAP_KF_L3_IP4_DIP] = {
  145. .type = VCAP_FIELD_U32,
  146. .offset = 195,
  147. .width = 32,
  148. },
  149. [VCAP_KF_L3_IP4_SIP] = {
  150. .type = VCAP_FIELD_U32,
  151. .offset = 227,
  152. .width = 32,
  153. },
  154. [VCAP_KF_TCP_UDP_IS] = {
  155. .type = VCAP_FIELD_BIT,
  156. .offset = 259,
  157. .width = 1,
  158. },
  159. [VCAP_KF_TCP_IS] = {
  160. .type = VCAP_FIELD_BIT,
  161. .offset = 260,
  162. .width = 1,
  163. },
  164. [VCAP_KF_L4_SPORT] = {
  165. .type = VCAP_FIELD_U32,
  166. .offset = 261,
  167. .width = 16,
  168. },
  169. [VCAP_KF_L4_RNG] = {
  170. .type = VCAP_FIELD_U32,
  171. .offset = 277,
  172. .width = 8,
  173. },
  174. };
  175. static const struct vcap_field is0_normal_7tuple_keyfield[] = {
  176. [VCAP_KF_TYPE] = {
  177. .type = VCAP_FIELD_BIT,
  178. .offset = 0,
  179. .width = 1,
  180. },
  181. [VCAP_KF_LOOKUP_FIRST_IS] = {
  182. .type = VCAP_FIELD_BIT,
  183. .offset = 1,
  184. .width = 1,
  185. },
  186. [VCAP_KF_LOOKUP_GEN_IDX_SEL] = {
  187. .type = VCAP_FIELD_U32,
  188. .offset = 2,
  189. .width = 2,
  190. },
  191. [VCAP_KF_LOOKUP_GEN_IDX] = {
  192. .type = VCAP_FIELD_U32,
  193. .offset = 4,
  194. .width = 12,
  195. },
  196. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  197. .type = VCAP_FIELD_U32,
  198. .offset = 16,
  199. .width = 2,
  200. },
  201. [VCAP_KF_IF_IGR_PORT_MASK] = {
  202. .type = VCAP_FIELD_U72,
  203. .offset = 18,
  204. .width = 65,
  205. },
  206. [VCAP_KF_L2_MC_IS] = {
  207. .type = VCAP_FIELD_BIT,
  208. .offset = 83,
  209. .width = 1,
  210. },
  211. [VCAP_KF_L2_BC_IS] = {
  212. .type = VCAP_FIELD_BIT,
  213. .offset = 84,
  214. .width = 1,
  215. },
  216. [VCAP_KF_8021Q_VLAN_TAGS] = {
  217. .type = VCAP_FIELD_U32,
  218. .offset = 85,
  219. .width = 3,
  220. },
  221. [VCAP_KF_8021Q_TPID0] = {
  222. .type = VCAP_FIELD_U32,
  223. .offset = 88,
  224. .width = 3,
  225. },
  226. [VCAP_KF_8021Q_PCP0] = {
  227. .type = VCAP_FIELD_U32,
  228. .offset = 91,
  229. .width = 3,
  230. },
  231. [VCAP_KF_8021Q_DEI0] = {
  232. .type = VCAP_FIELD_BIT,
  233. .offset = 94,
  234. .width = 1,
  235. },
  236. [VCAP_KF_8021Q_VID0] = {
  237. .type = VCAP_FIELD_U32,
  238. .offset = 95,
  239. .width = 12,
  240. },
  241. [VCAP_KF_8021Q_TPID1] = {
  242. .type = VCAP_FIELD_U32,
  243. .offset = 107,
  244. .width = 3,
  245. },
  246. [VCAP_KF_8021Q_PCP1] = {
  247. .type = VCAP_FIELD_U32,
  248. .offset = 110,
  249. .width = 3,
  250. },
  251. [VCAP_KF_8021Q_DEI1] = {
  252. .type = VCAP_FIELD_BIT,
  253. .offset = 113,
  254. .width = 1,
  255. },
  256. [VCAP_KF_8021Q_VID1] = {
  257. .type = VCAP_FIELD_U32,
  258. .offset = 114,
  259. .width = 12,
  260. },
  261. [VCAP_KF_8021Q_TPID2] = {
  262. .type = VCAP_FIELD_U32,
  263. .offset = 126,
  264. .width = 3,
  265. },
  266. [VCAP_KF_8021Q_PCP2] = {
  267. .type = VCAP_FIELD_U32,
  268. .offset = 129,
  269. .width = 3,
  270. },
  271. [VCAP_KF_8021Q_DEI2] = {
  272. .type = VCAP_FIELD_BIT,
  273. .offset = 132,
  274. .width = 1,
  275. },
  276. [VCAP_KF_8021Q_VID2] = {
  277. .type = VCAP_FIELD_U32,
  278. .offset = 133,
  279. .width = 12,
  280. },
  281. [VCAP_KF_L2_DMAC] = {
  282. .type = VCAP_FIELD_U48,
  283. .offset = 145,
  284. .width = 48,
  285. },
  286. [VCAP_KF_L2_SMAC] = {
  287. .type = VCAP_FIELD_U48,
  288. .offset = 193,
  289. .width = 48,
  290. },
  291. [VCAP_KF_IP_MC_IS] = {
  292. .type = VCAP_FIELD_BIT,
  293. .offset = 241,
  294. .width = 1,
  295. },
  296. [VCAP_KF_ETYPE_LEN_IS] = {
  297. .type = VCAP_FIELD_BIT,
  298. .offset = 242,
  299. .width = 1,
  300. },
  301. [VCAP_KF_ETYPE] = {
  302. .type = VCAP_FIELD_U32,
  303. .offset = 243,
  304. .width = 16,
  305. },
  306. [VCAP_KF_IP_SNAP_IS] = {
  307. .type = VCAP_FIELD_BIT,
  308. .offset = 259,
  309. .width = 1,
  310. },
  311. [VCAP_KF_IP4_IS] = {
  312. .type = VCAP_FIELD_BIT,
  313. .offset = 260,
  314. .width = 1,
  315. },
  316. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  317. .type = VCAP_FIELD_U32,
  318. .offset = 261,
  319. .width = 2,
  320. },
  321. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = {
  322. .type = VCAP_FIELD_BIT,
  323. .offset = 263,
  324. .width = 1,
  325. },
  326. [VCAP_KF_L3_OPTIONS_IS] = {
  327. .type = VCAP_FIELD_BIT,
  328. .offset = 264,
  329. .width = 1,
  330. },
  331. [VCAP_KF_L3_DSCP] = {
  332. .type = VCAP_FIELD_U32,
  333. .offset = 265,
  334. .width = 6,
  335. },
  336. [VCAP_KF_L3_IP6_DIP] = {
  337. .type = VCAP_FIELD_U128,
  338. .offset = 271,
  339. .width = 128,
  340. },
  341. [VCAP_KF_L3_IP6_SIP] = {
  342. .type = VCAP_FIELD_U128,
  343. .offset = 399,
  344. .width = 128,
  345. },
  346. [VCAP_KF_TCP_UDP_IS] = {
  347. .type = VCAP_FIELD_BIT,
  348. .offset = 527,
  349. .width = 1,
  350. },
  351. [VCAP_KF_TCP_IS] = {
  352. .type = VCAP_FIELD_BIT,
  353. .offset = 528,
  354. .width = 1,
  355. },
  356. [VCAP_KF_L4_SPORT] = {
  357. .type = VCAP_FIELD_U32,
  358. .offset = 529,
  359. .width = 16,
  360. },
  361. [VCAP_KF_L4_RNG] = {
  362. .type = VCAP_FIELD_U32,
  363. .offset = 545,
  364. .width = 8,
  365. },
  366. };
  367. static const struct vcap_field is0_normal_5tuple_ip4_keyfield[] = {
  368. [VCAP_KF_TYPE] = {
  369. .type = VCAP_FIELD_U32,
  370. .offset = 0,
  371. .width = 2,
  372. },
  373. [VCAP_KF_LOOKUP_FIRST_IS] = {
  374. .type = VCAP_FIELD_BIT,
  375. .offset = 2,
  376. .width = 1,
  377. },
  378. [VCAP_KF_LOOKUP_GEN_IDX_SEL] = {
  379. .type = VCAP_FIELD_U32,
  380. .offset = 3,
  381. .width = 2,
  382. },
  383. [VCAP_KF_LOOKUP_GEN_IDX] = {
  384. .type = VCAP_FIELD_U32,
  385. .offset = 5,
  386. .width = 12,
  387. },
  388. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  389. .type = VCAP_FIELD_U32,
  390. .offset = 17,
  391. .width = 2,
  392. },
  393. [VCAP_KF_IF_IGR_PORT_MASK] = {
  394. .type = VCAP_FIELD_U72,
  395. .offset = 19,
  396. .width = 65,
  397. },
  398. [VCAP_KF_L2_MC_IS] = {
  399. .type = VCAP_FIELD_BIT,
  400. .offset = 84,
  401. .width = 1,
  402. },
  403. [VCAP_KF_L2_BC_IS] = {
  404. .type = VCAP_FIELD_BIT,
  405. .offset = 85,
  406. .width = 1,
  407. },
  408. [VCAP_KF_8021Q_VLAN_TAGS] = {
  409. .type = VCAP_FIELD_U32,
  410. .offset = 86,
  411. .width = 3,
  412. },
  413. [VCAP_KF_8021Q_TPID0] = {
  414. .type = VCAP_FIELD_U32,
  415. .offset = 89,
  416. .width = 3,
  417. },
  418. [VCAP_KF_8021Q_PCP0] = {
  419. .type = VCAP_FIELD_U32,
  420. .offset = 92,
  421. .width = 3,
  422. },
  423. [VCAP_KF_8021Q_DEI0] = {
  424. .type = VCAP_FIELD_BIT,
  425. .offset = 95,
  426. .width = 1,
  427. },
  428. [VCAP_KF_8021Q_VID0] = {
  429. .type = VCAP_FIELD_U32,
  430. .offset = 96,
  431. .width = 12,
  432. },
  433. [VCAP_KF_8021Q_TPID1] = {
  434. .type = VCAP_FIELD_U32,
  435. .offset = 108,
  436. .width = 3,
  437. },
  438. [VCAP_KF_8021Q_PCP1] = {
  439. .type = VCAP_FIELD_U32,
  440. .offset = 111,
  441. .width = 3,
  442. },
  443. [VCAP_KF_8021Q_DEI1] = {
  444. .type = VCAP_FIELD_BIT,
  445. .offset = 114,
  446. .width = 1,
  447. },
  448. [VCAP_KF_8021Q_VID1] = {
  449. .type = VCAP_FIELD_U32,
  450. .offset = 115,
  451. .width = 12,
  452. },
  453. [VCAP_KF_8021Q_TPID2] = {
  454. .type = VCAP_FIELD_U32,
  455. .offset = 127,
  456. .width = 3,
  457. },
  458. [VCAP_KF_8021Q_PCP2] = {
  459. .type = VCAP_FIELD_U32,
  460. .offset = 130,
  461. .width = 3,
  462. },
  463. [VCAP_KF_8021Q_DEI2] = {
  464. .type = VCAP_FIELD_BIT,
  465. .offset = 133,
  466. .width = 1,
  467. },
  468. [VCAP_KF_8021Q_VID2] = {
  469. .type = VCAP_FIELD_U32,
  470. .offset = 134,
  471. .width = 12,
  472. },
  473. [VCAP_KF_IP_MC_IS] = {
  474. .type = VCAP_FIELD_BIT,
  475. .offset = 146,
  476. .width = 1,
  477. },
  478. [VCAP_KF_IP4_IS] = {
  479. .type = VCAP_FIELD_BIT,
  480. .offset = 147,
  481. .width = 1,
  482. },
  483. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  484. .type = VCAP_FIELD_U32,
  485. .offset = 148,
  486. .width = 2,
  487. },
  488. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = {
  489. .type = VCAP_FIELD_BIT,
  490. .offset = 150,
  491. .width = 1,
  492. },
  493. [VCAP_KF_L3_OPTIONS_IS] = {
  494. .type = VCAP_FIELD_BIT,
  495. .offset = 151,
  496. .width = 1,
  497. },
  498. [VCAP_KF_L3_DSCP] = {
  499. .type = VCAP_FIELD_U32,
  500. .offset = 152,
  501. .width = 6,
  502. },
  503. [VCAP_KF_L3_IP4_DIP] = {
  504. .type = VCAP_FIELD_U32,
  505. .offset = 158,
  506. .width = 32,
  507. },
  508. [VCAP_KF_L3_IP4_SIP] = {
  509. .type = VCAP_FIELD_U32,
  510. .offset = 190,
  511. .width = 32,
  512. },
  513. [VCAP_KF_L3_IP_PROTO] = {
  514. .type = VCAP_FIELD_U32,
  515. .offset = 222,
  516. .width = 8,
  517. },
  518. [VCAP_KF_TCP_UDP_IS] = {
  519. .type = VCAP_FIELD_BIT,
  520. .offset = 230,
  521. .width = 1,
  522. },
  523. [VCAP_KF_TCP_IS] = {
  524. .type = VCAP_FIELD_BIT,
  525. .offset = 231,
  526. .width = 1,
  527. },
  528. [VCAP_KF_L4_RNG] = {
  529. .type = VCAP_FIELD_U32,
  530. .offset = 232,
  531. .width = 8,
  532. },
  533. [VCAP_KF_IP_PAYLOAD_5TUPLE] = {
  534. .type = VCAP_FIELD_U32,
  535. .offset = 240,
  536. .width = 32,
  537. },
  538. };
  539. static const struct vcap_field is0_pure_5tuple_ip4_keyfield[] = {
  540. [VCAP_KF_TYPE] = {
  541. .type = VCAP_FIELD_U32,
  542. .offset = 0,
  543. .width = 2,
  544. },
  545. [VCAP_KF_LOOKUP_FIRST_IS] = {
  546. .type = VCAP_FIELD_BIT,
  547. .offset = 2,
  548. .width = 1,
  549. },
  550. [VCAP_KF_LOOKUP_GEN_IDX_SEL] = {
  551. .type = VCAP_FIELD_U32,
  552. .offset = 3,
  553. .width = 2,
  554. },
  555. [VCAP_KF_LOOKUP_GEN_IDX] = {
  556. .type = VCAP_FIELD_U32,
  557. .offset = 5,
  558. .width = 12,
  559. },
  560. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  561. .type = VCAP_FIELD_U32,
  562. .offset = 17,
  563. .width = 2,
  564. },
  565. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = {
  566. .type = VCAP_FIELD_BIT,
  567. .offset = 19,
  568. .width = 1,
  569. },
  570. [VCAP_KF_L3_OPTIONS_IS] = {
  571. .type = VCAP_FIELD_BIT,
  572. .offset = 20,
  573. .width = 1,
  574. },
  575. [VCAP_KF_L3_DSCP] = {
  576. .type = VCAP_FIELD_U32,
  577. .offset = 21,
  578. .width = 6,
  579. },
  580. [VCAP_KF_L3_IP4_DIP] = {
  581. .type = VCAP_FIELD_U32,
  582. .offset = 27,
  583. .width = 32,
  584. },
  585. [VCAP_KF_L3_IP4_SIP] = {
  586. .type = VCAP_FIELD_U32,
  587. .offset = 59,
  588. .width = 32,
  589. },
  590. [VCAP_KF_L3_IP_PROTO] = {
  591. .type = VCAP_FIELD_U32,
  592. .offset = 91,
  593. .width = 8,
  594. },
  595. [VCAP_KF_L4_RNG] = {
  596. .type = VCAP_FIELD_U32,
  597. .offset = 99,
  598. .width = 8,
  599. },
  600. [VCAP_KF_IP_PAYLOAD_5TUPLE] = {
  601. .type = VCAP_FIELD_U32,
  602. .offset = 107,
  603. .width = 32,
  604. },
  605. };
  606. static const struct vcap_field is0_etag_keyfield[] = {
  607. [VCAP_KF_TYPE] = {
  608. .type = VCAP_FIELD_U32,
  609. .offset = 0,
  610. .width = 2,
  611. },
  612. [VCAP_KF_LOOKUP_FIRST_IS] = {
  613. .type = VCAP_FIELD_BIT,
  614. .offset = 2,
  615. .width = 1,
  616. },
  617. [VCAP_KF_IF_IGR_PORT] = {
  618. .type = VCAP_FIELD_U32,
  619. .offset = 3,
  620. .width = 7,
  621. },
  622. [VCAP_KF_8021BR_E_TAGGED] = {
  623. .type = VCAP_FIELD_BIT,
  624. .offset = 10,
  625. .width = 1,
  626. },
  627. [VCAP_KF_8021BR_GRP] = {
  628. .type = VCAP_FIELD_U32,
  629. .offset = 11,
  630. .width = 2,
  631. },
  632. [VCAP_KF_8021BR_ECID_EXT] = {
  633. .type = VCAP_FIELD_U32,
  634. .offset = 13,
  635. .width = 8,
  636. },
  637. [VCAP_KF_8021BR_ECID_BASE] = {
  638. .type = VCAP_FIELD_U32,
  639. .offset = 21,
  640. .width = 12,
  641. },
  642. [VCAP_KF_8021BR_IGR_ECID_EXT] = {
  643. .type = VCAP_FIELD_U32,
  644. .offset = 33,
  645. .width = 8,
  646. },
  647. [VCAP_KF_8021BR_IGR_ECID_BASE] = {
  648. .type = VCAP_FIELD_U32,
  649. .offset = 41,
  650. .width = 12,
  651. },
  652. };
  653. static const struct vcap_field is2_mac_etype_keyfield[] = {
  654. [VCAP_KF_TYPE] = {
  655. .type = VCAP_FIELD_U32,
  656. .offset = 0,
  657. .width = 4,
  658. },
  659. [VCAP_KF_LOOKUP_FIRST_IS] = {
  660. .type = VCAP_FIELD_BIT,
  661. .offset = 4,
  662. .width = 1,
  663. },
  664. [VCAP_KF_LOOKUP_PAG] = {
  665. .type = VCAP_FIELD_U32,
  666. .offset = 5,
  667. .width = 8,
  668. },
  669. [VCAP_KF_IF_IGR_PORT_MASK_L3] = {
  670. .type = VCAP_FIELD_BIT,
  671. .offset = 13,
  672. .width = 1,
  673. },
  674. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = {
  675. .type = VCAP_FIELD_U32,
  676. .offset = 14,
  677. .width = 4,
  678. },
  679. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  680. .type = VCAP_FIELD_U32,
  681. .offset = 18,
  682. .width = 2,
  683. },
  684. [VCAP_KF_IF_IGR_PORT_MASK] = {
  685. .type = VCAP_FIELD_U32,
  686. .offset = 20,
  687. .width = 32,
  688. },
  689. [VCAP_KF_L2_MC_IS] = {
  690. .type = VCAP_FIELD_BIT,
  691. .offset = 52,
  692. .width = 1,
  693. },
  694. [VCAP_KF_L2_BC_IS] = {
  695. .type = VCAP_FIELD_BIT,
  696. .offset = 53,
  697. .width = 1,
  698. },
  699. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  700. .type = VCAP_FIELD_BIT,
  701. .offset = 54,
  702. .width = 1,
  703. },
  704. [VCAP_KF_ISDX_GT0_IS] = {
  705. .type = VCAP_FIELD_BIT,
  706. .offset = 55,
  707. .width = 1,
  708. },
  709. [VCAP_KF_ISDX_CLS] = {
  710. .type = VCAP_FIELD_U32,
  711. .offset = 56,
  712. .width = 12,
  713. },
  714. [VCAP_KF_8021Q_VID_CLS] = {
  715. .type = VCAP_FIELD_U32,
  716. .offset = 68,
  717. .width = 13,
  718. },
  719. [VCAP_KF_8021Q_DEI_CLS] = {
  720. .type = VCAP_FIELD_BIT,
  721. .offset = 81,
  722. .width = 1,
  723. },
  724. [VCAP_KF_8021Q_PCP_CLS] = {
  725. .type = VCAP_FIELD_U32,
  726. .offset = 82,
  727. .width = 3,
  728. },
  729. [VCAP_KF_L2_FWD_IS] = {
  730. .type = VCAP_FIELD_BIT,
  731. .offset = 85,
  732. .width = 1,
  733. },
  734. [VCAP_KF_L3_RT_IS] = {
  735. .type = VCAP_FIELD_BIT,
  736. .offset = 88,
  737. .width = 1,
  738. },
  739. [VCAP_KF_L3_DST_IS] = {
  740. .type = VCAP_FIELD_BIT,
  741. .offset = 89,
  742. .width = 1,
  743. },
  744. [VCAP_KF_L2_DMAC] = {
  745. .type = VCAP_FIELD_U48,
  746. .offset = 90,
  747. .width = 48,
  748. },
  749. [VCAP_KF_L2_SMAC] = {
  750. .type = VCAP_FIELD_U48,
  751. .offset = 138,
  752. .width = 48,
  753. },
  754. [VCAP_KF_ETYPE_LEN_IS] = {
  755. .type = VCAP_FIELD_BIT,
  756. .offset = 186,
  757. .width = 1,
  758. },
  759. [VCAP_KF_ETYPE] = {
  760. .type = VCAP_FIELD_U32,
  761. .offset = 187,
  762. .width = 16,
  763. },
  764. [VCAP_KF_L2_PAYLOAD_ETYPE] = {
  765. .type = VCAP_FIELD_U64,
  766. .offset = 203,
  767. .width = 64,
  768. },
  769. [VCAP_KF_L4_RNG] = {
  770. .type = VCAP_FIELD_U32,
  771. .offset = 267,
  772. .width = 16,
  773. },
  774. [VCAP_KF_OAM_CCM_CNTS_EQ0] = {
  775. .type = VCAP_FIELD_BIT,
  776. .offset = 283,
  777. .width = 1,
  778. },
  779. [VCAP_KF_OAM_Y1731_IS] = {
  780. .type = VCAP_FIELD_BIT,
  781. .offset = 284,
  782. .width = 1,
  783. },
  784. };
  785. static const struct vcap_field is2_arp_keyfield[] = {
  786. [VCAP_KF_TYPE] = {
  787. .type = VCAP_FIELD_U32,
  788. .offset = 0,
  789. .width = 4,
  790. },
  791. [VCAP_KF_LOOKUP_FIRST_IS] = {
  792. .type = VCAP_FIELD_BIT,
  793. .offset = 4,
  794. .width = 1,
  795. },
  796. [VCAP_KF_LOOKUP_PAG] = {
  797. .type = VCAP_FIELD_U32,
  798. .offset = 5,
  799. .width = 8,
  800. },
  801. [VCAP_KF_IF_IGR_PORT_MASK_L3] = {
  802. .type = VCAP_FIELD_BIT,
  803. .offset = 13,
  804. .width = 1,
  805. },
  806. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = {
  807. .type = VCAP_FIELD_U32,
  808. .offset = 14,
  809. .width = 4,
  810. },
  811. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  812. .type = VCAP_FIELD_U32,
  813. .offset = 18,
  814. .width = 2,
  815. },
  816. [VCAP_KF_IF_IGR_PORT_MASK] = {
  817. .type = VCAP_FIELD_U32,
  818. .offset = 20,
  819. .width = 32,
  820. },
  821. [VCAP_KF_L2_MC_IS] = {
  822. .type = VCAP_FIELD_BIT,
  823. .offset = 52,
  824. .width = 1,
  825. },
  826. [VCAP_KF_L2_BC_IS] = {
  827. .type = VCAP_FIELD_BIT,
  828. .offset = 53,
  829. .width = 1,
  830. },
  831. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  832. .type = VCAP_FIELD_BIT,
  833. .offset = 54,
  834. .width = 1,
  835. },
  836. [VCAP_KF_ISDX_GT0_IS] = {
  837. .type = VCAP_FIELD_BIT,
  838. .offset = 55,
  839. .width = 1,
  840. },
  841. [VCAP_KF_ISDX_CLS] = {
  842. .type = VCAP_FIELD_U32,
  843. .offset = 56,
  844. .width = 12,
  845. },
  846. [VCAP_KF_8021Q_VID_CLS] = {
  847. .type = VCAP_FIELD_U32,
  848. .offset = 68,
  849. .width = 13,
  850. },
  851. [VCAP_KF_8021Q_DEI_CLS] = {
  852. .type = VCAP_FIELD_BIT,
  853. .offset = 81,
  854. .width = 1,
  855. },
  856. [VCAP_KF_8021Q_PCP_CLS] = {
  857. .type = VCAP_FIELD_U32,
  858. .offset = 82,
  859. .width = 3,
  860. },
  861. [VCAP_KF_L2_FWD_IS] = {
  862. .type = VCAP_FIELD_BIT,
  863. .offset = 85,
  864. .width = 1,
  865. },
  866. [VCAP_KF_L2_SMAC] = {
  867. .type = VCAP_FIELD_U48,
  868. .offset = 86,
  869. .width = 48,
  870. },
  871. [VCAP_KF_ARP_ADDR_SPACE_OK_IS] = {
  872. .type = VCAP_FIELD_BIT,
  873. .offset = 134,
  874. .width = 1,
  875. },
  876. [VCAP_KF_ARP_PROTO_SPACE_OK_IS] = {
  877. .type = VCAP_FIELD_BIT,
  878. .offset = 135,
  879. .width = 1,
  880. },
  881. [VCAP_KF_ARP_LEN_OK_IS] = {
  882. .type = VCAP_FIELD_BIT,
  883. .offset = 136,
  884. .width = 1,
  885. },
  886. [VCAP_KF_ARP_TGT_MATCH_IS] = {
  887. .type = VCAP_FIELD_BIT,
  888. .offset = 137,
  889. .width = 1,
  890. },
  891. [VCAP_KF_ARP_SENDER_MATCH_IS] = {
  892. .type = VCAP_FIELD_BIT,
  893. .offset = 138,
  894. .width = 1,
  895. },
  896. [VCAP_KF_ARP_OPCODE_UNKNOWN_IS] = {
  897. .type = VCAP_FIELD_BIT,
  898. .offset = 139,
  899. .width = 1,
  900. },
  901. [VCAP_KF_ARP_OPCODE] = {
  902. .type = VCAP_FIELD_U32,
  903. .offset = 140,
  904. .width = 2,
  905. },
  906. [VCAP_KF_L3_IP4_DIP] = {
  907. .type = VCAP_FIELD_U32,
  908. .offset = 142,
  909. .width = 32,
  910. },
  911. [VCAP_KF_L3_IP4_SIP] = {
  912. .type = VCAP_FIELD_U32,
  913. .offset = 174,
  914. .width = 32,
  915. },
  916. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  917. .type = VCAP_FIELD_BIT,
  918. .offset = 206,
  919. .width = 1,
  920. },
  921. [VCAP_KF_L4_RNG] = {
  922. .type = VCAP_FIELD_U32,
  923. .offset = 207,
  924. .width = 16,
  925. },
  926. };
  927. static const struct vcap_field is2_ip4_tcp_udp_keyfield[] = {
  928. [VCAP_KF_TYPE] = {
  929. .type = VCAP_FIELD_U32,
  930. .offset = 0,
  931. .width = 4,
  932. },
  933. [VCAP_KF_LOOKUP_FIRST_IS] = {
  934. .type = VCAP_FIELD_BIT,
  935. .offset = 4,
  936. .width = 1,
  937. },
  938. [VCAP_KF_LOOKUP_PAG] = {
  939. .type = VCAP_FIELD_U32,
  940. .offset = 5,
  941. .width = 8,
  942. },
  943. [VCAP_KF_IF_IGR_PORT_MASK_L3] = {
  944. .type = VCAP_FIELD_BIT,
  945. .offset = 13,
  946. .width = 1,
  947. },
  948. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = {
  949. .type = VCAP_FIELD_U32,
  950. .offset = 14,
  951. .width = 4,
  952. },
  953. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  954. .type = VCAP_FIELD_U32,
  955. .offset = 18,
  956. .width = 2,
  957. },
  958. [VCAP_KF_IF_IGR_PORT_MASK] = {
  959. .type = VCAP_FIELD_U32,
  960. .offset = 20,
  961. .width = 32,
  962. },
  963. [VCAP_KF_L2_MC_IS] = {
  964. .type = VCAP_FIELD_BIT,
  965. .offset = 52,
  966. .width = 1,
  967. },
  968. [VCAP_KF_L2_BC_IS] = {
  969. .type = VCAP_FIELD_BIT,
  970. .offset = 53,
  971. .width = 1,
  972. },
  973. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  974. .type = VCAP_FIELD_BIT,
  975. .offset = 54,
  976. .width = 1,
  977. },
  978. [VCAP_KF_ISDX_GT0_IS] = {
  979. .type = VCAP_FIELD_BIT,
  980. .offset = 55,
  981. .width = 1,
  982. },
  983. [VCAP_KF_ISDX_CLS] = {
  984. .type = VCAP_FIELD_U32,
  985. .offset = 56,
  986. .width = 12,
  987. },
  988. [VCAP_KF_8021Q_VID_CLS] = {
  989. .type = VCAP_FIELD_U32,
  990. .offset = 68,
  991. .width = 13,
  992. },
  993. [VCAP_KF_8021Q_DEI_CLS] = {
  994. .type = VCAP_FIELD_BIT,
  995. .offset = 81,
  996. .width = 1,
  997. },
  998. [VCAP_KF_8021Q_PCP_CLS] = {
  999. .type = VCAP_FIELD_U32,
  1000. .offset = 82,
  1001. .width = 3,
  1002. },
  1003. [VCAP_KF_L2_FWD_IS] = {
  1004. .type = VCAP_FIELD_BIT,
  1005. .offset = 85,
  1006. .width = 1,
  1007. },
  1008. [VCAP_KF_L3_RT_IS] = {
  1009. .type = VCAP_FIELD_BIT,
  1010. .offset = 88,
  1011. .width = 1,
  1012. },
  1013. [VCAP_KF_L3_DST_IS] = {
  1014. .type = VCAP_FIELD_BIT,
  1015. .offset = 89,
  1016. .width = 1,
  1017. },
  1018. [VCAP_KF_IP4_IS] = {
  1019. .type = VCAP_FIELD_BIT,
  1020. .offset = 90,
  1021. .width = 1,
  1022. },
  1023. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  1024. .type = VCAP_FIELD_U32,
  1025. .offset = 91,
  1026. .width = 2,
  1027. },
  1028. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = {
  1029. .type = VCAP_FIELD_BIT,
  1030. .offset = 93,
  1031. .width = 1,
  1032. },
  1033. [VCAP_KF_L3_OPTIONS_IS] = {
  1034. .type = VCAP_FIELD_BIT,
  1035. .offset = 94,
  1036. .width = 1,
  1037. },
  1038. [VCAP_KF_L3_TTL_GT0] = {
  1039. .type = VCAP_FIELD_BIT,
  1040. .offset = 95,
  1041. .width = 1,
  1042. },
  1043. [VCAP_KF_L3_TOS] = {
  1044. .type = VCAP_FIELD_U32,
  1045. .offset = 96,
  1046. .width = 8,
  1047. },
  1048. [VCAP_KF_L3_IP4_DIP] = {
  1049. .type = VCAP_FIELD_U32,
  1050. .offset = 104,
  1051. .width = 32,
  1052. },
  1053. [VCAP_KF_L3_IP4_SIP] = {
  1054. .type = VCAP_FIELD_U32,
  1055. .offset = 136,
  1056. .width = 32,
  1057. },
  1058. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  1059. .type = VCAP_FIELD_BIT,
  1060. .offset = 168,
  1061. .width = 1,
  1062. },
  1063. [VCAP_KF_TCP_IS] = {
  1064. .type = VCAP_FIELD_BIT,
  1065. .offset = 169,
  1066. .width = 1,
  1067. },
  1068. [VCAP_KF_L4_DPORT] = {
  1069. .type = VCAP_FIELD_U32,
  1070. .offset = 170,
  1071. .width = 16,
  1072. },
  1073. [VCAP_KF_L4_SPORT] = {
  1074. .type = VCAP_FIELD_U32,
  1075. .offset = 186,
  1076. .width = 16,
  1077. },
  1078. [VCAP_KF_L4_RNG] = {
  1079. .type = VCAP_FIELD_U32,
  1080. .offset = 202,
  1081. .width = 16,
  1082. },
  1083. [VCAP_KF_L4_SPORT_EQ_DPORT_IS] = {
  1084. .type = VCAP_FIELD_BIT,
  1085. .offset = 218,
  1086. .width = 1,
  1087. },
  1088. [VCAP_KF_L4_SEQUENCE_EQ0_IS] = {
  1089. .type = VCAP_FIELD_BIT,
  1090. .offset = 219,
  1091. .width = 1,
  1092. },
  1093. [VCAP_KF_L4_FIN] = {
  1094. .type = VCAP_FIELD_BIT,
  1095. .offset = 220,
  1096. .width = 1,
  1097. },
  1098. [VCAP_KF_L4_SYN] = {
  1099. .type = VCAP_FIELD_BIT,
  1100. .offset = 221,
  1101. .width = 1,
  1102. },
  1103. [VCAP_KF_L4_RST] = {
  1104. .type = VCAP_FIELD_BIT,
  1105. .offset = 222,
  1106. .width = 1,
  1107. },
  1108. [VCAP_KF_L4_PSH] = {
  1109. .type = VCAP_FIELD_BIT,
  1110. .offset = 223,
  1111. .width = 1,
  1112. },
  1113. [VCAP_KF_L4_ACK] = {
  1114. .type = VCAP_FIELD_BIT,
  1115. .offset = 224,
  1116. .width = 1,
  1117. },
  1118. [VCAP_KF_L4_URG] = {
  1119. .type = VCAP_FIELD_BIT,
  1120. .offset = 225,
  1121. .width = 1,
  1122. },
  1123. [VCAP_KF_L4_PAYLOAD] = {
  1124. .type = VCAP_FIELD_U64,
  1125. .offset = 226,
  1126. .width = 64,
  1127. },
  1128. };
  1129. static const struct vcap_field is2_ip4_other_keyfield[] = {
  1130. [VCAP_KF_TYPE] = {
  1131. .type = VCAP_FIELD_U32,
  1132. .offset = 0,
  1133. .width = 4,
  1134. },
  1135. [VCAP_KF_LOOKUP_FIRST_IS] = {
  1136. .type = VCAP_FIELD_BIT,
  1137. .offset = 4,
  1138. .width = 1,
  1139. },
  1140. [VCAP_KF_LOOKUP_PAG] = {
  1141. .type = VCAP_FIELD_U32,
  1142. .offset = 5,
  1143. .width = 8,
  1144. },
  1145. [VCAP_KF_IF_IGR_PORT_MASK_L3] = {
  1146. .type = VCAP_FIELD_BIT,
  1147. .offset = 13,
  1148. .width = 1,
  1149. },
  1150. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = {
  1151. .type = VCAP_FIELD_U32,
  1152. .offset = 14,
  1153. .width = 4,
  1154. },
  1155. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  1156. .type = VCAP_FIELD_U32,
  1157. .offset = 18,
  1158. .width = 2,
  1159. },
  1160. [VCAP_KF_IF_IGR_PORT_MASK] = {
  1161. .type = VCAP_FIELD_U32,
  1162. .offset = 20,
  1163. .width = 32,
  1164. },
  1165. [VCAP_KF_L2_MC_IS] = {
  1166. .type = VCAP_FIELD_BIT,
  1167. .offset = 52,
  1168. .width = 1,
  1169. },
  1170. [VCAP_KF_L2_BC_IS] = {
  1171. .type = VCAP_FIELD_BIT,
  1172. .offset = 53,
  1173. .width = 1,
  1174. },
  1175. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  1176. .type = VCAP_FIELD_BIT,
  1177. .offset = 54,
  1178. .width = 1,
  1179. },
  1180. [VCAP_KF_ISDX_GT0_IS] = {
  1181. .type = VCAP_FIELD_BIT,
  1182. .offset = 55,
  1183. .width = 1,
  1184. },
  1185. [VCAP_KF_ISDX_CLS] = {
  1186. .type = VCAP_FIELD_U32,
  1187. .offset = 56,
  1188. .width = 12,
  1189. },
  1190. [VCAP_KF_8021Q_VID_CLS] = {
  1191. .type = VCAP_FIELD_U32,
  1192. .offset = 68,
  1193. .width = 13,
  1194. },
  1195. [VCAP_KF_8021Q_DEI_CLS] = {
  1196. .type = VCAP_FIELD_BIT,
  1197. .offset = 81,
  1198. .width = 1,
  1199. },
  1200. [VCAP_KF_8021Q_PCP_CLS] = {
  1201. .type = VCAP_FIELD_U32,
  1202. .offset = 82,
  1203. .width = 3,
  1204. },
  1205. [VCAP_KF_L2_FWD_IS] = {
  1206. .type = VCAP_FIELD_BIT,
  1207. .offset = 85,
  1208. .width = 1,
  1209. },
  1210. [VCAP_KF_L3_RT_IS] = {
  1211. .type = VCAP_FIELD_BIT,
  1212. .offset = 88,
  1213. .width = 1,
  1214. },
  1215. [VCAP_KF_L3_DST_IS] = {
  1216. .type = VCAP_FIELD_BIT,
  1217. .offset = 89,
  1218. .width = 1,
  1219. },
  1220. [VCAP_KF_IP4_IS] = {
  1221. .type = VCAP_FIELD_BIT,
  1222. .offset = 90,
  1223. .width = 1,
  1224. },
  1225. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  1226. .type = VCAP_FIELD_U32,
  1227. .offset = 91,
  1228. .width = 2,
  1229. },
  1230. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = {
  1231. .type = VCAP_FIELD_BIT,
  1232. .offset = 93,
  1233. .width = 1,
  1234. },
  1235. [VCAP_KF_L3_OPTIONS_IS] = {
  1236. .type = VCAP_FIELD_BIT,
  1237. .offset = 94,
  1238. .width = 1,
  1239. },
  1240. [VCAP_KF_L3_TTL_GT0] = {
  1241. .type = VCAP_FIELD_BIT,
  1242. .offset = 95,
  1243. .width = 1,
  1244. },
  1245. [VCAP_KF_L3_TOS] = {
  1246. .type = VCAP_FIELD_U32,
  1247. .offset = 96,
  1248. .width = 8,
  1249. },
  1250. [VCAP_KF_L3_IP4_DIP] = {
  1251. .type = VCAP_FIELD_U32,
  1252. .offset = 104,
  1253. .width = 32,
  1254. },
  1255. [VCAP_KF_L3_IP4_SIP] = {
  1256. .type = VCAP_FIELD_U32,
  1257. .offset = 136,
  1258. .width = 32,
  1259. },
  1260. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  1261. .type = VCAP_FIELD_BIT,
  1262. .offset = 168,
  1263. .width = 1,
  1264. },
  1265. [VCAP_KF_L3_IP_PROTO] = {
  1266. .type = VCAP_FIELD_U32,
  1267. .offset = 169,
  1268. .width = 8,
  1269. },
  1270. [VCAP_KF_L4_RNG] = {
  1271. .type = VCAP_FIELD_U32,
  1272. .offset = 177,
  1273. .width = 16,
  1274. },
  1275. [VCAP_KF_L3_PAYLOAD] = {
  1276. .type = VCAP_FIELD_U112,
  1277. .offset = 193,
  1278. .width = 96,
  1279. },
  1280. };
  1281. static const struct vcap_field is2_ip6_std_keyfield[] = {
  1282. [VCAP_KF_TYPE] = {
  1283. .type = VCAP_FIELD_U32,
  1284. .offset = 0,
  1285. .width = 4,
  1286. },
  1287. [VCAP_KF_LOOKUP_FIRST_IS] = {
  1288. .type = VCAP_FIELD_BIT,
  1289. .offset = 4,
  1290. .width = 1,
  1291. },
  1292. [VCAP_KF_LOOKUP_PAG] = {
  1293. .type = VCAP_FIELD_U32,
  1294. .offset = 5,
  1295. .width = 8,
  1296. },
  1297. [VCAP_KF_IF_IGR_PORT_MASK_L3] = {
  1298. .type = VCAP_FIELD_BIT,
  1299. .offset = 13,
  1300. .width = 1,
  1301. },
  1302. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = {
  1303. .type = VCAP_FIELD_U32,
  1304. .offset = 14,
  1305. .width = 4,
  1306. },
  1307. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  1308. .type = VCAP_FIELD_U32,
  1309. .offset = 18,
  1310. .width = 2,
  1311. },
  1312. [VCAP_KF_IF_IGR_PORT_MASK] = {
  1313. .type = VCAP_FIELD_U32,
  1314. .offset = 20,
  1315. .width = 32,
  1316. },
  1317. [VCAP_KF_L2_MC_IS] = {
  1318. .type = VCAP_FIELD_BIT,
  1319. .offset = 52,
  1320. .width = 1,
  1321. },
  1322. [VCAP_KF_L2_BC_IS] = {
  1323. .type = VCAP_FIELD_BIT,
  1324. .offset = 53,
  1325. .width = 1,
  1326. },
  1327. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  1328. .type = VCAP_FIELD_BIT,
  1329. .offset = 54,
  1330. .width = 1,
  1331. },
  1332. [VCAP_KF_ISDX_GT0_IS] = {
  1333. .type = VCAP_FIELD_BIT,
  1334. .offset = 55,
  1335. .width = 1,
  1336. },
  1337. [VCAP_KF_ISDX_CLS] = {
  1338. .type = VCAP_FIELD_U32,
  1339. .offset = 56,
  1340. .width = 12,
  1341. },
  1342. [VCAP_KF_8021Q_VID_CLS] = {
  1343. .type = VCAP_FIELD_U32,
  1344. .offset = 68,
  1345. .width = 13,
  1346. },
  1347. [VCAP_KF_8021Q_DEI_CLS] = {
  1348. .type = VCAP_FIELD_BIT,
  1349. .offset = 81,
  1350. .width = 1,
  1351. },
  1352. [VCAP_KF_8021Q_PCP_CLS] = {
  1353. .type = VCAP_FIELD_U32,
  1354. .offset = 82,
  1355. .width = 3,
  1356. },
  1357. [VCAP_KF_L2_FWD_IS] = {
  1358. .type = VCAP_FIELD_BIT,
  1359. .offset = 85,
  1360. .width = 1,
  1361. },
  1362. [VCAP_KF_L3_RT_IS] = {
  1363. .type = VCAP_FIELD_BIT,
  1364. .offset = 88,
  1365. .width = 1,
  1366. },
  1367. [VCAP_KF_L3_TTL_GT0] = {
  1368. .type = VCAP_FIELD_BIT,
  1369. .offset = 90,
  1370. .width = 1,
  1371. },
  1372. [VCAP_KF_L3_IP6_SIP] = {
  1373. .type = VCAP_FIELD_U128,
  1374. .offset = 91,
  1375. .width = 128,
  1376. },
  1377. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  1378. .type = VCAP_FIELD_BIT,
  1379. .offset = 219,
  1380. .width = 1,
  1381. },
  1382. [VCAP_KF_L3_IP_PROTO] = {
  1383. .type = VCAP_FIELD_U32,
  1384. .offset = 220,
  1385. .width = 8,
  1386. },
  1387. [VCAP_KF_L4_RNG] = {
  1388. .type = VCAP_FIELD_U32,
  1389. .offset = 228,
  1390. .width = 16,
  1391. },
  1392. [VCAP_KF_L3_PAYLOAD] = {
  1393. .type = VCAP_FIELD_U48,
  1394. .offset = 244,
  1395. .width = 40,
  1396. },
  1397. };
  1398. static const struct vcap_field is2_ip_7tuple_keyfield[] = {
  1399. [VCAP_KF_TYPE] = {
  1400. .type = VCAP_FIELD_U32,
  1401. .offset = 0,
  1402. .width = 2,
  1403. },
  1404. [VCAP_KF_LOOKUP_FIRST_IS] = {
  1405. .type = VCAP_FIELD_BIT,
  1406. .offset = 2,
  1407. .width = 1,
  1408. },
  1409. [VCAP_KF_LOOKUP_PAG] = {
  1410. .type = VCAP_FIELD_U32,
  1411. .offset = 3,
  1412. .width = 8,
  1413. },
  1414. [VCAP_KF_IF_IGR_PORT_MASK_L3] = {
  1415. .type = VCAP_FIELD_BIT,
  1416. .offset = 11,
  1417. .width = 1,
  1418. },
  1419. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = {
  1420. .type = VCAP_FIELD_U32,
  1421. .offset = 12,
  1422. .width = 4,
  1423. },
  1424. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = {
  1425. .type = VCAP_FIELD_U32,
  1426. .offset = 16,
  1427. .width = 2,
  1428. },
  1429. [VCAP_KF_IF_IGR_PORT_MASK] = {
  1430. .type = VCAP_FIELD_U72,
  1431. .offset = 18,
  1432. .width = 65,
  1433. },
  1434. [VCAP_KF_L2_MC_IS] = {
  1435. .type = VCAP_FIELD_BIT,
  1436. .offset = 83,
  1437. .width = 1,
  1438. },
  1439. [VCAP_KF_L2_BC_IS] = {
  1440. .type = VCAP_FIELD_BIT,
  1441. .offset = 84,
  1442. .width = 1,
  1443. },
  1444. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  1445. .type = VCAP_FIELD_BIT,
  1446. .offset = 85,
  1447. .width = 1,
  1448. },
  1449. [VCAP_KF_ISDX_GT0_IS] = {
  1450. .type = VCAP_FIELD_BIT,
  1451. .offset = 86,
  1452. .width = 1,
  1453. },
  1454. [VCAP_KF_ISDX_CLS] = {
  1455. .type = VCAP_FIELD_U32,
  1456. .offset = 87,
  1457. .width = 12,
  1458. },
  1459. [VCAP_KF_8021Q_VID_CLS] = {
  1460. .type = VCAP_FIELD_U32,
  1461. .offset = 99,
  1462. .width = 13,
  1463. },
  1464. [VCAP_KF_8021Q_DEI_CLS] = {
  1465. .type = VCAP_FIELD_BIT,
  1466. .offset = 112,
  1467. .width = 1,
  1468. },
  1469. [VCAP_KF_8021Q_PCP_CLS] = {
  1470. .type = VCAP_FIELD_U32,
  1471. .offset = 113,
  1472. .width = 3,
  1473. },
  1474. [VCAP_KF_L2_FWD_IS] = {
  1475. .type = VCAP_FIELD_BIT,
  1476. .offset = 116,
  1477. .width = 1,
  1478. },
  1479. [VCAP_KF_L3_RT_IS] = {
  1480. .type = VCAP_FIELD_BIT,
  1481. .offset = 119,
  1482. .width = 1,
  1483. },
  1484. [VCAP_KF_L3_DST_IS] = {
  1485. .type = VCAP_FIELD_BIT,
  1486. .offset = 120,
  1487. .width = 1,
  1488. },
  1489. [VCAP_KF_L2_DMAC] = {
  1490. .type = VCAP_FIELD_U48,
  1491. .offset = 121,
  1492. .width = 48,
  1493. },
  1494. [VCAP_KF_L2_SMAC] = {
  1495. .type = VCAP_FIELD_U48,
  1496. .offset = 169,
  1497. .width = 48,
  1498. },
  1499. [VCAP_KF_IP4_IS] = {
  1500. .type = VCAP_FIELD_BIT,
  1501. .offset = 217,
  1502. .width = 1,
  1503. },
  1504. [VCAP_KF_L3_TTL_GT0] = {
  1505. .type = VCAP_FIELD_BIT,
  1506. .offset = 218,
  1507. .width = 1,
  1508. },
  1509. [VCAP_KF_L3_TOS] = {
  1510. .type = VCAP_FIELD_U32,
  1511. .offset = 219,
  1512. .width = 8,
  1513. },
  1514. [VCAP_KF_L3_IP6_DIP] = {
  1515. .type = VCAP_FIELD_U128,
  1516. .offset = 227,
  1517. .width = 128,
  1518. },
  1519. [VCAP_KF_L3_IP6_SIP] = {
  1520. .type = VCAP_FIELD_U128,
  1521. .offset = 355,
  1522. .width = 128,
  1523. },
  1524. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  1525. .type = VCAP_FIELD_BIT,
  1526. .offset = 483,
  1527. .width = 1,
  1528. },
  1529. [VCAP_KF_TCP_UDP_IS] = {
  1530. .type = VCAP_FIELD_BIT,
  1531. .offset = 484,
  1532. .width = 1,
  1533. },
  1534. [VCAP_KF_TCP_IS] = {
  1535. .type = VCAP_FIELD_BIT,
  1536. .offset = 485,
  1537. .width = 1,
  1538. },
  1539. [VCAP_KF_L4_DPORT] = {
  1540. .type = VCAP_FIELD_U32,
  1541. .offset = 486,
  1542. .width = 16,
  1543. },
  1544. [VCAP_KF_L4_SPORT] = {
  1545. .type = VCAP_FIELD_U32,
  1546. .offset = 502,
  1547. .width = 16,
  1548. },
  1549. [VCAP_KF_L4_RNG] = {
  1550. .type = VCAP_FIELD_U32,
  1551. .offset = 518,
  1552. .width = 16,
  1553. },
  1554. [VCAP_KF_L4_SPORT_EQ_DPORT_IS] = {
  1555. .type = VCAP_FIELD_BIT,
  1556. .offset = 534,
  1557. .width = 1,
  1558. },
  1559. [VCAP_KF_L4_SEQUENCE_EQ0_IS] = {
  1560. .type = VCAP_FIELD_BIT,
  1561. .offset = 535,
  1562. .width = 1,
  1563. },
  1564. [VCAP_KF_L4_FIN] = {
  1565. .type = VCAP_FIELD_BIT,
  1566. .offset = 536,
  1567. .width = 1,
  1568. },
  1569. [VCAP_KF_L4_SYN] = {
  1570. .type = VCAP_FIELD_BIT,
  1571. .offset = 537,
  1572. .width = 1,
  1573. },
  1574. [VCAP_KF_L4_RST] = {
  1575. .type = VCAP_FIELD_BIT,
  1576. .offset = 538,
  1577. .width = 1,
  1578. },
  1579. [VCAP_KF_L4_PSH] = {
  1580. .type = VCAP_FIELD_BIT,
  1581. .offset = 539,
  1582. .width = 1,
  1583. },
  1584. [VCAP_KF_L4_ACK] = {
  1585. .type = VCAP_FIELD_BIT,
  1586. .offset = 540,
  1587. .width = 1,
  1588. },
  1589. [VCAP_KF_L4_URG] = {
  1590. .type = VCAP_FIELD_BIT,
  1591. .offset = 541,
  1592. .width = 1,
  1593. },
  1594. [VCAP_KF_L4_PAYLOAD] = {
  1595. .type = VCAP_FIELD_U64,
  1596. .offset = 542,
  1597. .width = 64,
  1598. },
  1599. };
  1600. static const struct vcap_field es2_mac_etype_keyfield[] = {
  1601. [VCAP_KF_TYPE] = {
  1602. .type = VCAP_FIELD_U32,
  1603. .offset = 0,
  1604. .width = 3,
  1605. },
  1606. [VCAP_KF_LOOKUP_FIRST_IS] = {
  1607. .type = VCAP_FIELD_BIT,
  1608. .offset = 3,
  1609. .width = 1,
  1610. },
  1611. [VCAP_KF_L2_MC_IS] = {
  1612. .type = VCAP_FIELD_BIT,
  1613. .offset = 13,
  1614. .width = 1,
  1615. },
  1616. [VCAP_KF_L2_BC_IS] = {
  1617. .type = VCAP_FIELD_BIT,
  1618. .offset = 14,
  1619. .width = 1,
  1620. },
  1621. [VCAP_KF_ISDX_GT0_IS] = {
  1622. .type = VCAP_FIELD_BIT,
  1623. .offset = 15,
  1624. .width = 1,
  1625. },
  1626. [VCAP_KF_ISDX_CLS] = {
  1627. .type = VCAP_FIELD_U32,
  1628. .offset = 16,
  1629. .width = 12,
  1630. },
  1631. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  1632. .type = VCAP_FIELD_BIT,
  1633. .offset = 28,
  1634. .width = 1,
  1635. },
  1636. [VCAP_KF_8021Q_VID_CLS] = {
  1637. .type = VCAP_FIELD_U32,
  1638. .offset = 29,
  1639. .width = 13,
  1640. },
  1641. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = {
  1642. .type = VCAP_FIELD_U32,
  1643. .offset = 42,
  1644. .width = 3,
  1645. },
  1646. [VCAP_KF_IF_EGR_PORT_MASK] = {
  1647. .type = VCAP_FIELD_U32,
  1648. .offset = 45,
  1649. .width = 32,
  1650. },
  1651. [VCAP_KF_IF_IGR_PORT_SEL] = {
  1652. .type = VCAP_FIELD_BIT,
  1653. .offset = 77,
  1654. .width = 1,
  1655. },
  1656. [VCAP_KF_IF_IGR_PORT] = {
  1657. .type = VCAP_FIELD_U32,
  1658. .offset = 78,
  1659. .width = 9,
  1660. },
  1661. [VCAP_KF_8021Q_PCP_CLS] = {
  1662. .type = VCAP_FIELD_U32,
  1663. .offset = 87,
  1664. .width = 3,
  1665. },
  1666. [VCAP_KF_8021Q_DEI_CLS] = {
  1667. .type = VCAP_FIELD_BIT,
  1668. .offset = 90,
  1669. .width = 1,
  1670. },
  1671. [VCAP_KF_COSID_CLS] = {
  1672. .type = VCAP_FIELD_U32,
  1673. .offset = 91,
  1674. .width = 3,
  1675. },
  1676. [VCAP_KF_L3_DPL_CLS] = {
  1677. .type = VCAP_FIELD_BIT,
  1678. .offset = 94,
  1679. .width = 1,
  1680. },
  1681. [VCAP_KF_L3_RT_IS] = {
  1682. .type = VCAP_FIELD_BIT,
  1683. .offset = 95,
  1684. .width = 1,
  1685. },
  1686. [VCAP_KF_L2_DMAC] = {
  1687. .type = VCAP_FIELD_U48,
  1688. .offset = 99,
  1689. .width = 48,
  1690. },
  1691. [VCAP_KF_L2_SMAC] = {
  1692. .type = VCAP_FIELD_U48,
  1693. .offset = 147,
  1694. .width = 48,
  1695. },
  1696. [VCAP_KF_ETYPE_LEN_IS] = {
  1697. .type = VCAP_FIELD_BIT,
  1698. .offset = 195,
  1699. .width = 1,
  1700. },
  1701. [VCAP_KF_ETYPE] = {
  1702. .type = VCAP_FIELD_U32,
  1703. .offset = 196,
  1704. .width = 16,
  1705. },
  1706. [VCAP_KF_L2_PAYLOAD_ETYPE] = {
  1707. .type = VCAP_FIELD_U64,
  1708. .offset = 212,
  1709. .width = 64,
  1710. },
  1711. [VCAP_KF_OAM_CCM_CNTS_EQ0] = {
  1712. .type = VCAP_FIELD_BIT,
  1713. .offset = 276,
  1714. .width = 1,
  1715. },
  1716. [VCAP_KF_OAM_Y1731_IS] = {
  1717. .type = VCAP_FIELD_BIT,
  1718. .offset = 277,
  1719. .width = 1,
  1720. },
  1721. };
  1722. static const struct vcap_field es2_arp_keyfield[] = {
  1723. [VCAP_KF_TYPE] = {
  1724. .type = VCAP_FIELD_U32,
  1725. .offset = 0,
  1726. .width = 3,
  1727. },
  1728. [VCAP_KF_LOOKUP_FIRST_IS] = {
  1729. .type = VCAP_FIELD_BIT,
  1730. .offset = 3,
  1731. .width = 1,
  1732. },
  1733. [VCAP_KF_L2_MC_IS] = {
  1734. .type = VCAP_FIELD_BIT,
  1735. .offset = 13,
  1736. .width = 1,
  1737. },
  1738. [VCAP_KF_L2_BC_IS] = {
  1739. .type = VCAP_FIELD_BIT,
  1740. .offset = 14,
  1741. .width = 1,
  1742. },
  1743. [VCAP_KF_ISDX_GT0_IS] = {
  1744. .type = VCAP_FIELD_BIT,
  1745. .offset = 15,
  1746. .width = 1,
  1747. },
  1748. [VCAP_KF_ISDX_CLS] = {
  1749. .type = VCAP_FIELD_U32,
  1750. .offset = 16,
  1751. .width = 12,
  1752. },
  1753. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  1754. .type = VCAP_FIELD_BIT,
  1755. .offset = 28,
  1756. .width = 1,
  1757. },
  1758. [VCAP_KF_8021Q_VID_CLS] = {
  1759. .type = VCAP_FIELD_U32,
  1760. .offset = 29,
  1761. .width = 13,
  1762. },
  1763. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = {
  1764. .type = VCAP_FIELD_U32,
  1765. .offset = 42,
  1766. .width = 3,
  1767. },
  1768. [VCAP_KF_IF_EGR_PORT_MASK] = {
  1769. .type = VCAP_FIELD_U32,
  1770. .offset = 45,
  1771. .width = 32,
  1772. },
  1773. [VCAP_KF_IF_IGR_PORT_SEL] = {
  1774. .type = VCAP_FIELD_BIT,
  1775. .offset = 77,
  1776. .width = 1,
  1777. },
  1778. [VCAP_KF_IF_IGR_PORT] = {
  1779. .type = VCAP_FIELD_U32,
  1780. .offset = 78,
  1781. .width = 9,
  1782. },
  1783. [VCAP_KF_8021Q_PCP_CLS] = {
  1784. .type = VCAP_FIELD_U32,
  1785. .offset = 87,
  1786. .width = 3,
  1787. },
  1788. [VCAP_KF_8021Q_DEI_CLS] = {
  1789. .type = VCAP_FIELD_BIT,
  1790. .offset = 90,
  1791. .width = 1,
  1792. },
  1793. [VCAP_KF_COSID_CLS] = {
  1794. .type = VCAP_FIELD_U32,
  1795. .offset = 91,
  1796. .width = 3,
  1797. },
  1798. [VCAP_KF_L3_DPL_CLS] = {
  1799. .type = VCAP_FIELD_BIT,
  1800. .offset = 94,
  1801. .width = 1,
  1802. },
  1803. [VCAP_KF_L2_SMAC] = {
  1804. .type = VCAP_FIELD_U48,
  1805. .offset = 98,
  1806. .width = 48,
  1807. },
  1808. [VCAP_KF_ARP_ADDR_SPACE_OK_IS] = {
  1809. .type = VCAP_FIELD_BIT,
  1810. .offset = 146,
  1811. .width = 1,
  1812. },
  1813. [VCAP_KF_ARP_PROTO_SPACE_OK_IS] = {
  1814. .type = VCAP_FIELD_BIT,
  1815. .offset = 147,
  1816. .width = 1,
  1817. },
  1818. [VCAP_KF_ARP_LEN_OK_IS] = {
  1819. .type = VCAP_FIELD_BIT,
  1820. .offset = 148,
  1821. .width = 1,
  1822. },
  1823. [VCAP_KF_ARP_TGT_MATCH_IS] = {
  1824. .type = VCAP_FIELD_BIT,
  1825. .offset = 149,
  1826. .width = 1,
  1827. },
  1828. [VCAP_KF_ARP_SENDER_MATCH_IS] = {
  1829. .type = VCAP_FIELD_BIT,
  1830. .offset = 150,
  1831. .width = 1,
  1832. },
  1833. [VCAP_KF_ARP_OPCODE_UNKNOWN_IS] = {
  1834. .type = VCAP_FIELD_BIT,
  1835. .offset = 151,
  1836. .width = 1,
  1837. },
  1838. [VCAP_KF_ARP_OPCODE] = {
  1839. .type = VCAP_FIELD_U32,
  1840. .offset = 152,
  1841. .width = 2,
  1842. },
  1843. [VCAP_KF_L3_IP4_DIP] = {
  1844. .type = VCAP_FIELD_U32,
  1845. .offset = 154,
  1846. .width = 32,
  1847. },
  1848. [VCAP_KF_L3_IP4_SIP] = {
  1849. .type = VCAP_FIELD_U32,
  1850. .offset = 186,
  1851. .width = 32,
  1852. },
  1853. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  1854. .type = VCAP_FIELD_BIT,
  1855. .offset = 218,
  1856. .width = 1,
  1857. },
  1858. };
  1859. static const struct vcap_field es2_ip4_tcp_udp_keyfield[] = {
  1860. [VCAP_KF_TYPE] = {
  1861. .type = VCAP_FIELD_U32,
  1862. .offset = 0,
  1863. .width = 3,
  1864. },
  1865. [VCAP_KF_LOOKUP_FIRST_IS] = {
  1866. .type = VCAP_FIELD_BIT,
  1867. .offset = 3,
  1868. .width = 1,
  1869. },
  1870. [VCAP_KF_L2_MC_IS] = {
  1871. .type = VCAP_FIELD_BIT,
  1872. .offset = 13,
  1873. .width = 1,
  1874. },
  1875. [VCAP_KF_L2_BC_IS] = {
  1876. .type = VCAP_FIELD_BIT,
  1877. .offset = 14,
  1878. .width = 1,
  1879. },
  1880. [VCAP_KF_ISDX_GT0_IS] = {
  1881. .type = VCAP_FIELD_BIT,
  1882. .offset = 15,
  1883. .width = 1,
  1884. },
  1885. [VCAP_KF_ISDX_CLS] = {
  1886. .type = VCAP_FIELD_U32,
  1887. .offset = 16,
  1888. .width = 12,
  1889. },
  1890. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  1891. .type = VCAP_FIELD_BIT,
  1892. .offset = 28,
  1893. .width = 1,
  1894. },
  1895. [VCAP_KF_8021Q_VID_CLS] = {
  1896. .type = VCAP_FIELD_U32,
  1897. .offset = 29,
  1898. .width = 13,
  1899. },
  1900. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = {
  1901. .type = VCAP_FIELD_U32,
  1902. .offset = 42,
  1903. .width = 3,
  1904. },
  1905. [VCAP_KF_IF_EGR_PORT_MASK] = {
  1906. .type = VCAP_FIELD_U32,
  1907. .offset = 45,
  1908. .width = 32,
  1909. },
  1910. [VCAP_KF_IF_IGR_PORT_SEL] = {
  1911. .type = VCAP_FIELD_BIT,
  1912. .offset = 77,
  1913. .width = 1,
  1914. },
  1915. [VCAP_KF_IF_IGR_PORT] = {
  1916. .type = VCAP_FIELD_U32,
  1917. .offset = 78,
  1918. .width = 9,
  1919. },
  1920. [VCAP_KF_8021Q_PCP_CLS] = {
  1921. .type = VCAP_FIELD_U32,
  1922. .offset = 87,
  1923. .width = 3,
  1924. },
  1925. [VCAP_KF_8021Q_DEI_CLS] = {
  1926. .type = VCAP_FIELD_BIT,
  1927. .offset = 90,
  1928. .width = 1,
  1929. },
  1930. [VCAP_KF_COSID_CLS] = {
  1931. .type = VCAP_FIELD_U32,
  1932. .offset = 91,
  1933. .width = 3,
  1934. },
  1935. [VCAP_KF_L3_DPL_CLS] = {
  1936. .type = VCAP_FIELD_BIT,
  1937. .offset = 94,
  1938. .width = 1,
  1939. },
  1940. [VCAP_KF_L3_RT_IS] = {
  1941. .type = VCAP_FIELD_BIT,
  1942. .offset = 95,
  1943. .width = 1,
  1944. },
  1945. [VCAP_KF_IP4_IS] = {
  1946. .type = VCAP_FIELD_BIT,
  1947. .offset = 99,
  1948. .width = 1,
  1949. },
  1950. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  1951. .type = VCAP_FIELD_U32,
  1952. .offset = 100,
  1953. .width = 2,
  1954. },
  1955. [VCAP_KF_L3_OPTIONS_IS] = {
  1956. .type = VCAP_FIELD_BIT,
  1957. .offset = 102,
  1958. .width = 1,
  1959. },
  1960. [VCAP_KF_L3_TTL_GT0] = {
  1961. .type = VCAP_FIELD_BIT,
  1962. .offset = 103,
  1963. .width = 1,
  1964. },
  1965. [VCAP_KF_L3_TOS] = {
  1966. .type = VCAP_FIELD_U32,
  1967. .offset = 104,
  1968. .width = 8,
  1969. },
  1970. [VCAP_KF_L3_IP4_DIP] = {
  1971. .type = VCAP_FIELD_U32,
  1972. .offset = 112,
  1973. .width = 32,
  1974. },
  1975. [VCAP_KF_L3_IP4_SIP] = {
  1976. .type = VCAP_FIELD_U32,
  1977. .offset = 144,
  1978. .width = 32,
  1979. },
  1980. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  1981. .type = VCAP_FIELD_BIT,
  1982. .offset = 176,
  1983. .width = 1,
  1984. },
  1985. [VCAP_KF_TCP_IS] = {
  1986. .type = VCAP_FIELD_BIT,
  1987. .offset = 177,
  1988. .width = 1,
  1989. },
  1990. [VCAP_KF_L4_DPORT] = {
  1991. .type = VCAP_FIELD_U32,
  1992. .offset = 178,
  1993. .width = 16,
  1994. },
  1995. [VCAP_KF_L4_SPORT] = {
  1996. .type = VCAP_FIELD_U32,
  1997. .offset = 194,
  1998. .width = 16,
  1999. },
  2000. [VCAP_KF_L4_RNG] = {
  2001. .type = VCAP_FIELD_U32,
  2002. .offset = 210,
  2003. .width = 16,
  2004. },
  2005. [VCAP_KF_L4_SPORT_EQ_DPORT_IS] = {
  2006. .type = VCAP_FIELD_BIT,
  2007. .offset = 226,
  2008. .width = 1,
  2009. },
  2010. [VCAP_KF_L4_SEQUENCE_EQ0_IS] = {
  2011. .type = VCAP_FIELD_BIT,
  2012. .offset = 227,
  2013. .width = 1,
  2014. },
  2015. [VCAP_KF_L4_FIN] = {
  2016. .type = VCAP_FIELD_BIT,
  2017. .offset = 228,
  2018. .width = 1,
  2019. },
  2020. [VCAP_KF_L4_SYN] = {
  2021. .type = VCAP_FIELD_BIT,
  2022. .offset = 229,
  2023. .width = 1,
  2024. },
  2025. [VCAP_KF_L4_RST] = {
  2026. .type = VCAP_FIELD_BIT,
  2027. .offset = 230,
  2028. .width = 1,
  2029. },
  2030. [VCAP_KF_L4_PSH] = {
  2031. .type = VCAP_FIELD_BIT,
  2032. .offset = 231,
  2033. .width = 1,
  2034. },
  2035. [VCAP_KF_L4_ACK] = {
  2036. .type = VCAP_FIELD_BIT,
  2037. .offset = 232,
  2038. .width = 1,
  2039. },
  2040. [VCAP_KF_L4_URG] = {
  2041. .type = VCAP_FIELD_BIT,
  2042. .offset = 233,
  2043. .width = 1,
  2044. },
  2045. [VCAP_KF_L4_PAYLOAD] = {
  2046. .type = VCAP_FIELD_U64,
  2047. .offset = 234,
  2048. .width = 64,
  2049. },
  2050. };
  2051. static const struct vcap_field es2_ip4_other_keyfield[] = {
  2052. [VCAP_KF_TYPE] = {
  2053. .type = VCAP_FIELD_U32,
  2054. .offset = 0,
  2055. .width = 3,
  2056. },
  2057. [VCAP_KF_LOOKUP_FIRST_IS] = {
  2058. .type = VCAP_FIELD_BIT,
  2059. .offset = 3,
  2060. .width = 1,
  2061. },
  2062. [VCAP_KF_L2_MC_IS] = {
  2063. .type = VCAP_FIELD_BIT,
  2064. .offset = 13,
  2065. .width = 1,
  2066. },
  2067. [VCAP_KF_L2_BC_IS] = {
  2068. .type = VCAP_FIELD_BIT,
  2069. .offset = 14,
  2070. .width = 1,
  2071. },
  2072. [VCAP_KF_ISDX_GT0_IS] = {
  2073. .type = VCAP_FIELD_BIT,
  2074. .offset = 15,
  2075. .width = 1,
  2076. },
  2077. [VCAP_KF_ISDX_CLS] = {
  2078. .type = VCAP_FIELD_U32,
  2079. .offset = 16,
  2080. .width = 12,
  2081. },
  2082. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  2083. .type = VCAP_FIELD_BIT,
  2084. .offset = 28,
  2085. .width = 1,
  2086. },
  2087. [VCAP_KF_8021Q_VID_CLS] = {
  2088. .type = VCAP_FIELD_U32,
  2089. .offset = 29,
  2090. .width = 13,
  2091. },
  2092. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = {
  2093. .type = VCAP_FIELD_U32,
  2094. .offset = 42,
  2095. .width = 3,
  2096. },
  2097. [VCAP_KF_IF_EGR_PORT_MASK] = {
  2098. .type = VCAP_FIELD_U32,
  2099. .offset = 45,
  2100. .width = 32,
  2101. },
  2102. [VCAP_KF_IF_IGR_PORT_SEL] = {
  2103. .type = VCAP_FIELD_BIT,
  2104. .offset = 77,
  2105. .width = 1,
  2106. },
  2107. [VCAP_KF_IF_IGR_PORT] = {
  2108. .type = VCAP_FIELD_U32,
  2109. .offset = 78,
  2110. .width = 9,
  2111. },
  2112. [VCAP_KF_8021Q_PCP_CLS] = {
  2113. .type = VCAP_FIELD_U32,
  2114. .offset = 87,
  2115. .width = 3,
  2116. },
  2117. [VCAP_KF_8021Q_DEI_CLS] = {
  2118. .type = VCAP_FIELD_BIT,
  2119. .offset = 90,
  2120. .width = 1,
  2121. },
  2122. [VCAP_KF_COSID_CLS] = {
  2123. .type = VCAP_FIELD_U32,
  2124. .offset = 91,
  2125. .width = 3,
  2126. },
  2127. [VCAP_KF_L3_DPL_CLS] = {
  2128. .type = VCAP_FIELD_BIT,
  2129. .offset = 94,
  2130. .width = 1,
  2131. },
  2132. [VCAP_KF_L3_RT_IS] = {
  2133. .type = VCAP_FIELD_BIT,
  2134. .offset = 95,
  2135. .width = 1,
  2136. },
  2137. [VCAP_KF_IP4_IS] = {
  2138. .type = VCAP_FIELD_BIT,
  2139. .offset = 99,
  2140. .width = 1,
  2141. },
  2142. [VCAP_KF_L3_FRAGMENT_TYPE] = {
  2143. .type = VCAP_FIELD_U32,
  2144. .offset = 100,
  2145. .width = 2,
  2146. },
  2147. [VCAP_KF_L3_OPTIONS_IS] = {
  2148. .type = VCAP_FIELD_BIT,
  2149. .offset = 102,
  2150. .width = 1,
  2151. },
  2152. [VCAP_KF_L3_TTL_GT0] = {
  2153. .type = VCAP_FIELD_BIT,
  2154. .offset = 103,
  2155. .width = 1,
  2156. },
  2157. [VCAP_KF_L3_TOS] = {
  2158. .type = VCAP_FIELD_U32,
  2159. .offset = 104,
  2160. .width = 8,
  2161. },
  2162. [VCAP_KF_L3_IP4_DIP] = {
  2163. .type = VCAP_FIELD_U32,
  2164. .offset = 112,
  2165. .width = 32,
  2166. },
  2167. [VCAP_KF_L3_IP4_SIP] = {
  2168. .type = VCAP_FIELD_U32,
  2169. .offset = 144,
  2170. .width = 32,
  2171. },
  2172. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  2173. .type = VCAP_FIELD_BIT,
  2174. .offset = 176,
  2175. .width = 1,
  2176. },
  2177. [VCAP_KF_L3_IP_PROTO] = {
  2178. .type = VCAP_FIELD_U32,
  2179. .offset = 177,
  2180. .width = 8,
  2181. },
  2182. [VCAP_KF_L3_PAYLOAD] = {
  2183. .type = VCAP_FIELD_U112,
  2184. .offset = 185,
  2185. .width = 96,
  2186. },
  2187. };
  2188. static const struct vcap_field es2_ip_7tuple_keyfield[] = {
  2189. [VCAP_KF_LOOKUP_FIRST_IS] = {
  2190. .type = VCAP_FIELD_BIT,
  2191. .offset = 0,
  2192. .width = 1,
  2193. },
  2194. [VCAP_KF_L2_MC_IS] = {
  2195. .type = VCAP_FIELD_BIT,
  2196. .offset = 10,
  2197. .width = 1,
  2198. },
  2199. [VCAP_KF_L2_BC_IS] = {
  2200. .type = VCAP_FIELD_BIT,
  2201. .offset = 11,
  2202. .width = 1,
  2203. },
  2204. [VCAP_KF_ISDX_GT0_IS] = {
  2205. .type = VCAP_FIELD_BIT,
  2206. .offset = 12,
  2207. .width = 1,
  2208. },
  2209. [VCAP_KF_ISDX_CLS] = {
  2210. .type = VCAP_FIELD_U32,
  2211. .offset = 13,
  2212. .width = 12,
  2213. },
  2214. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  2215. .type = VCAP_FIELD_BIT,
  2216. .offset = 25,
  2217. .width = 1,
  2218. },
  2219. [VCAP_KF_8021Q_VID_CLS] = {
  2220. .type = VCAP_FIELD_U32,
  2221. .offset = 26,
  2222. .width = 13,
  2223. },
  2224. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = {
  2225. .type = VCAP_FIELD_U32,
  2226. .offset = 39,
  2227. .width = 3,
  2228. },
  2229. [VCAP_KF_IF_EGR_PORT_MASK] = {
  2230. .type = VCAP_FIELD_U32,
  2231. .offset = 42,
  2232. .width = 32,
  2233. },
  2234. [VCAP_KF_IF_IGR_PORT_SEL] = {
  2235. .type = VCAP_FIELD_BIT,
  2236. .offset = 74,
  2237. .width = 1,
  2238. },
  2239. [VCAP_KF_IF_IGR_PORT] = {
  2240. .type = VCAP_FIELD_U32,
  2241. .offset = 75,
  2242. .width = 9,
  2243. },
  2244. [VCAP_KF_8021Q_PCP_CLS] = {
  2245. .type = VCAP_FIELD_U32,
  2246. .offset = 84,
  2247. .width = 3,
  2248. },
  2249. [VCAP_KF_8021Q_DEI_CLS] = {
  2250. .type = VCAP_FIELD_BIT,
  2251. .offset = 87,
  2252. .width = 1,
  2253. },
  2254. [VCAP_KF_COSID_CLS] = {
  2255. .type = VCAP_FIELD_U32,
  2256. .offset = 88,
  2257. .width = 3,
  2258. },
  2259. [VCAP_KF_L3_DPL_CLS] = {
  2260. .type = VCAP_FIELD_BIT,
  2261. .offset = 91,
  2262. .width = 1,
  2263. },
  2264. [VCAP_KF_L3_RT_IS] = {
  2265. .type = VCAP_FIELD_BIT,
  2266. .offset = 92,
  2267. .width = 1,
  2268. },
  2269. [VCAP_KF_L2_DMAC] = {
  2270. .type = VCAP_FIELD_U48,
  2271. .offset = 96,
  2272. .width = 48,
  2273. },
  2274. [VCAP_KF_L2_SMAC] = {
  2275. .type = VCAP_FIELD_U48,
  2276. .offset = 144,
  2277. .width = 48,
  2278. },
  2279. [VCAP_KF_IP4_IS] = {
  2280. .type = VCAP_FIELD_BIT,
  2281. .offset = 192,
  2282. .width = 1,
  2283. },
  2284. [VCAP_KF_L3_TTL_GT0] = {
  2285. .type = VCAP_FIELD_BIT,
  2286. .offset = 193,
  2287. .width = 1,
  2288. },
  2289. [VCAP_KF_L3_TOS] = {
  2290. .type = VCAP_FIELD_U32,
  2291. .offset = 194,
  2292. .width = 8,
  2293. },
  2294. [VCAP_KF_L3_IP6_DIP] = {
  2295. .type = VCAP_FIELD_U128,
  2296. .offset = 202,
  2297. .width = 128,
  2298. },
  2299. [VCAP_KF_L3_IP6_SIP] = {
  2300. .type = VCAP_FIELD_U128,
  2301. .offset = 330,
  2302. .width = 128,
  2303. },
  2304. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  2305. .type = VCAP_FIELD_BIT,
  2306. .offset = 458,
  2307. .width = 1,
  2308. },
  2309. [VCAP_KF_TCP_UDP_IS] = {
  2310. .type = VCAP_FIELD_BIT,
  2311. .offset = 459,
  2312. .width = 1,
  2313. },
  2314. [VCAP_KF_TCP_IS] = {
  2315. .type = VCAP_FIELD_BIT,
  2316. .offset = 460,
  2317. .width = 1,
  2318. },
  2319. [VCAP_KF_L4_DPORT] = {
  2320. .type = VCAP_FIELD_U32,
  2321. .offset = 461,
  2322. .width = 16,
  2323. },
  2324. [VCAP_KF_L4_SPORT] = {
  2325. .type = VCAP_FIELD_U32,
  2326. .offset = 477,
  2327. .width = 16,
  2328. },
  2329. [VCAP_KF_L4_RNG] = {
  2330. .type = VCAP_FIELD_U32,
  2331. .offset = 493,
  2332. .width = 16,
  2333. },
  2334. [VCAP_KF_L4_SPORT_EQ_DPORT_IS] = {
  2335. .type = VCAP_FIELD_BIT,
  2336. .offset = 509,
  2337. .width = 1,
  2338. },
  2339. [VCAP_KF_L4_SEQUENCE_EQ0_IS] = {
  2340. .type = VCAP_FIELD_BIT,
  2341. .offset = 510,
  2342. .width = 1,
  2343. },
  2344. [VCAP_KF_L4_FIN] = {
  2345. .type = VCAP_FIELD_BIT,
  2346. .offset = 511,
  2347. .width = 1,
  2348. },
  2349. [VCAP_KF_L4_SYN] = {
  2350. .type = VCAP_FIELD_BIT,
  2351. .offset = 512,
  2352. .width = 1,
  2353. },
  2354. [VCAP_KF_L4_RST] = {
  2355. .type = VCAP_FIELD_BIT,
  2356. .offset = 513,
  2357. .width = 1,
  2358. },
  2359. [VCAP_KF_L4_PSH] = {
  2360. .type = VCAP_FIELD_BIT,
  2361. .offset = 514,
  2362. .width = 1,
  2363. },
  2364. [VCAP_KF_L4_ACK] = {
  2365. .type = VCAP_FIELD_BIT,
  2366. .offset = 515,
  2367. .width = 1,
  2368. },
  2369. [VCAP_KF_L4_URG] = {
  2370. .type = VCAP_FIELD_BIT,
  2371. .offset = 516,
  2372. .width = 1,
  2373. },
  2374. [VCAP_KF_L4_PAYLOAD] = {
  2375. .type = VCAP_FIELD_U64,
  2376. .offset = 517,
  2377. .width = 64,
  2378. },
  2379. };
  2380. static const struct vcap_field es2_ip6_std_keyfield[] = {
  2381. [VCAP_KF_TYPE] = {
  2382. .type = VCAP_FIELD_U32,
  2383. .offset = 0,
  2384. .width = 3,
  2385. },
  2386. [VCAP_KF_LOOKUP_FIRST_IS] = {
  2387. .type = VCAP_FIELD_BIT,
  2388. .offset = 3,
  2389. .width = 1,
  2390. },
  2391. [VCAP_KF_L2_MC_IS] = {
  2392. .type = VCAP_FIELD_BIT,
  2393. .offset = 13,
  2394. .width = 1,
  2395. },
  2396. [VCAP_KF_L2_BC_IS] = {
  2397. .type = VCAP_FIELD_BIT,
  2398. .offset = 14,
  2399. .width = 1,
  2400. },
  2401. [VCAP_KF_ISDX_GT0_IS] = {
  2402. .type = VCAP_FIELD_BIT,
  2403. .offset = 15,
  2404. .width = 1,
  2405. },
  2406. [VCAP_KF_ISDX_CLS] = {
  2407. .type = VCAP_FIELD_U32,
  2408. .offset = 16,
  2409. .width = 12,
  2410. },
  2411. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  2412. .type = VCAP_FIELD_BIT,
  2413. .offset = 28,
  2414. .width = 1,
  2415. },
  2416. [VCAP_KF_8021Q_VID_CLS] = {
  2417. .type = VCAP_FIELD_U32,
  2418. .offset = 29,
  2419. .width = 13,
  2420. },
  2421. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = {
  2422. .type = VCAP_FIELD_U32,
  2423. .offset = 42,
  2424. .width = 3,
  2425. },
  2426. [VCAP_KF_IF_EGR_PORT_MASK] = {
  2427. .type = VCAP_FIELD_U32,
  2428. .offset = 45,
  2429. .width = 32,
  2430. },
  2431. [VCAP_KF_IF_IGR_PORT_SEL] = {
  2432. .type = VCAP_FIELD_BIT,
  2433. .offset = 77,
  2434. .width = 1,
  2435. },
  2436. [VCAP_KF_IF_IGR_PORT] = {
  2437. .type = VCAP_FIELD_U32,
  2438. .offset = 78,
  2439. .width = 9,
  2440. },
  2441. [VCAP_KF_8021Q_PCP_CLS] = {
  2442. .type = VCAP_FIELD_U32,
  2443. .offset = 87,
  2444. .width = 3,
  2445. },
  2446. [VCAP_KF_8021Q_DEI_CLS] = {
  2447. .type = VCAP_FIELD_BIT,
  2448. .offset = 90,
  2449. .width = 1,
  2450. },
  2451. [VCAP_KF_COSID_CLS] = {
  2452. .type = VCAP_FIELD_U32,
  2453. .offset = 91,
  2454. .width = 3,
  2455. },
  2456. [VCAP_KF_L3_DPL_CLS] = {
  2457. .type = VCAP_FIELD_BIT,
  2458. .offset = 94,
  2459. .width = 1,
  2460. },
  2461. [VCAP_KF_L3_RT_IS] = {
  2462. .type = VCAP_FIELD_BIT,
  2463. .offset = 95,
  2464. .width = 1,
  2465. },
  2466. [VCAP_KF_L3_TTL_GT0] = {
  2467. .type = VCAP_FIELD_BIT,
  2468. .offset = 99,
  2469. .width = 1,
  2470. },
  2471. [VCAP_KF_L3_IP6_SIP] = {
  2472. .type = VCAP_FIELD_U128,
  2473. .offset = 100,
  2474. .width = 128,
  2475. },
  2476. [VCAP_KF_L3_DIP_EQ_SIP_IS] = {
  2477. .type = VCAP_FIELD_BIT,
  2478. .offset = 228,
  2479. .width = 1,
  2480. },
  2481. [VCAP_KF_L3_IP_PROTO] = {
  2482. .type = VCAP_FIELD_U32,
  2483. .offset = 229,
  2484. .width = 8,
  2485. },
  2486. [VCAP_KF_L4_RNG] = {
  2487. .type = VCAP_FIELD_U32,
  2488. .offset = 237,
  2489. .width = 16,
  2490. },
  2491. [VCAP_KF_L3_PAYLOAD] = {
  2492. .type = VCAP_FIELD_U48,
  2493. .offset = 253,
  2494. .width = 40,
  2495. },
  2496. };
  2497. static const struct vcap_field es2_ip4_vid_keyfield[] = {
  2498. [VCAP_KF_LOOKUP_FIRST_IS] = {
  2499. .type = VCAP_FIELD_BIT,
  2500. .offset = 0,
  2501. .width = 1,
  2502. },
  2503. [VCAP_KF_ACL_GRP_ID] = {
  2504. .type = VCAP_FIELD_U32,
  2505. .offset = 1,
  2506. .width = 8,
  2507. },
  2508. [VCAP_KF_PROT_ACTIVE] = {
  2509. .type = VCAP_FIELD_BIT,
  2510. .offset = 9,
  2511. .width = 1,
  2512. },
  2513. [VCAP_KF_L2_MC_IS] = {
  2514. .type = VCAP_FIELD_BIT,
  2515. .offset = 10,
  2516. .width = 1,
  2517. },
  2518. [VCAP_KF_L2_BC_IS] = {
  2519. .type = VCAP_FIELD_BIT,
  2520. .offset = 11,
  2521. .width = 1,
  2522. },
  2523. [VCAP_KF_ISDX_GT0_IS] = {
  2524. .type = VCAP_FIELD_BIT,
  2525. .offset = 12,
  2526. .width = 1,
  2527. },
  2528. [VCAP_KF_ISDX_CLS] = {
  2529. .type = VCAP_FIELD_U32,
  2530. .offset = 13,
  2531. .width = 12,
  2532. },
  2533. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  2534. .type = VCAP_FIELD_BIT,
  2535. .offset = 25,
  2536. .width = 1,
  2537. },
  2538. [VCAP_KF_8021Q_VID_CLS] = {
  2539. .type = VCAP_FIELD_U32,
  2540. .offset = 26,
  2541. .width = 13,
  2542. },
  2543. [VCAP_KF_8021Q_PCP_CLS] = {
  2544. .type = VCAP_FIELD_U32,
  2545. .offset = 39,
  2546. .width = 3,
  2547. },
  2548. [VCAP_KF_8021Q_DEI_CLS] = {
  2549. .type = VCAP_FIELD_BIT,
  2550. .offset = 42,
  2551. .width = 1,
  2552. },
  2553. [VCAP_KF_COSID_CLS] = {
  2554. .type = VCAP_FIELD_U32,
  2555. .offset = 43,
  2556. .width = 3,
  2557. },
  2558. [VCAP_KF_L3_DPL_CLS] = {
  2559. .type = VCAP_FIELD_BIT,
  2560. .offset = 46,
  2561. .width = 1,
  2562. },
  2563. [VCAP_KF_L3_RT_IS] = {
  2564. .type = VCAP_FIELD_BIT,
  2565. .offset = 47,
  2566. .width = 1,
  2567. },
  2568. [VCAP_KF_ES0_ISDX_KEY_ENA] = {
  2569. .type = VCAP_FIELD_BIT,
  2570. .offset = 48,
  2571. .width = 1,
  2572. },
  2573. [VCAP_KF_MIRROR_PROBE] = {
  2574. .type = VCAP_FIELD_U32,
  2575. .offset = 49,
  2576. .width = 2,
  2577. },
  2578. [VCAP_KF_IP4_IS] = {
  2579. .type = VCAP_FIELD_BIT,
  2580. .offset = 51,
  2581. .width = 1,
  2582. },
  2583. [VCAP_KF_L3_IP4_DIP] = {
  2584. .type = VCAP_FIELD_U32,
  2585. .offset = 52,
  2586. .width = 32,
  2587. },
  2588. [VCAP_KF_L3_IP4_SIP] = {
  2589. .type = VCAP_FIELD_U32,
  2590. .offset = 84,
  2591. .width = 32,
  2592. },
  2593. [VCAP_KF_L4_RNG] = {
  2594. .type = VCAP_FIELD_U32,
  2595. .offset = 116,
  2596. .width = 16,
  2597. },
  2598. };
  2599. static const struct vcap_field es2_ip6_vid_keyfield[] = {
  2600. [VCAP_KF_TYPE] = {
  2601. .type = VCAP_FIELD_U32,
  2602. .offset = 0,
  2603. .width = 3,
  2604. },
  2605. [VCAP_KF_LOOKUP_FIRST_IS] = {
  2606. .type = VCAP_FIELD_BIT,
  2607. .offset = 3,
  2608. .width = 1,
  2609. },
  2610. [VCAP_KF_ACL_GRP_ID] = {
  2611. .type = VCAP_FIELD_U32,
  2612. .offset = 4,
  2613. .width = 8,
  2614. },
  2615. [VCAP_KF_PROT_ACTIVE] = {
  2616. .type = VCAP_FIELD_BIT,
  2617. .offset = 12,
  2618. .width = 1,
  2619. },
  2620. [VCAP_KF_L2_MC_IS] = {
  2621. .type = VCAP_FIELD_BIT,
  2622. .offset = 13,
  2623. .width = 1,
  2624. },
  2625. [VCAP_KF_L2_BC_IS] = {
  2626. .type = VCAP_FIELD_BIT,
  2627. .offset = 14,
  2628. .width = 1,
  2629. },
  2630. [VCAP_KF_ISDX_GT0_IS] = {
  2631. .type = VCAP_FIELD_BIT,
  2632. .offset = 15,
  2633. .width = 1,
  2634. },
  2635. [VCAP_KF_ISDX_CLS] = {
  2636. .type = VCAP_FIELD_U32,
  2637. .offset = 16,
  2638. .width = 12,
  2639. },
  2640. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = {
  2641. .type = VCAP_FIELD_BIT,
  2642. .offset = 28,
  2643. .width = 1,
  2644. },
  2645. [VCAP_KF_8021Q_VID_CLS] = {
  2646. .type = VCAP_FIELD_U32,
  2647. .offset = 29,
  2648. .width = 13,
  2649. },
  2650. [VCAP_KF_L3_RT_IS] = {
  2651. .type = VCAP_FIELD_BIT,
  2652. .offset = 42,
  2653. .width = 1,
  2654. },
  2655. [VCAP_KF_L3_IP6_DIP] = {
  2656. .type = VCAP_FIELD_U128,
  2657. .offset = 43,
  2658. .width = 128,
  2659. },
  2660. [VCAP_KF_L3_IP6_SIP] = {
  2661. .type = VCAP_FIELD_U128,
  2662. .offset = 171,
  2663. .width = 128,
  2664. },
  2665. };
  2666. /* keyfield_set */
  2667. static const struct vcap_set is0_keyfield_set[] = {
  2668. [VCAP_KFS_LL_FULL] = {
  2669. .type_id = 0,
  2670. .sw_per_item = 6,
  2671. .sw_cnt = 2,
  2672. },
  2673. [VCAP_KFS_NORMAL_7TUPLE] = {
  2674. .type_id = 0,
  2675. .sw_per_item = 12,
  2676. .sw_cnt = 1,
  2677. },
  2678. [VCAP_KFS_NORMAL_5TUPLE_IP4] = {
  2679. .type_id = 2,
  2680. .sw_per_item = 6,
  2681. .sw_cnt = 2,
  2682. },
  2683. [VCAP_KFS_PURE_5TUPLE_IP4] = {
  2684. .type_id = 2,
  2685. .sw_per_item = 3,
  2686. .sw_cnt = 4,
  2687. },
  2688. [VCAP_KFS_ETAG] = {
  2689. .type_id = 3,
  2690. .sw_per_item = 2,
  2691. .sw_cnt = 6,
  2692. },
  2693. };
  2694. static const struct vcap_set is2_keyfield_set[] = {
  2695. [VCAP_KFS_MAC_ETYPE] = {
  2696. .type_id = 0,
  2697. .sw_per_item = 6,
  2698. .sw_cnt = 2,
  2699. },
  2700. [VCAP_KFS_ARP] = {
  2701. .type_id = 3,
  2702. .sw_per_item = 6,
  2703. .sw_cnt = 2,
  2704. },
  2705. [VCAP_KFS_IP4_TCP_UDP] = {
  2706. .type_id = 4,
  2707. .sw_per_item = 6,
  2708. .sw_cnt = 2,
  2709. },
  2710. [VCAP_KFS_IP4_OTHER] = {
  2711. .type_id = 5,
  2712. .sw_per_item = 6,
  2713. .sw_cnt = 2,
  2714. },
  2715. [VCAP_KFS_IP6_STD] = {
  2716. .type_id = 6,
  2717. .sw_per_item = 6,
  2718. .sw_cnt = 2,
  2719. },
  2720. [VCAP_KFS_IP_7TUPLE] = {
  2721. .type_id = 1,
  2722. .sw_per_item = 12,
  2723. .sw_cnt = 1,
  2724. },
  2725. };
  2726. static const struct vcap_set es2_keyfield_set[] = {
  2727. [VCAP_KFS_MAC_ETYPE] = {
  2728. .type_id = 0,
  2729. .sw_per_item = 6,
  2730. .sw_cnt = 2,
  2731. },
  2732. [VCAP_KFS_ARP] = {
  2733. .type_id = 1,
  2734. .sw_per_item = 6,
  2735. .sw_cnt = 2,
  2736. },
  2737. [VCAP_KFS_IP4_TCP_UDP] = {
  2738. .type_id = 2,
  2739. .sw_per_item = 6,
  2740. .sw_cnt = 2,
  2741. },
  2742. [VCAP_KFS_IP4_OTHER] = {
  2743. .type_id = 3,
  2744. .sw_per_item = 6,
  2745. .sw_cnt = 2,
  2746. },
  2747. [VCAP_KFS_IP_7TUPLE] = {
  2748. .type_id = -1,
  2749. .sw_per_item = 12,
  2750. .sw_cnt = 1,
  2751. },
  2752. [VCAP_KFS_IP6_STD] = {
  2753. .type_id = 4,
  2754. .sw_per_item = 6,
  2755. .sw_cnt = 2,
  2756. },
  2757. [VCAP_KFS_IP4_VID] = {
  2758. .type_id = -1,
  2759. .sw_per_item = 3,
  2760. .sw_cnt = 4,
  2761. },
  2762. [VCAP_KFS_IP6_VID] = {
  2763. .type_id = 5,
  2764. .sw_per_item = 6,
  2765. .sw_cnt = 2,
  2766. },
  2767. };
  2768. /* keyfield_set map */
  2769. static const struct vcap_field *is0_keyfield_set_map[] = {
  2770. [VCAP_KFS_LL_FULL] = is0_ll_full_keyfield,
  2771. [VCAP_KFS_NORMAL_7TUPLE] = is0_normal_7tuple_keyfield,
  2772. [VCAP_KFS_NORMAL_5TUPLE_IP4] = is0_normal_5tuple_ip4_keyfield,
  2773. [VCAP_KFS_PURE_5TUPLE_IP4] = is0_pure_5tuple_ip4_keyfield,
  2774. [VCAP_KFS_ETAG] = is0_etag_keyfield,
  2775. };
  2776. static const struct vcap_field *is2_keyfield_set_map[] = {
  2777. [VCAP_KFS_MAC_ETYPE] = is2_mac_etype_keyfield,
  2778. [VCAP_KFS_ARP] = is2_arp_keyfield,
  2779. [VCAP_KFS_IP4_TCP_UDP] = is2_ip4_tcp_udp_keyfield,
  2780. [VCAP_KFS_IP4_OTHER] = is2_ip4_other_keyfield,
  2781. [VCAP_KFS_IP6_STD] = is2_ip6_std_keyfield,
  2782. [VCAP_KFS_IP_7TUPLE] = is2_ip_7tuple_keyfield,
  2783. };
  2784. static const struct vcap_field *es2_keyfield_set_map[] = {
  2785. [VCAP_KFS_MAC_ETYPE] = es2_mac_etype_keyfield,
  2786. [VCAP_KFS_ARP] = es2_arp_keyfield,
  2787. [VCAP_KFS_IP4_TCP_UDP] = es2_ip4_tcp_udp_keyfield,
  2788. [VCAP_KFS_IP4_OTHER] = es2_ip4_other_keyfield,
  2789. [VCAP_KFS_IP_7TUPLE] = es2_ip_7tuple_keyfield,
  2790. [VCAP_KFS_IP6_STD] = es2_ip6_std_keyfield,
  2791. [VCAP_KFS_IP4_VID] = es2_ip4_vid_keyfield,
  2792. [VCAP_KFS_IP6_VID] = es2_ip6_vid_keyfield,
  2793. };
  2794. /* keyfield_set map sizes */
  2795. static int is0_keyfield_set_map_size[] = {
  2796. [VCAP_KFS_LL_FULL] = ARRAY_SIZE(is0_ll_full_keyfield),
  2797. [VCAP_KFS_NORMAL_7TUPLE] = ARRAY_SIZE(is0_normal_7tuple_keyfield),
  2798. [VCAP_KFS_NORMAL_5TUPLE_IP4] = ARRAY_SIZE(is0_normal_5tuple_ip4_keyfield),
  2799. [VCAP_KFS_PURE_5TUPLE_IP4] = ARRAY_SIZE(is0_pure_5tuple_ip4_keyfield),
  2800. [VCAP_KFS_ETAG] = ARRAY_SIZE(is0_etag_keyfield),
  2801. };
  2802. static int is2_keyfield_set_map_size[] = {
  2803. [VCAP_KFS_MAC_ETYPE] = ARRAY_SIZE(is2_mac_etype_keyfield),
  2804. [VCAP_KFS_ARP] = ARRAY_SIZE(is2_arp_keyfield),
  2805. [VCAP_KFS_IP4_TCP_UDP] = ARRAY_SIZE(is2_ip4_tcp_udp_keyfield),
  2806. [VCAP_KFS_IP4_OTHER] = ARRAY_SIZE(is2_ip4_other_keyfield),
  2807. [VCAP_KFS_IP6_STD] = ARRAY_SIZE(is2_ip6_std_keyfield),
  2808. [VCAP_KFS_IP_7TUPLE] = ARRAY_SIZE(is2_ip_7tuple_keyfield),
  2809. };
  2810. static int es2_keyfield_set_map_size[] = {
  2811. [VCAP_KFS_MAC_ETYPE] = ARRAY_SIZE(es2_mac_etype_keyfield),
  2812. [VCAP_KFS_ARP] = ARRAY_SIZE(es2_arp_keyfield),
  2813. [VCAP_KFS_IP4_TCP_UDP] = ARRAY_SIZE(es2_ip4_tcp_udp_keyfield),
  2814. [VCAP_KFS_IP4_OTHER] = ARRAY_SIZE(es2_ip4_other_keyfield),
  2815. [VCAP_KFS_IP_7TUPLE] = ARRAY_SIZE(es2_ip_7tuple_keyfield),
  2816. [VCAP_KFS_IP6_STD] = ARRAY_SIZE(es2_ip6_std_keyfield),
  2817. [VCAP_KFS_IP4_VID] = ARRAY_SIZE(es2_ip4_vid_keyfield),
  2818. [VCAP_KFS_IP6_VID] = ARRAY_SIZE(es2_ip6_vid_keyfield),
  2819. };
  2820. /* actionfields */
  2821. static const struct vcap_field is0_classification_actionfield[] = {
  2822. [VCAP_AF_TYPE] = {
  2823. .type = VCAP_FIELD_BIT,
  2824. .offset = 0,
  2825. .width = 1,
  2826. },
  2827. [VCAP_AF_DSCP_ENA] = {
  2828. .type = VCAP_FIELD_BIT,
  2829. .offset = 1,
  2830. .width = 1,
  2831. },
  2832. [VCAP_AF_DSCP_VAL] = {
  2833. .type = VCAP_FIELD_U32,
  2834. .offset = 2,
  2835. .width = 6,
  2836. },
  2837. [VCAP_AF_QOS_ENA] = {
  2838. .type = VCAP_FIELD_BIT,
  2839. .offset = 12,
  2840. .width = 1,
  2841. },
  2842. [VCAP_AF_QOS_VAL] = {
  2843. .type = VCAP_FIELD_U32,
  2844. .offset = 13,
  2845. .width = 3,
  2846. },
  2847. [VCAP_AF_DP_ENA] = {
  2848. .type = VCAP_FIELD_BIT,
  2849. .offset = 16,
  2850. .width = 1,
  2851. },
  2852. [VCAP_AF_DP_VAL] = {
  2853. .type = VCAP_FIELD_U32,
  2854. .offset = 17,
  2855. .width = 2,
  2856. },
  2857. [VCAP_AF_DEI_ENA] = {
  2858. .type = VCAP_FIELD_BIT,
  2859. .offset = 19,
  2860. .width = 1,
  2861. },
  2862. [VCAP_AF_DEI_VAL] = {
  2863. .type = VCAP_FIELD_BIT,
  2864. .offset = 20,
  2865. .width = 1,
  2866. },
  2867. [VCAP_AF_PCP_ENA] = {
  2868. .type = VCAP_FIELD_BIT,
  2869. .offset = 21,
  2870. .width = 1,
  2871. },
  2872. [VCAP_AF_PCP_VAL] = {
  2873. .type = VCAP_FIELD_U32,
  2874. .offset = 22,
  2875. .width = 3,
  2876. },
  2877. [VCAP_AF_MAP_LOOKUP_SEL] = {
  2878. .type = VCAP_FIELD_U32,
  2879. .offset = 25,
  2880. .width = 2,
  2881. },
  2882. [VCAP_AF_MAP_KEY] = {
  2883. .type = VCAP_FIELD_U32,
  2884. .offset = 27,
  2885. .width = 3,
  2886. },
  2887. [VCAP_AF_MAP_IDX] = {
  2888. .type = VCAP_FIELD_U32,
  2889. .offset = 30,
  2890. .width = 9,
  2891. },
  2892. [VCAP_AF_CLS_VID_SEL] = {
  2893. .type = VCAP_FIELD_U32,
  2894. .offset = 39,
  2895. .width = 3,
  2896. },
  2897. [VCAP_AF_VID_VAL] = {
  2898. .type = VCAP_FIELD_U32,
  2899. .offset = 45,
  2900. .width = 13,
  2901. },
  2902. [VCAP_AF_ISDX_ADD_REPLACE_SEL] = {
  2903. .type = VCAP_FIELD_BIT,
  2904. .offset = 68,
  2905. .width = 1,
  2906. },
  2907. [VCAP_AF_ISDX_VAL] = {
  2908. .type = VCAP_FIELD_U32,
  2909. .offset = 69,
  2910. .width = 12,
  2911. },
  2912. [VCAP_AF_PAG_OVERRIDE_MASK] = {
  2913. .type = VCAP_FIELD_U32,
  2914. .offset = 109,
  2915. .width = 8,
  2916. },
  2917. [VCAP_AF_PAG_VAL] = {
  2918. .type = VCAP_FIELD_U32,
  2919. .offset = 117,
  2920. .width = 8,
  2921. },
  2922. [VCAP_AF_NXT_IDX_CTRL] = {
  2923. .type = VCAP_FIELD_U32,
  2924. .offset = 171,
  2925. .width = 3,
  2926. },
  2927. [VCAP_AF_NXT_IDX] = {
  2928. .type = VCAP_FIELD_U32,
  2929. .offset = 174,
  2930. .width = 12,
  2931. },
  2932. };
  2933. static const struct vcap_field is0_full_actionfield[] = {
  2934. [VCAP_AF_DSCP_ENA] = {
  2935. .type = VCAP_FIELD_BIT,
  2936. .offset = 0,
  2937. .width = 1,
  2938. },
  2939. [VCAP_AF_DSCP_VAL] = {
  2940. .type = VCAP_FIELD_U32,
  2941. .offset = 1,
  2942. .width = 6,
  2943. },
  2944. [VCAP_AF_QOS_ENA] = {
  2945. .type = VCAP_FIELD_BIT,
  2946. .offset = 11,
  2947. .width = 1,
  2948. },
  2949. [VCAP_AF_QOS_VAL] = {
  2950. .type = VCAP_FIELD_U32,
  2951. .offset = 12,
  2952. .width = 3,
  2953. },
  2954. [VCAP_AF_DP_ENA] = {
  2955. .type = VCAP_FIELD_BIT,
  2956. .offset = 15,
  2957. .width = 1,
  2958. },
  2959. [VCAP_AF_DP_VAL] = {
  2960. .type = VCAP_FIELD_U32,
  2961. .offset = 16,
  2962. .width = 2,
  2963. },
  2964. [VCAP_AF_DEI_ENA] = {
  2965. .type = VCAP_FIELD_BIT,
  2966. .offset = 18,
  2967. .width = 1,
  2968. },
  2969. [VCAP_AF_DEI_VAL] = {
  2970. .type = VCAP_FIELD_BIT,
  2971. .offset = 19,
  2972. .width = 1,
  2973. },
  2974. [VCAP_AF_PCP_ENA] = {
  2975. .type = VCAP_FIELD_BIT,
  2976. .offset = 20,
  2977. .width = 1,
  2978. },
  2979. [VCAP_AF_PCP_VAL] = {
  2980. .type = VCAP_FIELD_U32,
  2981. .offset = 21,
  2982. .width = 3,
  2983. },
  2984. [VCAP_AF_MAP_LOOKUP_SEL] = {
  2985. .type = VCAP_FIELD_U32,
  2986. .offset = 24,
  2987. .width = 2,
  2988. },
  2989. [VCAP_AF_MAP_KEY] = {
  2990. .type = VCAP_FIELD_U32,
  2991. .offset = 26,
  2992. .width = 3,
  2993. },
  2994. [VCAP_AF_MAP_IDX] = {
  2995. .type = VCAP_FIELD_U32,
  2996. .offset = 29,
  2997. .width = 9,
  2998. },
  2999. [VCAP_AF_CLS_VID_SEL] = {
  3000. .type = VCAP_FIELD_U32,
  3001. .offset = 38,
  3002. .width = 3,
  3003. },
  3004. [VCAP_AF_VID_VAL] = {
  3005. .type = VCAP_FIELD_U32,
  3006. .offset = 44,
  3007. .width = 13,
  3008. },
  3009. [VCAP_AF_ISDX_ADD_REPLACE_SEL] = {
  3010. .type = VCAP_FIELD_BIT,
  3011. .offset = 67,
  3012. .width = 1,
  3013. },
  3014. [VCAP_AF_ISDX_VAL] = {
  3015. .type = VCAP_FIELD_U32,
  3016. .offset = 68,
  3017. .width = 12,
  3018. },
  3019. [VCAP_AF_MASK_MODE] = {
  3020. .type = VCAP_FIELD_U32,
  3021. .offset = 80,
  3022. .width = 3,
  3023. },
  3024. [VCAP_AF_PORT_MASK] = {
  3025. .type = VCAP_FIELD_U72,
  3026. .offset = 83,
  3027. .width = 65,
  3028. },
  3029. [VCAP_AF_PAG_OVERRIDE_MASK] = {
  3030. .type = VCAP_FIELD_U32,
  3031. .offset = 204,
  3032. .width = 8,
  3033. },
  3034. [VCAP_AF_PAG_VAL] = {
  3035. .type = VCAP_FIELD_U32,
  3036. .offset = 212,
  3037. .width = 8,
  3038. },
  3039. [VCAP_AF_NXT_IDX_CTRL] = {
  3040. .type = VCAP_FIELD_U32,
  3041. .offset = 298,
  3042. .width = 3,
  3043. },
  3044. [VCAP_AF_NXT_IDX] = {
  3045. .type = VCAP_FIELD_U32,
  3046. .offset = 301,
  3047. .width = 12,
  3048. },
  3049. };
  3050. static const struct vcap_field is0_class_reduced_actionfield[] = {
  3051. [VCAP_AF_TYPE] = {
  3052. .type = VCAP_FIELD_BIT,
  3053. .offset = 0,
  3054. .width = 1,
  3055. },
  3056. [VCAP_AF_QOS_ENA] = {
  3057. .type = VCAP_FIELD_BIT,
  3058. .offset = 5,
  3059. .width = 1,
  3060. },
  3061. [VCAP_AF_QOS_VAL] = {
  3062. .type = VCAP_FIELD_U32,
  3063. .offset = 6,
  3064. .width = 3,
  3065. },
  3066. [VCAP_AF_DP_ENA] = {
  3067. .type = VCAP_FIELD_BIT,
  3068. .offset = 9,
  3069. .width = 1,
  3070. },
  3071. [VCAP_AF_DP_VAL] = {
  3072. .type = VCAP_FIELD_U32,
  3073. .offset = 10,
  3074. .width = 2,
  3075. },
  3076. [VCAP_AF_MAP_LOOKUP_SEL] = {
  3077. .type = VCAP_FIELD_U32,
  3078. .offset = 12,
  3079. .width = 2,
  3080. },
  3081. [VCAP_AF_MAP_KEY] = {
  3082. .type = VCAP_FIELD_U32,
  3083. .offset = 14,
  3084. .width = 3,
  3085. },
  3086. [VCAP_AF_CLS_VID_SEL] = {
  3087. .type = VCAP_FIELD_U32,
  3088. .offset = 17,
  3089. .width = 3,
  3090. },
  3091. [VCAP_AF_VID_VAL] = {
  3092. .type = VCAP_FIELD_U32,
  3093. .offset = 23,
  3094. .width = 13,
  3095. },
  3096. [VCAP_AF_ISDX_ADD_REPLACE_SEL] = {
  3097. .type = VCAP_FIELD_BIT,
  3098. .offset = 46,
  3099. .width = 1,
  3100. },
  3101. [VCAP_AF_ISDX_VAL] = {
  3102. .type = VCAP_FIELD_U32,
  3103. .offset = 47,
  3104. .width = 12,
  3105. },
  3106. [VCAP_AF_NXT_IDX_CTRL] = {
  3107. .type = VCAP_FIELD_U32,
  3108. .offset = 90,
  3109. .width = 3,
  3110. },
  3111. [VCAP_AF_NXT_IDX] = {
  3112. .type = VCAP_FIELD_U32,
  3113. .offset = 93,
  3114. .width = 12,
  3115. },
  3116. };
  3117. static const struct vcap_field is2_base_type_actionfield[] = {
  3118. [VCAP_AF_PIPELINE_FORCE_ENA] = {
  3119. .type = VCAP_FIELD_BIT,
  3120. .offset = 1,
  3121. .width = 1,
  3122. },
  3123. [VCAP_AF_PIPELINE_PT] = {
  3124. .type = VCAP_FIELD_U32,
  3125. .offset = 2,
  3126. .width = 5,
  3127. },
  3128. [VCAP_AF_HIT_ME_ONCE] = {
  3129. .type = VCAP_FIELD_BIT,
  3130. .offset = 7,
  3131. .width = 1,
  3132. },
  3133. [VCAP_AF_INTR_ENA] = {
  3134. .type = VCAP_FIELD_BIT,
  3135. .offset = 8,
  3136. .width = 1,
  3137. },
  3138. [VCAP_AF_CPU_COPY_ENA] = {
  3139. .type = VCAP_FIELD_BIT,
  3140. .offset = 9,
  3141. .width = 1,
  3142. },
  3143. [VCAP_AF_CPU_QUEUE_NUM] = {
  3144. .type = VCAP_FIELD_U32,
  3145. .offset = 10,
  3146. .width = 3,
  3147. },
  3148. [VCAP_AF_LRN_DIS] = {
  3149. .type = VCAP_FIELD_BIT,
  3150. .offset = 14,
  3151. .width = 1,
  3152. },
  3153. [VCAP_AF_RT_DIS] = {
  3154. .type = VCAP_FIELD_BIT,
  3155. .offset = 15,
  3156. .width = 1,
  3157. },
  3158. [VCAP_AF_POLICE_ENA] = {
  3159. .type = VCAP_FIELD_BIT,
  3160. .offset = 16,
  3161. .width = 1,
  3162. },
  3163. [VCAP_AF_POLICE_IDX] = {
  3164. .type = VCAP_FIELD_U32,
  3165. .offset = 17,
  3166. .width = 6,
  3167. },
  3168. [VCAP_AF_IGNORE_PIPELINE_CTRL] = {
  3169. .type = VCAP_FIELD_BIT,
  3170. .offset = 23,
  3171. .width = 1,
  3172. },
  3173. [VCAP_AF_MASK_MODE] = {
  3174. .type = VCAP_FIELD_U32,
  3175. .offset = 27,
  3176. .width = 3,
  3177. },
  3178. [VCAP_AF_PORT_MASK] = {
  3179. .type = VCAP_FIELD_U72,
  3180. .offset = 30,
  3181. .width = 68,
  3182. },
  3183. [VCAP_AF_MIRROR_PROBE] = {
  3184. .type = VCAP_FIELD_U32,
  3185. .offset = 111,
  3186. .width = 2,
  3187. },
  3188. [VCAP_AF_MATCH_ID] = {
  3189. .type = VCAP_FIELD_U32,
  3190. .offset = 159,
  3191. .width = 16,
  3192. },
  3193. [VCAP_AF_MATCH_ID_MASK] = {
  3194. .type = VCAP_FIELD_U32,
  3195. .offset = 175,
  3196. .width = 16,
  3197. },
  3198. [VCAP_AF_CNT_ID] = {
  3199. .type = VCAP_FIELD_U32,
  3200. .offset = 191,
  3201. .width = 12,
  3202. },
  3203. };
  3204. static const struct vcap_field es2_base_type_actionfield[] = {
  3205. [VCAP_AF_HIT_ME_ONCE] = {
  3206. .type = VCAP_FIELD_BIT,
  3207. .offset = 0,
  3208. .width = 1,
  3209. },
  3210. [VCAP_AF_INTR_ENA] = {
  3211. .type = VCAP_FIELD_BIT,
  3212. .offset = 1,
  3213. .width = 1,
  3214. },
  3215. [VCAP_AF_FWD_MODE] = {
  3216. .type = VCAP_FIELD_U32,
  3217. .offset = 2,
  3218. .width = 2,
  3219. },
  3220. [VCAP_AF_COPY_QUEUE_NUM] = {
  3221. .type = VCAP_FIELD_U32,
  3222. .offset = 4,
  3223. .width = 16,
  3224. },
  3225. [VCAP_AF_COPY_PORT_NUM] = {
  3226. .type = VCAP_FIELD_U32,
  3227. .offset = 20,
  3228. .width = 7,
  3229. },
  3230. [VCAP_AF_MIRROR_PROBE_ID] = {
  3231. .type = VCAP_FIELD_U32,
  3232. .offset = 27,
  3233. .width = 2,
  3234. },
  3235. [VCAP_AF_CPU_COPY_ENA] = {
  3236. .type = VCAP_FIELD_BIT,
  3237. .offset = 29,
  3238. .width = 1,
  3239. },
  3240. [VCAP_AF_CPU_QUEUE_NUM] = {
  3241. .type = VCAP_FIELD_U32,
  3242. .offset = 30,
  3243. .width = 3,
  3244. },
  3245. [VCAP_AF_POLICE_ENA] = {
  3246. .type = VCAP_FIELD_BIT,
  3247. .offset = 33,
  3248. .width = 1,
  3249. },
  3250. [VCAP_AF_POLICE_REMARK] = {
  3251. .type = VCAP_FIELD_BIT,
  3252. .offset = 34,
  3253. .width = 1,
  3254. },
  3255. [VCAP_AF_POLICE_IDX] = {
  3256. .type = VCAP_FIELD_U32,
  3257. .offset = 35,
  3258. .width = 6,
  3259. },
  3260. [VCAP_AF_ES2_REW_CMD] = {
  3261. .type = VCAP_FIELD_U32,
  3262. .offset = 41,
  3263. .width = 3,
  3264. },
  3265. [VCAP_AF_CNT_ID] = {
  3266. .type = VCAP_FIELD_U32,
  3267. .offset = 44,
  3268. .width = 11,
  3269. },
  3270. [VCAP_AF_IGNORE_PIPELINE_CTRL] = {
  3271. .type = VCAP_FIELD_BIT,
  3272. .offset = 55,
  3273. .width = 1,
  3274. },
  3275. };
  3276. /* actionfield_set */
  3277. static const struct vcap_set is0_actionfield_set[] = {
  3278. [VCAP_AFS_CLASSIFICATION] = {
  3279. .type_id = 1,
  3280. .sw_per_item = 2,
  3281. .sw_cnt = 6,
  3282. },
  3283. [VCAP_AFS_FULL] = {
  3284. .type_id = -1,
  3285. .sw_per_item = 3,
  3286. .sw_cnt = 4,
  3287. },
  3288. [VCAP_AFS_CLASS_REDUCED] = {
  3289. .type_id = 1,
  3290. .sw_per_item = 1,
  3291. .sw_cnt = 12,
  3292. },
  3293. };
  3294. static const struct vcap_set is2_actionfield_set[] = {
  3295. [VCAP_AFS_BASE_TYPE] = {
  3296. .type_id = -1,
  3297. .sw_per_item = 3,
  3298. .sw_cnt = 4,
  3299. },
  3300. };
  3301. static const struct vcap_set es2_actionfield_set[] = {
  3302. [VCAP_AFS_BASE_TYPE] = {
  3303. .type_id = -1,
  3304. .sw_per_item = 3,
  3305. .sw_cnt = 4,
  3306. },
  3307. };
  3308. /* actionfield_set map */
  3309. static const struct vcap_field *is0_actionfield_set_map[] = {
  3310. [VCAP_AFS_CLASSIFICATION] = is0_classification_actionfield,
  3311. [VCAP_AFS_FULL] = is0_full_actionfield,
  3312. [VCAP_AFS_CLASS_REDUCED] = is0_class_reduced_actionfield,
  3313. };
  3314. static const struct vcap_field *is2_actionfield_set_map[] = {
  3315. [VCAP_AFS_BASE_TYPE] = is2_base_type_actionfield,
  3316. };
  3317. static const struct vcap_field *es2_actionfield_set_map[] = {
  3318. [VCAP_AFS_BASE_TYPE] = es2_base_type_actionfield,
  3319. };
  3320. /* actionfield_set map size */
  3321. static int is0_actionfield_set_map_size[] = {
  3322. [VCAP_AFS_CLASSIFICATION] = ARRAY_SIZE(is0_classification_actionfield),
  3323. [VCAP_AFS_FULL] = ARRAY_SIZE(is0_full_actionfield),
  3324. [VCAP_AFS_CLASS_REDUCED] = ARRAY_SIZE(is0_class_reduced_actionfield),
  3325. };
  3326. static int is2_actionfield_set_map_size[] = {
  3327. [VCAP_AFS_BASE_TYPE] = ARRAY_SIZE(is2_base_type_actionfield),
  3328. };
  3329. static int es2_actionfield_set_map_size[] = {
  3330. [VCAP_AFS_BASE_TYPE] = ARRAY_SIZE(es2_base_type_actionfield),
  3331. };
  3332. /* Type Groups */
  3333. static const struct vcap_typegroup is0_x12_keyfield_set_typegroups[] = {
  3334. {
  3335. .offset = 0,
  3336. .width = 5,
  3337. .value = 16,
  3338. },
  3339. {
  3340. .offset = 52,
  3341. .width = 1,
  3342. .value = 0,
  3343. },
  3344. {
  3345. .offset = 104,
  3346. .width = 2,
  3347. .value = 0,
  3348. },
  3349. {
  3350. .offset = 156,
  3351. .width = 3,
  3352. .value = 0,
  3353. },
  3354. {
  3355. .offset = 208,
  3356. .width = 2,
  3357. .value = 0,
  3358. },
  3359. {
  3360. .offset = 260,
  3361. .width = 1,
  3362. .value = 0,
  3363. },
  3364. {
  3365. .offset = 312,
  3366. .width = 4,
  3367. .value = 0,
  3368. },
  3369. {
  3370. .offset = 364,
  3371. .width = 1,
  3372. .value = 0,
  3373. },
  3374. {
  3375. .offset = 416,
  3376. .width = 2,
  3377. .value = 0,
  3378. },
  3379. {
  3380. .offset = 468,
  3381. .width = 3,
  3382. .value = 0,
  3383. },
  3384. {
  3385. .offset = 520,
  3386. .width = 2,
  3387. .value = 0,
  3388. },
  3389. {
  3390. .offset = 572,
  3391. .width = 1,
  3392. .value = 0,
  3393. },
  3394. {}
  3395. };
  3396. static const struct vcap_typegroup is0_x6_keyfield_set_typegroups[] = {
  3397. {
  3398. .offset = 0,
  3399. .width = 4,
  3400. .value = 8,
  3401. },
  3402. {
  3403. .offset = 52,
  3404. .width = 1,
  3405. .value = 0,
  3406. },
  3407. {
  3408. .offset = 104,
  3409. .width = 2,
  3410. .value = 0,
  3411. },
  3412. {
  3413. .offset = 156,
  3414. .width = 3,
  3415. .value = 0,
  3416. },
  3417. {
  3418. .offset = 208,
  3419. .width = 2,
  3420. .value = 0,
  3421. },
  3422. {
  3423. .offset = 260,
  3424. .width = 1,
  3425. .value = 0,
  3426. },
  3427. {}
  3428. };
  3429. static const struct vcap_typegroup is0_x3_keyfield_set_typegroups[] = {
  3430. {
  3431. .offset = 0,
  3432. .width = 3,
  3433. .value = 4,
  3434. },
  3435. {
  3436. .offset = 52,
  3437. .width = 2,
  3438. .value = 0,
  3439. },
  3440. {
  3441. .offset = 104,
  3442. .width = 2,
  3443. .value = 0,
  3444. },
  3445. {}
  3446. };
  3447. static const struct vcap_typegroup is0_x2_keyfield_set_typegroups[] = {
  3448. {
  3449. .offset = 0,
  3450. .width = 2,
  3451. .value = 2,
  3452. },
  3453. {
  3454. .offset = 52,
  3455. .width = 1,
  3456. .value = 0,
  3457. },
  3458. {}
  3459. };
  3460. static const struct vcap_typegroup is0_x1_keyfield_set_typegroups[] = {
  3461. {}
  3462. };
  3463. static const struct vcap_typegroup is2_x12_keyfield_set_typegroups[] = {
  3464. {
  3465. .offset = 0,
  3466. .width = 3,
  3467. .value = 4,
  3468. },
  3469. {
  3470. .offset = 156,
  3471. .width = 1,
  3472. .value = 0,
  3473. },
  3474. {
  3475. .offset = 312,
  3476. .width = 2,
  3477. .value = 0,
  3478. },
  3479. {
  3480. .offset = 468,
  3481. .width = 1,
  3482. .value = 0,
  3483. },
  3484. {}
  3485. };
  3486. static const struct vcap_typegroup is2_x6_keyfield_set_typegroups[] = {
  3487. {
  3488. .offset = 0,
  3489. .width = 2,
  3490. .value = 2,
  3491. },
  3492. {
  3493. .offset = 156,
  3494. .width = 1,
  3495. .value = 0,
  3496. },
  3497. {}
  3498. };
  3499. static const struct vcap_typegroup is2_x3_keyfield_set_typegroups[] = {
  3500. {}
  3501. };
  3502. static const struct vcap_typegroup is2_x1_keyfield_set_typegroups[] = {
  3503. {}
  3504. };
  3505. static const struct vcap_typegroup es2_x12_keyfield_set_typegroups[] = {
  3506. {
  3507. .offset = 0,
  3508. .width = 3,
  3509. .value = 4,
  3510. },
  3511. {
  3512. .offset = 156,
  3513. .width = 1,
  3514. .value = 0,
  3515. },
  3516. {
  3517. .offset = 312,
  3518. .width = 2,
  3519. .value = 0,
  3520. },
  3521. {
  3522. .offset = 468,
  3523. .width = 1,
  3524. .value = 0,
  3525. },
  3526. {}
  3527. };
  3528. static const struct vcap_typegroup es2_x6_keyfield_set_typegroups[] = {
  3529. {
  3530. .offset = 0,
  3531. .width = 2,
  3532. .value = 2,
  3533. },
  3534. {
  3535. .offset = 156,
  3536. .width = 1,
  3537. .value = 0,
  3538. },
  3539. {}
  3540. };
  3541. static const struct vcap_typegroup es2_x3_keyfield_set_typegroups[] = {
  3542. {
  3543. .offset = 0,
  3544. .width = 1,
  3545. .value = 1,
  3546. },
  3547. {}
  3548. };
  3549. static const struct vcap_typegroup es2_x1_keyfield_set_typegroups[] = {
  3550. {}
  3551. };
  3552. static const struct vcap_typegroup *is0_keyfield_set_typegroups[] = {
  3553. [12] = is0_x12_keyfield_set_typegroups,
  3554. [6] = is0_x6_keyfield_set_typegroups,
  3555. [3] = is0_x3_keyfield_set_typegroups,
  3556. [2] = is0_x2_keyfield_set_typegroups,
  3557. [1] = is0_x1_keyfield_set_typegroups,
  3558. [13] = NULL,
  3559. };
  3560. static const struct vcap_typegroup *is2_keyfield_set_typegroups[] = {
  3561. [12] = is2_x12_keyfield_set_typegroups,
  3562. [6] = is2_x6_keyfield_set_typegroups,
  3563. [3] = is2_x3_keyfield_set_typegroups,
  3564. [1] = is2_x1_keyfield_set_typegroups,
  3565. [13] = NULL,
  3566. };
  3567. static const struct vcap_typegroup *es2_keyfield_set_typegroups[] = {
  3568. [12] = es2_x12_keyfield_set_typegroups,
  3569. [6] = es2_x6_keyfield_set_typegroups,
  3570. [3] = es2_x3_keyfield_set_typegroups,
  3571. [1] = es2_x1_keyfield_set_typegroups,
  3572. [13] = NULL,
  3573. };
  3574. static const struct vcap_typegroup is0_x3_actionfield_set_typegroups[] = {
  3575. {
  3576. .offset = 0,
  3577. .width = 3,
  3578. .value = 4,
  3579. },
  3580. {
  3581. .offset = 110,
  3582. .width = 2,
  3583. .value = 0,
  3584. },
  3585. {
  3586. .offset = 220,
  3587. .width = 2,
  3588. .value = 0,
  3589. },
  3590. {}
  3591. };
  3592. static const struct vcap_typegroup is0_x2_actionfield_set_typegroups[] = {
  3593. {
  3594. .offset = 0,
  3595. .width = 2,
  3596. .value = 2,
  3597. },
  3598. {
  3599. .offset = 110,
  3600. .width = 1,
  3601. .value = 0,
  3602. },
  3603. {}
  3604. };
  3605. static const struct vcap_typegroup is0_x1_actionfield_set_typegroups[] = {
  3606. {
  3607. .offset = 0,
  3608. .width = 1,
  3609. .value = 1,
  3610. },
  3611. {}
  3612. };
  3613. static const struct vcap_typegroup is2_x3_actionfield_set_typegroups[] = {
  3614. {
  3615. .offset = 0,
  3616. .width = 2,
  3617. .value = 2,
  3618. },
  3619. {
  3620. .offset = 110,
  3621. .width = 1,
  3622. .value = 0,
  3623. },
  3624. {
  3625. .offset = 220,
  3626. .width = 1,
  3627. .value = 0,
  3628. },
  3629. {}
  3630. };
  3631. static const struct vcap_typegroup is2_x1_actionfield_set_typegroups[] = {
  3632. {}
  3633. };
  3634. static const struct vcap_typegroup es2_x3_actionfield_set_typegroups[] = {
  3635. {
  3636. .offset = 0,
  3637. .width = 2,
  3638. .value = 2,
  3639. },
  3640. {
  3641. .offset = 21,
  3642. .width = 1,
  3643. .value = 0,
  3644. },
  3645. {
  3646. .offset = 42,
  3647. .width = 1,
  3648. .value = 0,
  3649. },
  3650. {}
  3651. };
  3652. static const struct vcap_typegroup es2_x1_actionfield_set_typegroups[] = {
  3653. {}
  3654. };
  3655. static const struct vcap_typegroup *is0_actionfield_set_typegroups[] = {
  3656. [3] = is0_x3_actionfield_set_typegroups,
  3657. [2] = is0_x2_actionfield_set_typegroups,
  3658. [1] = is0_x1_actionfield_set_typegroups,
  3659. [13] = NULL,
  3660. };
  3661. static const struct vcap_typegroup *is2_actionfield_set_typegroups[] = {
  3662. [3] = is2_x3_actionfield_set_typegroups,
  3663. [1] = is2_x1_actionfield_set_typegroups,
  3664. [13] = NULL,
  3665. };
  3666. static const struct vcap_typegroup *es2_actionfield_set_typegroups[] = {
  3667. [3] = es2_x3_actionfield_set_typegroups,
  3668. [1] = es2_x1_actionfield_set_typegroups,
  3669. [13] = NULL,
  3670. };
  3671. /* Keyfieldset names */
  3672. static const char * const vcap_keyfield_set_names[] = {
  3673. [VCAP_KFS_NO_VALUE] = "(None)",
  3674. [VCAP_KFS_ARP] = "VCAP_KFS_ARP",
  3675. [VCAP_KFS_ETAG] = "VCAP_KFS_ETAG",
  3676. [VCAP_KFS_IP4_OTHER] = "VCAP_KFS_IP4_OTHER",
  3677. [VCAP_KFS_IP4_TCP_UDP] = "VCAP_KFS_IP4_TCP_UDP",
  3678. [VCAP_KFS_IP4_VID] = "VCAP_KFS_IP4_VID",
  3679. [VCAP_KFS_IP6_OTHER] = "VCAP_KFS_IP6_OTHER",
  3680. [VCAP_KFS_IP6_STD] = "VCAP_KFS_IP6_STD",
  3681. [VCAP_KFS_IP6_TCP_UDP] = "VCAP_KFS_IP6_TCP_UDP",
  3682. [VCAP_KFS_IP6_VID] = "VCAP_KFS_IP6_VID",
  3683. [VCAP_KFS_IP_7TUPLE] = "VCAP_KFS_IP_7TUPLE",
  3684. [VCAP_KFS_ISDX] = "VCAP_KFS_ISDX",
  3685. [VCAP_KFS_LL_FULL] = "VCAP_KFS_LL_FULL",
  3686. [VCAP_KFS_MAC_ETYPE] = "VCAP_KFS_MAC_ETYPE",
  3687. [VCAP_KFS_MAC_LLC] = "VCAP_KFS_MAC_LLC",
  3688. [VCAP_KFS_MAC_SNAP] = "VCAP_KFS_MAC_SNAP",
  3689. [VCAP_KFS_NORMAL_5TUPLE_IP4] = "VCAP_KFS_NORMAL_5TUPLE_IP4",
  3690. [VCAP_KFS_NORMAL_7TUPLE] = "VCAP_KFS_NORMAL_7TUPLE",
  3691. [VCAP_KFS_OAM] = "VCAP_KFS_OAM",
  3692. [VCAP_KFS_PURE_5TUPLE_IP4] = "VCAP_KFS_PURE_5TUPLE_IP4",
  3693. [VCAP_KFS_SMAC_SIP4] = "VCAP_KFS_SMAC_SIP4",
  3694. [VCAP_KFS_SMAC_SIP6] = "VCAP_KFS_SMAC_SIP6",
  3695. };
  3696. /* Actionfieldset names */
  3697. static const char * const vcap_actionfield_set_names[] = {
  3698. [VCAP_AFS_NO_VALUE] = "(None)",
  3699. [VCAP_AFS_BASE_TYPE] = "VCAP_AFS_BASE_TYPE",
  3700. [VCAP_AFS_CLASSIFICATION] = "VCAP_AFS_CLASSIFICATION",
  3701. [VCAP_AFS_CLASS_REDUCED] = "VCAP_AFS_CLASS_REDUCED",
  3702. [VCAP_AFS_ES0] = "VCAP_AFS_ES0",
  3703. [VCAP_AFS_FULL] = "VCAP_AFS_FULL",
  3704. [VCAP_AFS_SMAC_SIP] = "VCAP_AFS_SMAC_SIP",
  3705. };
  3706. /* Keyfield names */
  3707. static const char * const vcap_keyfield_names[] = {
  3708. [VCAP_KF_NO_VALUE] = "(None)",
  3709. [VCAP_KF_8021BR_ECID_BASE] = "8021BR_ECID_BASE",
  3710. [VCAP_KF_8021BR_ECID_EXT] = "8021BR_ECID_EXT",
  3711. [VCAP_KF_8021BR_E_TAGGED] = "8021BR_E_TAGGED",
  3712. [VCAP_KF_8021BR_GRP] = "8021BR_GRP",
  3713. [VCAP_KF_8021BR_IGR_ECID_BASE] = "8021BR_IGR_ECID_BASE",
  3714. [VCAP_KF_8021BR_IGR_ECID_EXT] = "8021BR_IGR_ECID_EXT",
  3715. [VCAP_KF_8021Q_DEI0] = "8021Q_DEI0",
  3716. [VCAP_KF_8021Q_DEI1] = "8021Q_DEI1",
  3717. [VCAP_KF_8021Q_DEI2] = "8021Q_DEI2",
  3718. [VCAP_KF_8021Q_DEI_CLS] = "8021Q_DEI_CLS",
  3719. [VCAP_KF_8021Q_PCP0] = "8021Q_PCP0",
  3720. [VCAP_KF_8021Q_PCP1] = "8021Q_PCP1",
  3721. [VCAP_KF_8021Q_PCP2] = "8021Q_PCP2",
  3722. [VCAP_KF_8021Q_PCP_CLS] = "8021Q_PCP_CLS",
  3723. [VCAP_KF_8021Q_TPID] = "8021Q_TPID",
  3724. [VCAP_KF_8021Q_TPID0] = "8021Q_TPID0",
  3725. [VCAP_KF_8021Q_TPID1] = "8021Q_TPID1",
  3726. [VCAP_KF_8021Q_TPID2] = "8021Q_TPID2",
  3727. [VCAP_KF_8021Q_VID0] = "8021Q_VID0",
  3728. [VCAP_KF_8021Q_VID1] = "8021Q_VID1",
  3729. [VCAP_KF_8021Q_VID2] = "8021Q_VID2",
  3730. [VCAP_KF_8021Q_VID_CLS] = "8021Q_VID_CLS",
  3731. [VCAP_KF_8021Q_VLAN_TAGGED_IS] = "8021Q_VLAN_TAGGED_IS",
  3732. [VCAP_KF_8021Q_VLAN_TAGS] = "8021Q_VLAN_TAGS",
  3733. [VCAP_KF_ACL_GRP_ID] = "ACL_GRP_ID",
  3734. [VCAP_KF_ARP_ADDR_SPACE_OK_IS] = "ARP_ADDR_SPACE_OK_IS",
  3735. [VCAP_KF_ARP_LEN_OK_IS] = "ARP_LEN_OK_IS",
  3736. [VCAP_KF_ARP_OPCODE] = "ARP_OPCODE",
  3737. [VCAP_KF_ARP_OPCODE_UNKNOWN_IS] = "ARP_OPCODE_UNKNOWN_IS",
  3738. [VCAP_KF_ARP_PROTO_SPACE_OK_IS] = "ARP_PROTO_SPACE_OK_IS",
  3739. [VCAP_KF_ARP_SENDER_MATCH_IS] = "ARP_SENDER_MATCH_IS",
  3740. [VCAP_KF_ARP_TGT_MATCH_IS] = "ARP_TGT_MATCH_IS",
  3741. [VCAP_KF_COSID_CLS] = "COSID_CLS",
  3742. [VCAP_KF_ES0_ISDX_KEY_ENA] = "ES0_ISDX_KEY_ENA",
  3743. [VCAP_KF_ETYPE] = "ETYPE",
  3744. [VCAP_KF_ETYPE_LEN_IS] = "ETYPE_LEN_IS",
  3745. [VCAP_KF_HOST_MATCH] = "HOST_MATCH",
  3746. [VCAP_KF_IF_EGR_PORT_MASK] = "IF_EGR_PORT_MASK",
  3747. [VCAP_KF_IF_EGR_PORT_MASK_RNG] = "IF_EGR_PORT_MASK_RNG",
  3748. [VCAP_KF_IF_EGR_PORT_NO] = "IF_EGR_PORT_NO",
  3749. [VCAP_KF_IF_IGR_PORT] = "IF_IGR_PORT",
  3750. [VCAP_KF_IF_IGR_PORT_MASK] = "IF_IGR_PORT_MASK",
  3751. [VCAP_KF_IF_IGR_PORT_MASK_L3] = "IF_IGR_PORT_MASK_L3",
  3752. [VCAP_KF_IF_IGR_PORT_MASK_RNG] = "IF_IGR_PORT_MASK_RNG",
  3753. [VCAP_KF_IF_IGR_PORT_MASK_SEL] = "IF_IGR_PORT_MASK_SEL",
  3754. [VCAP_KF_IF_IGR_PORT_SEL] = "IF_IGR_PORT_SEL",
  3755. [VCAP_KF_IP4_IS] = "IP4_IS",
  3756. [VCAP_KF_IP_MC_IS] = "IP_MC_IS",
  3757. [VCAP_KF_IP_PAYLOAD_5TUPLE] = "IP_PAYLOAD_5TUPLE",
  3758. [VCAP_KF_IP_SNAP_IS] = "IP_SNAP_IS",
  3759. [VCAP_KF_ISDX_CLS] = "ISDX_CLS",
  3760. [VCAP_KF_ISDX_GT0_IS] = "ISDX_GT0_IS",
  3761. [VCAP_KF_L2_BC_IS] = "L2_BC_IS",
  3762. [VCAP_KF_L2_DMAC] = "L2_DMAC",
  3763. [VCAP_KF_L2_FRM_TYPE] = "L2_FRM_TYPE",
  3764. [VCAP_KF_L2_FWD_IS] = "L2_FWD_IS",
  3765. [VCAP_KF_L2_LLC] = "L2_LLC",
  3766. [VCAP_KF_L2_MC_IS] = "L2_MC_IS",
  3767. [VCAP_KF_L2_PAYLOAD0] = "L2_PAYLOAD0",
  3768. [VCAP_KF_L2_PAYLOAD1] = "L2_PAYLOAD1",
  3769. [VCAP_KF_L2_PAYLOAD2] = "L2_PAYLOAD2",
  3770. [VCAP_KF_L2_PAYLOAD_ETYPE] = "L2_PAYLOAD_ETYPE",
  3771. [VCAP_KF_L2_SMAC] = "L2_SMAC",
  3772. [VCAP_KF_L2_SNAP] = "L2_SNAP",
  3773. [VCAP_KF_L3_DIP_EQ_SIP_IS] = "L3_DIP_EQ_SIP_IS",
  3774. [VCAP_KF_L3_DPL_CLS] = "L3_DPL_CLS",
  3775. [VCAP_KF_L3_DSCP] = "L3_DSCP",
  3776. [VCAP_KF_L3_DST_IS] = "L3_DST_IS",
  3777. [VCAP_KF_L3_FRAGMENT] = "L3_FRAGMENT",
  3778. [VCAP_KF_L3_FRAGMENT_TYPE] = "L3_FRAGMENT_TYPE",
  3779. [VCAP_KF_L3_FRAG_INVLD_L4_LEN] = "L3_FRAG_INVLD_L4_LEN",
  3780. [VCAP_KF_L3_FRAG_OFS_GT0] = "L3_FRAG_OFS_GT0",
  3781. [VCAP_KF_L3_IP4_DIP] = "L3_IP4_DIP",
  3782. [VCAP_KF_L3_IP4_SIP] = "L3_IP4_SIP",
  3783. [VCAP_KF_L3_IP6_DIP] = "L3_IP6_DIP",
  3784. [VCAP_KF_L3_IP6_SIP] = "L3_IP6_SIP",
  3785. [VCAP_KF_L3_IP_PROTO] = "L3_IP_PROTO",
  3786. [VCAP_KF_L3_OPTIONS_IS] = "L3_OPTIONS_IS",
  3787. [VCAP_KF_L3_PAYLOAD] = "L3_PAYLOAD",
  3788. [VCAP_KF_L3_RT_IS] = "L3_RT_IS",
  3789. [VCAP_KF_L3_TOS] = "L3_TOS",
  3790. [VCAP_KF_L3_TTL_GT0] = "L3_TTL_GT0",
  3791. [VCAP_KF_L4_1588_DOM] = "L4_1588_DOM",
  3792. [VCAP_KF_L4_1588_VER] = "L4_1588_VER",
  3793. [VCAP_KF_L4_ACK] = "L4_ACK",
  3794. [VCAP_KF_L4_DPORT] = "L4_DPORT",
  3795. [VCAP_KF_L4_FIN] = "L4_FIN",
  3796. [VCAP_KF_L4_PAYLOAD] = "L4_PAYLOAD",
  3797. [VCAP_KF_L4_PSH] = "L4_PSH",
  3798. [VCAP_KF_L4_RNG] = "L4_RNG",
  3799. [VCAP_KF_L4_RST] = "L4_RST",
  3800. [VCAP_KF_L4_SEQUENCE_EQ0_IS] = "L4_SEQUENCE_EQ0_IS",
  3801. [VCAP_KF_L4_SPORT] = "L4_SPORT",
  3802. [VCAP_KF_L4_SPORT_EQ_DPORT_IS] = "L4_SPORT_EQ_DPORT_IS",
  3803. [VCAP_KF_L4_SYN] = "L4_SYN",
  3804. [VCAP_KF_L4_URG] = "L4_URG",
  3805. [VCAP_KF_LOOKUP_FIRST_IS] = "LOOKUP_FIRST_IS",
  3806. [VCAP_KF_LOOKUP_GEN_IDX] = "LOOKUP_GEN_IDX",
  3807. [VCAP_KF_LOOKUP_GEN_IDX_SEL] = "LOOKUP_GEN_IDX_SEL",
  3808. [VCAP_KF_LOOKUP_PAG] = "LOOKUP_PAG",
  3809. [VCAP_KF_MIRROR_PROBE] = "MIRROR_PROBE",
  3810. [VCAP_KF_OAM_CCM_CNTS_EQ0] = "OAM_CCM_CNTS_EQ0",
  3811. [VCAP_KF_OAM_DETECTED] = "OAM_DETECTED",
  3812. [VCAP_KF_OAM_FLAGS] = "OAM_FLAGS",
  3813. [VCAP_KF_OAM_MEL_FLAGS] = "OAM_MEL_FLAGS",
  3814. [VCAP_KF_OAM_MEPID] = "OAM_MEPID",
  3815. [VCAP_KF_OAM_OPCODE] = "OAM_OPCODE",
  3816. [VCAP_KF_OAM_VER] = "OAM_VER",
  3817. [VCAP_KF_OAM_Y1731_IS] = "OAM_Y1731_IS",
  3818. [VCAP_KF_PROT_ACTIVE] = "PROT_ACTIVE",
  3819. [VCAP_KF_TCP_IS] = "TCP_IS",
  3820. [VCAP_KF_TCP_UDP_IS] = "TCP_UDP_IS",
  3821. [VCAP_KF_TYPE] = "TYPE",
  3822. };
  3823. /* Actionfield names */
  3824. static const char * const vcap_actionfield_names[] = {
  3825. [VCAP_AF_NO_VALUE] = "(None)",
  3826. [VCAP_AF_ACL_ID] = "ACL_ID",
  3827. [VCAP_AF_CLS_VID_SEL] = "CLS_VID_SEL",
  3828. [VCAP_AF_CNT_ID] = "CNT_ID",
  3829. [VCAP_AF_COPY_PORT_NUM] = "COPY_PORT_NUM",
  3830. [VCAP_AF_COPY_QUEUE_NUM] = "COPY_QUEUE_NUM",
  3831. [VCAP_AF_CPU_COPY_ENA] = "CPU_COPY_ENA",
  3832. [VCAP_AF_CPU_QU] = "CPU_QU",
  3833. [VCAP_AF_CPU_QUEUE_NUM] = "CPU_QUEUE_NUM",
  3834. [VCAP_AF_DEI_A_VAL] = "DEI_A_VAL",
  3835. [VCAP_AF_DEI_B_VAL] = "DEI_B_VAL",
  3836. [VCAP_AF_DEI_C_VAL] = "DEI_C_VAL",
  3837. [VCAP_AF_DEI_ENA] = "DEI_ENA",
  3838. [VCAP_AF_DEI_VAL] = "DEI_VAL",
  3839. [VCAP_AF_DP_ENA] = "DP_ENA",
  3840. [VCAP_AF_DP_VAL] = "DP_VAL",
  3841. [VCAP_AF_DSCP_ENA] = "DSCP_ENA",
  3842. [VCAP_AF_DSCP_SEL] = "DSCP_SEL",
  3843. [VCAP_AF_DSCP_VAL] = "DSCP_VAL",
  3844. [VCAP_AF_ES2_REW_CMD] = "ES2_REW_CMD",
  3845. [VCAP_AF_ESDX] = "ESDX",
  3846. [VCAP_AF_FWD_KILL_ENA] = "FWD_KILL_ENA",
  3847. [VCAP_AF_FWD_MODE] = "FWD_MODE",
  3848. [VCAP_AF_FWD_SEL] = "FWD_SEL",
  3849. [VCAP_AF_HIT_ME_ONCE] = "HIT_ME_ONCE",
  3850. [VCAP_AF_HOST_MATCH] = "HOST_MATCH",
  3851. [VCAP_AF_IGNORE_PIPELINE_CTRL] = "IGNORE_PIPELINE_CTRL",
  3852. [VCAP_AF_INTR_ENA] = "INTR_ENA",
  3853. [VCAP_AF_ISDX_ADD_REPLACE_SEL] = "ISDX_ADD_REPLACE_SEL",
  3854. [VCAP_AF_ISDX_ENA] = "ISDX_ENA",
  3855. [VCAP_AF_ISDX_VAL] = "ISDX_VAL",
  3856. [VCAP_AF_LOOP_ENA] = "LOOP_ENA",
  3857. [VCAP_AF_LRN_DIS] = "LRN_DIS",
  3858. [VCAP_AF_MAP_IDX] = "MAP_IDX",
  3859. [VCAP_AF_MAP_KEY] = "MAP_KEY",
  3860. [VCAP_AF_MAP_LOOKUP_SEL] = "MAP_LOOKUP_SEL",
  3861. [VCAP_AF_MASK_MODE] = "MASK_MODE",
  3862. [VCAP_AF_MATCH_ID] = "MATCH_ID",
  3863. [VCAP_AF_MATCH_ID_MASK] = "MATCH_ID_MASK",
  3864. [VCAP_AF_MIRROR_ENA] = "MIRROR_ENA",
  3865. [VCAP_AF_MIRROR_PROBE] = "MIRROR_PROBE",
  3866. [VCAP_AF_MIRROR_PROBE_ID] = "MIRROR_PROBE_ID",
  3867. [VCAP_AF_NXT_IDX] = "NXT_IDX",
  3868. [VCAP_AF_NXT_IDX_CTRL] = "NXT_IDX_CTRL",
  3869. [VCAP_AF_PAG_OVERRIDE_MASK] = "PAG_OVERRIDE_MASK",
  3870. [VCAP_AF_PAG_VAL] = "PAG_VAL",
  3871. [VCAP_AF_PCP_A_VAL] = "PCP_A_VAL",
  3872. [VCAP_AF_PCP_B_VAL] = "PCP_B_VAL",
  3873. [VCAP_AF_PCP_C_VAL] = "PCP_C_VAL",
  3874. [VCAP_AF_PCP_ENA] = "PCP_ENA",
  3875. [VCAP_AF_PCP_VAL] = "PCP_VAL",
  3876. [VCAP_AF_PIPELINE_ACT] = "PIPELINE_ACT",
  3877. [VCAP_AF_PIPELINE_FORCE_ENA] = "PIPELINE_FORCE_ENA",
  3878. [VCAP_AF_PIPELINE_PT] = "PIPELINE_PT",
  3879. [VCAP_AF_POLICE_ENA] = "POLICE_ENA",
  3880. [VCAP_AF_POLICE_IDX] = "POLICE_IDX",
  3881. [VCAP_AF_POLICE_REMARK] = "POLICE_REMARK",
  3882. [VCAP_AF_POLICE_VCAP_ONLY] = "POLICE_VCAP_ONLY",
  3883. [VCAP_AF_POP_VAL] = "POP_VAL",
  3884. [VCAP_AF_PORT_MASK] = "PORT_MASK",
  3885. [VCAP_AF_PUSH_CUSTOMER_TAG] = "PUSH_CUSTOMER_TAG",
  3886. [VCAP_AF_PUSH_INNER_TAG] = "PUSH_INNER_TAG",
  3887. [VCAP_AF_PUSH_OUTER_TAG] = "PUSH_OUTER_TAG",
  3888. [VCAP_AF_QOS_ENA] = "QOS_ENA",
  3889. [VCAP_AF_QOS_VAL] = "QOS_VAL",
  3890. [VCAP_AF_REW_OP] = "REW_OP",
  3891. [VCAP_AF_RT_DIS] = "RT_DIS",
  3892. [VCAP_AF_SWAP_MACS_ENA] = "SWAP_MACS_ENA",
  3893. [VCAP_AF_TAG_A_DEI_SEL] = "TAG_A_DEI_SEL",
  3894. [VCAP_AF_TAG_A_PCP_SEL] = "TAG_A_PCP_SEL",
  3895. [VCAP_AF_TAG_A_TPID_SEL] = "TAG_A_TPID_SEL",
  3896. [VCAP_AF_TAG_A_VID_SEL] = "TAG_A_VID_SEL",
  3897. [VCAP_AF_TAG_B_DEI_SEL] = "TAG_B_DEI_SEL",
  3898. [VCAP_AF_TAG_B_PCP_SEL] = "TAG_B_PCP_SEL",
  3899. [VCAP_AF_TAG_B_TPID_SEL] = "TAG_B_TPID_SEL",
  3900. [VCAP_AF_TAG_B_VID_SEL] = "TAG_B_VID_SEL",
  3901. [VCAP_AF_TAG_C_DEI_SEL] = "TAG_C_DEI_SEL",
  3902. [VCAP_AF_TAG_C_PCP_SEL] = "TAG_C_PCP_SEL",
  3903. [VCAP_AF_TAG_C_TPID_SEL] = "TAG_C_TPID_SEL",
  3904. [VCAP_AF_TAG_C_VID_SEL] = "TAG_C_VID_SEL",
  3905. [VCAP_AF_TYPE] = "TYPE",
  3906. [VCAP_AF_UNTAG_VID_ENA] = "UNTAG_VID_ENA",
  3907. [VCAP_AF_VID_A_VAL] = "VID_A_VAL",
  3908. [VCAP_AF_VID_B_VAL] = "VID_B_VAL",
  3909. [VCAP_AF_VID_C_VAL] = "VID_C_VAL",
  3910. [VCAP_AF_VID_VAL] = "VID_VAL",
  3911. };
  3912. /* VCAPs */
  3913. const struct vcap_info kunit_test_vcaps[] = {
  3914. [VCAP_TYPE_IS0] = {
  3915. .name = "is0",
  3916. .rows = 1024,
  3917. .sw_count = 12,
  3918. .sw_width = 52,
  3919. .sticky_width = 1,
  3920. .act_width = 110,
  3921. .default_cnt = 140,
  3922. .require_cnt_dis = 0,
  3923. .version = 1,
  3924. .keyfield_set = is0_keyfield_set,
  3925. .keyfield_set_size = ARRAY_SIZE(is0_keyfield_set),
  3926. .actionfield_set = is0_actionfield_set,
  3927. .actionfield_set_size = ARRAY_SIZE(is0_actionfield_set),
  3928. .keyfield_set_map = is0_keyfield_set_map,
  3929. .keyfield_set_map_size = is0_keyfield_set_map_size,
  3930. .actionfield_set_map = is0_actionfield_set_map,
  3931. .actionfield_set_map_size = is0_actionfield_set_map_size,
  3932. .keyfield_set_typegroups = is0_keyfield_set_typegroups,
  3933. .actionfield_set_typegroups = is0_actionfield_set_typegroups,
  3934. },
  3935. [VCAP_TYPE_IS2] = {
  3936. .name = "is2",
  3937. .rows = 256,
  3938. .sw_count = 12,
  3939. .sw_width = 52,
  3940. .sticky_width = 1,
  3941. .act_width = 110,
  3942. .default_cnt = 73,
  3943. .require_cnt_dis = 0,
  3944. .version = 1,
  3945. .keyfield_set = is2_keyfield_set,
  3946. .keyfield_set_size = ARRAY_SIZE(is2_keyfield_set),
  3947. .actionfield_set = is2_actionfield_set,
  3948. .actionfield_set_size = ARRAY_SIZE(is2_actionfield_set),
  3949. .keyfield_set_map = is2_keyfield_set_map,
  3950. .keyfield_set_map_size = is2_keyfield_set_map_size,
  3951. .actionfield_set_map = is2_actionfield_set_map,
  3952. .actionfield_set_map_size = is2_actionfield_set_map_size,
  3953. .keyfield_set_typegroups = is2_keyfield_set_typegroups,
  3954. .actionfield_set_typegroups = is2_actionfield_set_typegroups,
  3955. },
  3956. [VCAP_TYPE_ES2] = {
  3957. .name = "es2",
  3958. .rows = 1024,
  3959. .sw_count = 12,
  3960. .sw_width = 52,
  3961. .sticky_width = 1,
  3962. .act_width = 21,
  3963. .default_cnt = 74,
  3964. .require_cnt_dis = 0,
  3965. .version = 1,
  3966. .keyfield_set = es2_keyfield_set,
  3967. .keyfield_set_size = ARRAY_SIZE(es2_keyfield_set),
  3968. .actionfield_set = es2_actionfield_set,
  3969. .actionfield_set_size = ARRAY_SIZE(es2_actionfield_set),
  3970. .keyfield_set_map = es2_keyfield_set_map,
  3971. .keyfield_set_map_size = es2_keyfield_set_map_size,
  3972. .actionfield_set_map = es2_actionfield_set_map,
  3973. .actionfield_set_map_size = es2_actionfield_set_map_size,
  3974. .keyfield_set_typegroups = es2_keyfield_set_typegroups,
  3975. .actionfield_set_typegroups = es2_actionfield_set_typegroups,
  3976. },
  3977. };
  3978. const struct vcap_statistics kunit_test_vcap_stats = {
  3979. .name = "kunit_test",
  3980. .count = 3,
  3981. .keyfield_set_names = vcap_keyfield_set_names,
  3982. .actionfield_set_names = vcap_actionfield_set_names,
  3983. .keyfield_names = vcap_keyfield_names,
  3984. .actionfield_names = vcap_actionfield_names,
  3985. };