enhancements to host based flow table management
PATCH 37/58 net/bnxt: modify ULP template
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
1. Update template to add both ipv4 and ipv6 flows.
2. The VF representor template missed generic table read.
--- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 3224 ++++------------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 272 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 194 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 202 +- .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 72 +- .../tf_ulp/ulp_template_db_wh_plus_class.c | 2163 +++++++++-- 6 files changed, 2946 insertions(+), 3181 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +788 -2436
@@ -3,7 +3,7 @@* All rights reserved. */ -/* date: Tue Dec 1 11:40:24 2020 */ +/* date: Mon Dec 7 09:51:03 2020 */ #include "ulp_template_db_enum.h" #include "ulp_template_db_field.h"
@@ -16,1800 +16,571 @@* maps hash id to ulp_class_match_list[] index */ uint16_t ulp_class_sig_tbl[BNXT_ULP_CLASS_SIG_TBL_MAX_SZ ] = { - [BNXT_ULP_CLASS_HID_07e0] =1 , - [BNXT_ULP_CLASS_HID_01dc] =2 , - [BNXT_ULP_CLASS_HID_006e] =3 , - [BNXT_ULP_CLASS_HID_025a] =4 , - [BNXT_ULP_CLASS_HID_0146 ] =5 , - [BNXT_ULP_CLASS_HID_0332 ] =6 , - [BNXT_ULP_CLASS_HID_01c4] =7 , - [BNXT_ULP_CLASS_HID_078a] =8 , - [BNXT_ULP_CLASS_HID_02ed] =9 , - [BNXT_ULP_CLASS_HID_04d9] =10 , - [BNXT_ULP_CLASS_HID_036b] =11 , - [BNXT_ULP_CLASS_HID_0131 ] =12 , - [BNXT_ULP_CLASS_HID_0217 ] =13 , - [BNXT_ULP_CLASS_HID_03c3] =14 , - [BNXT_ULP_CLASS_HID_0295 ] =15 , - [BNXT_ULP_CLASS_HID_0441 ] =16 , - [BNXT_ULP_CLASS_HID_0095 ] =17 , - [BNXT_ULP_CLASS_HID_0241 ] =18 , - [BNXT_ULP_CLASS_HID_04ed] =19 , - [BNXT_ULP_CLASS_HID_06d9] =20 , - [BNXT_ULP_CLASS_HID_07bf] =21 , - [BNXT_ULP_CLASS_HID_016b] =22 , - [BNXT_ULP_CLASS_HID_0417 ] =23 , - [BNXT_ULP_CLASS_HID_05c3] =24 , - [BNXT_ULP_CLASS_HID_0187 ] =25 , - [BNXT_ULP_CLASS_HID_0373 ] =26 , - [BNXT_ULP_CLASS_HID_0205 ] =27 , - [BNXT_ULP_CLASS_HID_03f1] =28 , - [BNXT_ULP_CLASS_HID_00a1] =29 , - [BNXT_ULP_CLASS_HID_029d] =30 , - [BNXT_ULP_CLASS_HID_012f] =31 , - [BNXT_ULP_CLASS_HID_031b] =32 , - [BNXT_ULP_CLASS_HID_072f] =33 , - [BNXT_ULP_CLASS_HID_011b] =34 , - [BNXT_ULP_CLASS_HID_0387 ] =35 , - [BNXT_ULP_CLASS_HID_0573 ] =36 , - [BNXT_ULP_CLASS_HID_0649 ] =37 , - [BNXT_ULP_CLASS_HID_0005 ] =38 , - [BNXT_ULP_CLASS_HID_02a1] =39 , - [BNXT_ULP_CLASS_HID_049d] =40 , - [BNXT_ULP_CLASS_HID_01ea] =41 , - [BNXT_ULP_CLASS_HID_03de] =42 , - [BNXT_ULP_CLASS_HID_0672 ] =43 , - [BNXT_ULP_CLASS_HID_0026 ] =44 , - [BNXT_ULP_CLASS_HID_0746 ] =45 , - [BNXT_ULP_CLASS_HID_010a] =46 , - [BNXT_ULP_CLASS_HID_03ae] =47 , - [BNXT_ULP_CLASS_HID_0592 ] =48 , - [BNXT_ULP_CLASS_HID_07d0] =49 , - [BNXT_ULP_CLASS_HID_01ec] =50 , - [BNXT_ULP_CLASS_HID_005e] =51 , - [BNXT_ULP_CLASS_HID_026a] =52 , - [BNXT_ULP_CLASS_HID_0176 ] =53 , - [BNXT_ULP_CLASS_HID_0302 ] =54 , - [BNXT_ULP_CLASS_HID_01f4] =55 , - [BNXT_ULP_CLASS_HID_07ba] =56 , - [BNXT_ULP_CLASS_HID_06a7] =57 , - [BNXT_ULP_CLASS_HID_006b] =58 , - [BNXT_ULP_CLASS_HID_0725 ] =59 , - [BNXT_ULP_CLASS_HID_00e9] =60 , - [BNXT_ULP_CLASS_HID_05d9] =61 , - [BNXT_ULP_CLASS_HID_078d] =62 , - [BNXT_ULP_CLASS_HID_065f] =63 , - [BNXT_ULP_CLASS_HID_0003 ] =64 , - [BNXT_ULP_CLASS_HID_045f] =65 , - [BNXT_ULP_CLASS_HID_0603 ] =66 , - [BNXT_ULP_CLASS_HID_00a7] =67 , - [BNXT_ULP_CLASS_HID_026b] =68 , - [BNXT_ULP_CLASS_HID_0371 ] =69 , - [BNXT_ULP_CLASS_HID_0525 ] =70 , - [BNXT_ULP_CLASS_HID_07d9] =71 , - [BNXT_ULP_CLASS_HID_018d] =72 , - [BNXT_ULP_CLASS_HID_0177 ] =73 , - [BNXT_ULP_CLASS_HID_033b] =74 , - [BNXT_ULP_CLASS_HID_05df] =75 , - [BNXT_ULP_CLASS_HID_0783 ] =76 , - [BNXT_ULP_CLASS_HID_0069 ] =77 , - [BNXT_ULP_CLASS_HID_025d] =78 , - [BNXT_ULP_CLASS_HID_00ef] =79 , - [BNXT_ULP_CLASS_HID_06a5] =80 , - [BNXT_ULP_CLASS_HID_02f1] =81 , - [BNXT_ULP_CLASS_HID_04a5] =82 , - [BNXT_ULP_CLASS_HID_0377 ] =83 , - [BNXT_ULP_CLASS_HID_053b] =84 , - [BNXT_ULP_CLASS_HID_0601 ] =85 , - [BNXT_ULP_CLASS_HID_03df] =86 , - [BNXT_ULP_CLASS_HID_0269 ] =87 , - [BNXT_ULP_CLASS_HID_045d] =88 , - [BNXT_ULP_CLASS_HID_02dd] =89 , - [BNXT_ULP_CLASS_HID_04e9] =90 , - [BNXT_ULP_CLASS_HID_035b] =91 , - [BNXT_ULP_CLASS_HID_0101 ] =92 , - [BNXT_ULP_CLASS_HID_0227 ] =93 , - [BNXT_ULP_CLASS_HID_03f3] =94 , - [BNXT_ULP_CLASS_HID_02a5] =95 , - [BNXT_ULP_CLASS_HID_0471 ] =96 , - [BNXT_ULP_CLASS_HID_00a5] =97 , - [BNXT_ULP_CLASS_HID_0271 ] =98 , - [BNXT_ULP_CLASS_HID_04dd] =99 , - [BNXT_ULP_CLASS_HID_06e9] =100 , - [BNXT_ULP_CLASS_HID_078f] =101 , - [BNXT_ULP_CLASS_HID_015b] =102 , - [BNXT_ULP_CLASS_HID_0427 ] =103 , - [BNXT_ULP_CLASS_HID_05f3] =104 , - [BNXT_ULP_CLASS_HID_01b7] =105 , - [BNXT_ULP_CLASS_HID_0343 ] =106 , - [BNXT_ULP_CLASS_HID_0235 ] =107 , - [BNXT_ULP_CLASS_HID_03c1] =108 , - [BNXT_ULP_CLASS_HID_0091 ] =109 , - [BNXT_ULP_CLASS_HID_02ad] =110 , - [BNXT_ULP_CLASS_HID_011f] =111 , - [BNXT_ULP_CLASS_HID_032b] =112 , - [BNXT_ULP_CLASS_HID_071f] =113 , - [BNXT_ULP_CLASS_HID_012b] =114 , - [BNXT_ULP_CLASS_HID_03b7] =115 , - [BNXT_ULP_CLASS_HID_0543 ] =116 , - [BNXT_ULP_CLASS_HID_0679 ] =117 , - [BNXT_ULP_CLASS_HID_0035 ] =118 , - [BNXT_ULP_CLASS_HID_0291 ] =119 , - [BNXT_ULP_CLASS_HID_04ad] =120 , - [BNXT_ULP_CLASS_HID_01da] =121 , - [BNXT_ULP_CLASS_HID_03ee] =122 , - [BNXT_ULP_CLASS_HID_0642 ] =123 , - [BNXT_ULP_CLASS_HID_0016 ] =124 , - [BNXT_ULP_CLASS_HID_0776 ] =125 , - [BNXT_ULP_CLASS_HID_013a] =126 , - [BNXT_ULP_CLASS_HID_039e] =127 , - [BNXT_ULP_CLASS_HID_05a2] =128 , - [BNXT_ULP_CLASS_HID_0697 ] =129 , - [BNXT_ULP_CLASS_HID_005b] =130 , - [BNXT_ULP_CLASS_HID_0715 ] =131 , - [BNXT_ULP_CLASS_HID_00d9] =132 , - [BNXT_ULP_CLASS_HID_05e9] =133 , - [BNXT_ULP_CLASS_HID_07bd] =134 , - [BNXT_ULP_CLASS_HID_066f] =135 , - [BNXT_ULP_CLASS_HID_0033 ] =136 , - [BNXT_ULP_CLASS_HID_046f] =137 , - [BNXT_ULP_CLASS_HID_0633 ] =138 , - [BNXT_ULP_CLASS_HID_0097 ] =139 , - [BNXT_ULP_CLASS_HID_025b] =140 , - [BNXT_ULP_CLASS_HID_0341 ] =141 , - [BNXT_ULP_CLASS_HID_0515 ] =142 , - [BNXT_ULP_CLASS_HID_07e9] =143 , - [BNXT_ULP_CLASS_HID_01bd] =144 , - [BNXT_ULP_CLASS_HID_0147 ] =145 , - [BNXT_ULP_CLASS_HID_030b] =146 , - [BNXT_ULP_CLASS_HID_05ef] =147 , - [BNXT_ULP_CLASS_HID_07b3] =148 , - [BNXT_ULP_CLASS_HID_0059 ] =149 , - [BNXT_ULP_CLASS_HID_026d] =150 , - [BNXT_ULP_CLASS_HID_00df] =151 , - [BNXT_ULP_CLASS_HID_0695 ] =152 , - [BNXT_ULP_CLASS_HID_02c1] =153 , - [BNXT_ULP_CLASS_HID_0495 ] =154 , - [BNXT_ULP_CLASS_HID_0347 ] =155 , - [BNXT_ULP_CLASS_HID_050b] =156 , - [BNXT_ULP_CLASS_HID_0631 ] =157 , - [BNXT_ULP_CLASS_HID_03ef] =158 , - [BNXT_ULP_CLASS_HID_0259 ] =159 , - [BNXT_ULP_CLASS_HID_046d] =160 + [BNXT_ULP_CLASS_HID_005c] =1 , + [BNXT_ULP_CLASS_HID_0003 ] =2 , + [BNXT_ULP_CLASS_HID_0132 ] =3 , + [BNXT_ULP_CLASS_HID_00e1] =4 , + [BNXT_ULP_CLASS_HID_0044 ] =5 , + [BNXT_ULP_CLASS_HID_001b] =6 , + [BNXT_ULP_CLASS_HID_012a] =7 , + [BNXT_ULP_CLASS_HID_00f9] =8 , + [BNXT_ULP_CLASS_HID_018d] =9 , + [BNXT_ULP_CLASS_HID_00a7] =10 , + [BNXT_ULP_CLASS_HID_006f] =11 , + [BNXT_ULP_CLASS_HID_0181 ] =12 , + [BNXT_ULP_CLASS_HID_0195 ] =13 , + [BNXT_ULP_CLASS_HID_00bf] =14 , + [BNXT_ULP_CLASS_HID_0077 ] =15 , + [BNXT_ULP_CLASS_HID_0199 ] =16 , + [BNXT_ULP_CLASS_HID_009a] =17 , + [BNXT_ULP_CLASS_HID_0192 ] =18 , + [BNXT_ULP_CLASS_HID_01e2] =19 , + [BNXT_ULP_CLASS_HID_00fa] =20 , + [BNXT_ULP_CLASS_HID_0165 ] =21 , + [BNXT_ULP_CLASS_HID_0042 ] =22 , + [BNXT_ULP_CLASS_HID_00cd] =23 , + [BNXT_ULP_CLASS_HID_01aa] =24 , + [BNXT_ULP_CLASS_HID_0178 ] =25 , + [BNXT_ULP_CLASS_HID_0070 ] =26 , + [BNXT_ULP_CLASS_HID_00f3] =27 , + [BNXT_ULP_CLASS_HID_01d8] =28 , + [BNXT_ULP_CLASS_HID_005b] =29 , + [BNXT_ULP_CLASS_HID_0153 ] =30 , + [BNXT_ULP_CLASS_HID_01a3] =31 , + [BNXT_ULP_CLASS_HID_00bb] =32 , + [BNXT_ULP_CLASS_HID_0082 ] =33 , + [BNXT_ULP_CLASS_HID_018a] =34 , + [BNXT_ULP_CLASS_HID_01fa] =35 , + [BNXT_ULP_CLASS_HID_00e2] =36 , + [BNXT_ULP_CLASS_HID_017d] =37 , + [BNXT_ULP_CLASS_HID_005a] =38 , + [BNXT_ULP_CLASS_HID_00d5] =39 , + [BNXT_ULP_CLASS_HID_01b2] =40 , + [BNXT_ULP_CLASS_HID_0160 ] =41 , + [BNXT_ULP_CLASS_HID_0068 ] =42 , + [BNXT_ULP_CLASS_HID_00eb] =43 , + [BNXT_ULP_CLASS_HID_01c0] =44 , + [BNXT_ULP_CLASS_HID_0043 ] =45 , + [BNXT_ULP_CLASS_HID_014b] =46 , + [BNXT_ULP_CLASS_HID_01bb] =47 , + [BNXT_ULP_CLASS_HID_00a3] =48 , + [BNXT_ULP_CLASS_HID_00cb] =49 , + [BNXT_ULP_CLASS_HID_00b4] =50 , + [BNXT_ULP_CLASS_HID_0013 ] =51 , + [BNXT_ULP_CLASS_HID_001c] =52 , + [BNXT_ULP_CLASS_HID_017b] =53 , + [BNXT_ULP_CLASS_HID_0164 ] =54 , + [BNXT_ULP_CLASS_HID_00c3] =55 , + [BNXT_ULP_CLASS_HID_00cc] =56 , + [BNXT_ULP_CLASS_HID_01a5] =57 , + [BNXT_ULP_CLASS_HID_0196 ] =58 , + [BNXT_ULP_CLASS_HID_010d] =59 , + [BNXT_ULP_CLASS_HID_00fe] =60 , + [BNXT_ULP_CLASS_HID_0084 ] =61 , + [BNXT_ULP_CLASS_HID_0046 ] =62 , + [BNXT_ULP_CLASS_HID_01ec] =63 , + [BNXT_ULP_CLASS_HID_01ae] =64 , + [BNXT_ULP_CLASS_HID_00d3] =65 , + [BNXT_ULP_CLASS_HID_00ac] =66 , + [BNXT_ULP_CLASS_HID_000b] =67 , + [BNXT_ULP_CLASS_HID_0004 ] =68 , + [BNXT_ULP_CLASS_HID_0163 ] =69 , + [BNXT_ULP_CLASS_HID_017c] =70 , + [BNXT_ULP_CLASS_HID_00db] =71 , + [BNXT_ULP_CLASS_HID_00d4] =72 , + [BNXT_ULP_CLASS_HID_01bd] =73 , + [BNXT_ULP_CLASS_HID_018e] =74 , + [BNXT_ULP_CLASS_HID_0115 ] =75 , + [BNXT_ULP_CLASS_HID_00e6] =76 , + [BNXT_ULP_CLASS_HID_009c] =77 , + [BNXT_ULP_CLASS_HID_005e] =78 , + [BNXT_ULP_CLASS_HID_01f4] =79 , + [BNXT_ULP_CLASS_HID_01b6] =80 };/* Array for the proto matcher list */ struct bnxt_ulp_class_match_info ulp_class_match_list[] = { [1 ] = { - .class_hid = BNXT_ULP_CLASS_HID_07e0, + .class_hid = BNXT_ULP_CLASS_HID_005c, .class_tid =1 , .hdr_sig_id =0 , .flow_sig_id =0 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_0_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [2 ] = { - .class_hid = BNXT_ULP_CLASS_HID_01dc, + .class_hid =BNXT_ULP_CLASS_HID_0003 , .class_tid =1 , .hdr_sig_id =0 , .flow_sig_id =1 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_0_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [3 ] = { - .class_hid = BNXT_ULP_CLASS_HID_006e, + .class_hid =BNXT_ULP_CLASS_HID_0132 , .class_tid =1 , .hdr_sig_id =0 , - .flow_sig_id =2 , + .flow_sig_id =1 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_0_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [4 ] = { - .class_hid = BNXT_ULP_CLASS_HID_025a, + .class_hid = BNXT_ULP_CLASS_HID_00e1, .class_tid =1 , .hdr_sig_id =0 , - .flow_sig_id =2 , + .flow_sig_id =1 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_0_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_0_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_0_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [5 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0146 , + .class_hid =BNXT_ULP_CLASS_HID_0044 , .class_tid =1 , - .hdr_sig_id =0 , - .flow_sig_id =2 , + .hdr_sig_id =1 , + .flow_sig_id =1 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_0_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_1_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [6 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0332 , + .class_hid = BNXT_ULP_CLASS_HID_001b, .class_tid =1 , - .hdr_sig_id =0 , + .hdr_sig_id =1 , .flow_sig_id =2 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_0_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_1_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [7 ] = { - .class_hid = BNXT_ULP_CLASS_HID_01c4, + .class_hid = BNXT_ULP_CLASS_HID_012a, .class_tid =1 , - .hdr_sig_id =0 , + .hdr_sig_id =1 , .flow_sig_id =2 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_0_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_1_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [8 ] = { - .class_hid = BNXT_ULP_CLASS_HID_078a, + .class_hid = BNXT_ULP_CLASS_HID_00f9, .class_tid =1 , - .hdr_sig_id =0 , + .hdr_sig_id =1 , .flow_sig_id =2 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_0_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_0_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_0_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_0_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_1_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_1_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [9 ] = { - .class_hid = BNXT_ULP_CLASS_HID_02ed, + .class_hid = BNXT_ULP_CLASS_HID_018d, .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =2 , .flow_sig_id =2 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_2_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_PROTO_ID | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [10 ] = { - .class_hid = BNXT_ULP_CLASS_HID_04d9, + .class_hid = BNXT_ULP_CLASS_HID_00a7, .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =2 , + .hdr_sig_id =2 , + .flow_sig_id =3 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_2_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [11 ] = { - .class_hid = BNXT_ULP_CLASS_HID_036b, + .class_hid = BNXT_ULP_CLASS_HID_006f, .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =2 , + .hdr_sig_id =2 , + .flow_sig_id =3 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_PROTO_ID | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [12 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0131 , + .class_hid =BNXT_ULP_CLASS_HID_0181 , .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =2 , + .hdr_sig_id =2 , + .flow_sig_id =3 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [13 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0217 , + .class_hid =BNXT_ULP_CLASS_HID_0195 , .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =2 , + .hdr_sig_id =3 , + .flow_sig_id =3 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_3_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_PROTO_ID | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [14 ] = { - .class_hid = BNXT_ULP_CLASS_HID_03c3, + .class_hid = BNXT_ULP_CLASS_HID_00bf, .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =3 , + .hdr_sig_id =3 , + .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_3_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [15 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0295 , + .class_hid =BNXT_ULP_CLASS_HID_0077 , .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =3 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_PROTO_ID | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [16 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0441 , + .class_hid =BNXT_ULP_CLASS_HID_0199 , .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =3 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN |BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | +BNXT_ULP_HDR_BIT_O_UDP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | +BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [17 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0095 , + .class_hid = BNXT_ULP_CLASS_HID_009a, .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =4 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [18 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0241 , + .class_hid =BNXT_ULP_CLASS_HID_0192 , .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =4 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [19 ] = { - .class_hid = BNXT_ULP_CLASS_HID_04ed, + .class_hid = BNXT_ULP_CLASS_HID_01e2, .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =4 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [20 ] = { - .class_hid = BNXT_ULP_CLASS_HID_06d9, + .class_hid = BNXT_ULP_CLASS_HID_00fa, .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =4 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [21 ] = { - .class_hid = BNXT_ULP_CLASS_HID_07bf, + .class_hid =BNXT_ULP_CLASS_HID_0165 , .class_tid =1 , - .hdr_sig_id =1 , + .hdr_sig_id =4 , .flow_sig_id =4 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [22 ] = { - .class_hid = BNXT_ULP_CLASS_HID_016b, + .class_hid =BNXT_ULP_CLASS_HID_0042 , .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , + .hdr_sig_id =4 , + .flow_sig_id =5 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [23 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0417 , + .class_hid = BNXT_ULP_CLASS_HID_00cd, .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , + .hdr_sig_id =4 , + .flow_sig_id =5 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, [24 ] = { - .class_hid = BNXT_ULP_CLASS_HID_05c3, + .class_hid = BNXT_ULP_CLASS_HID_01aa, .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , + .hdr_sig_id =4 , + .flow_sig_id =5 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [25 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0187 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [26 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0373 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [27 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0205 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [28 ] = { - .class_hid = BNXT_ULP_CLASS_HID_03f1, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [29 ] = { - .class_hid = BNXT_ULP_CLASS_HID_00a1, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [30 ] = { - .class_hid = BNXT_ULP_CLASS_HID_029d, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [31 ] = { - .class_hid = BNXT_ULP_CLASS_HID_012f, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [32 ] = { - .class_hid = BNXT_ULP_CLASS_HID_031b, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [33 ] = { - .class_hid = BNXT_ULP_CLASS_HID_072f, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [34 ] = { - .class_hid = BNXT_ULP_CLASS_HID_011b, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [35 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0387 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [36 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0573 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [37 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0649 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [38 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0005 , - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [39 ] = { - .class_hid = BNXT_ULP_CLASS_HID_02a1, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [40 ] = { - .class_hid = BNXT_ULP_CLASS_HID_049d, - .class_tid =1 , - .hdr_sig_id =1 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_1_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_1_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_1_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_1_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_1_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [41 ] = { - .class_hid = BNXT_ULP_CLASS_HID_01ea, - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =4 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [42 ] = { - .class_hid = BNXT_ULP_CLASS_HID_03de, - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =5 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [43 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0672 , - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [44 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0026 , - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_2_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [45 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0746 , - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [46 ] = { - .class_hid = BNXT_ULP_CLASS_HID_010a, - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [47 ] = { - .class_hid = BNXT_ULP_CLASS_HID_03ae, - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [48 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0592 , - .class_tid =1 , - .hdr_sig_id =2 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_2_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_2_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_2_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_2_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [49 ] = { - .class_hid = BNXT_ULP_CLASS_HID_07d0, - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =6 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [50 ] = { - .class_hid = BNXT_ULP_CLASS_HID_01ec, - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =7 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [51 ] = { - .class_hid = BNXT_ULP_CLASS_HID_005e, - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [52 ] = { - .class_hid = BNXT_ULP_CLASS_HID_026a, - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_3_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [53 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0176 , - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [54 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0302 , - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [55 ] = { - .class_hid = BNXT_ULP_CLASS_HID_01f4, - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [56 ] = { - .class_hid = BNXT_ULP_CLASS_HID_07ba, - .class_tid =1 , - .hdr_sig_id =3 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_3_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_3_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_3_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_3_BITMASK_O_UDP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [57 ] = { - .class_hid = BNXT_ULP_CLASS_HID_06a7, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [58 ] = { - .class_hid = BNXT_ULP_CLASS_HID_006b, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [59 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0725 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [60 ] = { - .class_hid = BNXT_ULP_CLASS_HID_00e9, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [61 ] = { - .class_hid = BNXT_ULP_CLASS_HID_05d9, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =8 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [62 ] = { - .class_hid = BNXT_ULP_CLASS_HID_078d, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =9 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [63 ] = { - .class_hid = BNXT_ULP_CLASS_HID_065f, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [64 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0003 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [65 ] = { - .class_hid = BNXT_ULP_CLASS_HID_045f, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [66 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0603 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [67 ] = { - .class_hid = BNXT_ULP_CLASS_HID_00a7, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [68 ] = { - .class_hid = BNXT_ULP_CLASS_HID_026b, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [69 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0371 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [70 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0525 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [71 ] = { - .class_hid = BNXT_ULP_CLASS_HID_07d9, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [72 ] = { - .class_hid = BNXT_ULP_CLASS_HID_018d, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [73 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0177 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [74 ] = { - .class_hid = BNXT_ULP_CLASS_HID_033b, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [75 ] = { - .class_hid = BNXT_ULP_CLASS_HID_05df, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [76 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0783 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [77 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0069 , - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [78 ] = { - .class_hid = BNXT_ULP_CLASS_HID_025d, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [79 ] = { - .class_hid = BNXT_ULP_CLASS_HID_00ef, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [80 ] = { - .class_hid = BNXT_ULP_CLASS_HID_06a5, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [81 ] = { - .class_hid = BNXT_ULP_CLASS_HID_02f1, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | -BNXT_ULP_HDR_BIT_O_TCP | -BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | -BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | -BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | -BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [82 ] = { - .class_hid = BNXT_ULP_CLASS_HID_04a5, - .class_tid =1 , - .hdr_sig_id =4 , - .flow_sig_id =10 , - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_TCP |BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID |BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID |BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR |BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT |BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [83 ] = { - .class_hid =BNXT_ULP_CLASS_HID_0377 , + [25 ] = { + .class_hid =BNXT_ULP_CLASS_HID_0178 , .class_tid =1 , .hdr_sig_id =4 , - .flow_sig_id =10 , + .flow_sig_id =5 , .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | BNXT_ULP_HDR_BIT_OO_VLAN |
@@ -1817,8 +588,7 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = {BNXT_ULP_HDR_BIT_O_TCP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID |BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR |
@@ -1826,11 +596,11 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = {BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [84] = { - .class_hid = BNXT_ULP_CLASS_HID_053b, + [26] = { + .class_hid = BNXT_ULP_CLASS_HID_0070, .class_tid = 1, .hdr_sig_id = 4, - .flow_sig_id = 10, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | BNXT_ULP_HDR_BIT_OO_VLAN |
@@ -1839,20 +609,17 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID |BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR |BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [85] = { - .class_hid = BNXT_ULP_CLASS_HID_0601, + [27] = { + .class_hid = BNXT_ULP_CLASS_HID_00f3, .class_tid = 1, .hdr_sig_id = 4, - .flow_sig_id = 10, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | BNXT_ULP_HDR_BIT_OO_VLAN |
@@ -1860,7 +627,7 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = {BNXT_ULP_HDR_BIT_O_TCP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE |BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR |
@@ -1869,11 +636,11 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = {BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [86] = { - .class_hid = BNXT_ULP_CLASS_HID_03df, + [28] = { + .class_hid = BNXT_ULP_CLASS_HID_01d8, .class_tid = 1, .hdr_sig_id = 4, - .flow_sig_id = 10, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | BNXT_ULP_HDR_BIT_OO_VLAN |
@@ -1882,20 +649,18 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID |BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID |BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR |BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [87] = { - .class_hid = BNXT_ULP_CLASS_HID_0269, + [29] = { + .class_hid = BNXT_ULP_CLASS_HID_005b, .class_tid = 1, .hdr_sig_id = 4, - .flow_sig_id = 10, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | BNXT_ULP_HDR_BIT_OO_VLAN |
@@ -1903,9 +668,8 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = {BNXT_ULP_HDR_BIT_O_TCP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE |BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID |BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR |
@@ -1913,11 +677,11 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = {BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [88] = { - .class_hid = BNXT_ULP_CLASS_HID_045d, + [30] = { + .class_hid = BNXT_ULP_CLASS_HID_0153, .class_tid = 1, .hdr_sig_id = 4, - .flow_sig_id = 10, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH | BNXT_ULP_HDR_BIT_OO_VLAN |
@@ -1926,1472 +690,1060 @@ struct bnxt_ulp_class_match_info ulp_class_match_list[] = { BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_4_BITMASK_O_ETH_TYPE |BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID |BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR |BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT |BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [89] = { - .class_hid = BNXT_ULP_CLASS_HID_02dd, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 10, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [90] = { - .class_hid = BNXT_ULP_CLASS_HID_04e9, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 10, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [91] = { - .class_hid = BNXT_ULP_CLASS_HID_035b, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 10, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [92] = { - .class_hid = BNXT_ULP_CLASS_HID_0101, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 10, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [93] = { - .class_hid = BNXT_ULP_CLASS_HID_0227, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 10, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [94] = { - .class_hid = BNXT_ULP_CLASS_HID_03f3, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 11, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [95] = { - .class_hid = BNXT_ULP_CLASS_HID_02a5, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [96] = { - .class_hid = BNXT_ULP_CLASS_HID_0471, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [97] = { - .class_hid = BNXT_ULP_CLASS_HID_00a5, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [98] = { - .class_hid = BNXT_ULP_CLASS_HID_0271, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [99] = { - .class_hid = BNXT_ULP_CLASS_HID_04dd, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [100] = { - .class_hid = BNXT_ULP_CLASS_HID_06e9, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [101] = { - .class_hid = BNXT_ULP_CLASS_HID_078f, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [102] = { - .class_hid = BNXT_ULP_CLASS_HID_015b, - .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, - .hdr_sig = { .bits = -BNXT_ULP_HDR_BIT_O_ETH | -BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | - BNXT_ULP_FLOW_DIR_BITMASK_ING }, - .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | - BNXT_ULP_MATCH_TYPE_BITMASK_EM }, - }, - [103] = { - .class_hid = BNXT_ULP_CLASS_HID_0427, + [31] = { + .class_hid = BNXT_ULP_CLASS_HID_01a3, .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, + .hdr_sig_id = 4, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | +BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_TCP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [104] = { - .class_hid = BNXT_ULP_CLASS_HID_05f3, + [32] = { + .class_hid = BNXT_ULP_CLASS_HID_00bb, .class_tid = 1, - .hdr_sig_id = 5, - .flow_sig_id = 12, + .hdr_sig_id = 4, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | -BNXT_ULP_HDR_BIT_O_UDP | +BNXT_ULP_HDR_BIT_O_IPV4 | +BNXT_ULP_HDR_BIT_O_TCP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT | -BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | +BNXT_ULP_HF1_4_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_VID | +BNXT_ULP_HF1_4_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_IPV4_DST_ADDR | +BNXT_ULP_HF1_4_BITMASK_O_TCP_SRC_PORT | +BNXT_ULP_HF1_4_BITMASK_O_TCP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [105] = { - .class_hid = BNXT_ULP_CLASS_HID_01b7, + [33] = { + .class_hid = BNXT_ULP_CLASS_HID_0082, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [106] = { - .class_hid = BNXT_ULP_CLASS_HID_0343, + [34] = { + .class_hid = BNXT_ULP_CLASS_HID_018a, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [107] = { - .class_hid = BNXT_ULP_CLASS_HID_0235, + [35] = { + .class_hid = BNXT_ULP_CLASS_HID_01fa, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [108] = { - .class_hid = BNXT_ULP_CLASS_HID_03c1, + [36] = { + .class_hid = BNXT_ULP_CLASS_HID_00e2, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [109] = { - .class_hid = BNXT_ULP_CLASS_HID_0091, + [37] = { + .class_hid = BNXT_ULP_CLASS_HID_017d, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 5, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [110] = { - .class_hid = BNXT_ULP_CLASS_HID_02ad, + [38] = { + .class_hid = BNXT_ULP_CLASS_HID_005a, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [111] = { - .class_hid = BNXT_ULP_CLASS_HID_011f, + [39] = { + .class_hid = BNXT_ULP_CLASS_HID_00d5, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [112] = { - .class_hid = BNXT_ULP_CLASS_HID_032b, + [40] = { + .class_hid = BNXT_ULP_CLASS_HID_01b2, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [113] = { - .class_hid = BNXT_ULP_CLASS_HID_071f, + [41] = { + .class_hid = BNXT_ULP_CLASS_HID_0160, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [114] = { - .class_hid = BNXT_ULP_CLASS_HID_012b, + [42] = { + .class_hid = BNXT_ULP_CLASS_HID_0068, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [115] = { - .class_hid = BNXT_ULP_CLASS_HID_03b7, + [43] = { + .class_hid = BNXT_ULP_CLASS_HID_00eb, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [116] = { - .class_hid = BNXT_ULP_CLASS_HID_0543, + [44] = { + .class_hid = BNXT_ULP_CLASS_HID_01c0, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC | -BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [117] = { - .class_hid = BNXT_ULP_CLASS_HID_0679, + [45] = { + .class_hid = BNXT_ULP_CLASS_HID_0043, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = +BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_PROTO_ID | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [118] = { - .class_hid = BNXT_ULP_CLASS_HID_0035, + [46] = { + .class_hid = BNXT_ULP_CLASS_HID_014b, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits =BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |BNXT_ULP_HF1_5_BITMASK_OO_VLAN_VID | -BNXT_ULP_HF1_5_BITMASK_OO_VLAN_TYPE | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_PROTO_ID | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_SRC_ADDR | -BNXT_ULP_HF1_5_BITMASK_O_IPV6_DST_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_SRC_ADDR | +BNXT_ULP_HF1_5_BITMASK_O_IPV4_DST_ADDR |BNXT_ULP_HF1_5_BITMASK_O_UDP_SRC_PORT |BNXT_ULP_HF1_5_BITMASK_O_UDP_DST_PORT | BNXT_ULP_MATCH_TYPE_BITMASK_EM }, }, - [119] = { - .class_hid = BNXT_ULP_CLASS_HID_0291, + [47] = { + .class_hid = BNXT_ULP_CLASS_HID_01bb, .class_tid = 1, .hdr_sig_id = 5, - .flow_sig_id = 12, + .flow_sig_id = 6, .hdr_sig = { .bits =BNXT_ULP_HDR_BIT_O_ETH |BNXT_ULP_HDR_BIT_OO_VLAN | -BNXT_ULP_HDR_BIT_O_IPV6 | +BNXT_ULP_HDR_BIT_O_IPV4 |BNXT_ULP_HDR_BIT_O_UDP | BNXT_ULP_FLOW_DIR_BITMASK_ING }, .field_sig = { .bits = - BNXT_ULP_HF1_5_BITMASK_O_ETH_TYPE | + BNXT_ULP_HF1_5_BITMASK_O_ETH_DMAC |
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +97 -175
272 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +97 -97
194 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +101 -101
202 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +62 -10
72 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +1801 -362
2,163 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 38/58 net/bnxt: add conditional opcode and L4 port fields
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
The conditional field opcode provides capability to perform changes to the field values specified by template to address platform specific modifications. For instance, mirror id value is modified before it is configured in the hardware.
The addition of L4 port compute fields enables support of generic exact match rule that can support both TCP and UDP flows with the same template.
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 138 ++- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 21 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 172 +++- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 125 ++- .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 801 ++++++++++++++++- .../tf_ulp/ulp_template_db_wh_plus_class.c | 837 ++++++++++++++++-- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 1 + 7 files changed, 1953 insertions(+), 142 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +124 -14
@@ -879,6 +879,39 @@ ulp_mapper_ident_extract(struct bnxt_ulp_mapper_parms *parms,return rc; } +static int32_t +ulp_mapper_field_process_inc_dec (struct bnxt_ulp_mapper_field_info *fld, +struct ulp_blob *blob, +uint64_t *val64, +uint16_t const_val16, +uint32_t bitlen, +uint32_t *update_flag) +{ +uint64_t l_val64 = *val64; + +if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST || + fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST_POST ) { + l_val64 += const_val16; + l_val64 =tfp_be_to_cpu_64 (l_val64); +ulp_blob_push_64 (blob, &l_val64, bitlen); + }else if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST || + fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST_POST ) { + l_val64 -= const_val16; + l_val64 =tfp_be_to_cpu_64 (l_val64); +ulp_blob_push_64 (blob, &l_val64, bitlen); + }else { +BNXT_TF_DBG (ERR ,"Invalid field opcode %u\n" , fld->field_opc); +return -EINVAL ; + } + +if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST_POST || + fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST_POST ) { + *val64 = l_val64; + *update_flag =1 ; + } +return 0 ; +} + static int32_t ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms, enum tf_dir dir,
@@ -897,10 +930,24 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,uint32_t src1_sel =0 ;enum bnxt_ulp_field_src fld_src;uint8_t *fld_src_oper; +enum bnxt_ulp_field_cond_src field_cond_src; +uint16_t const_val =0 ; +uint32_t update_flag =0 ; +uint64_t src1_val64; + +/* process the field opcode */ +if (fld->field_opc !=BNXT_ULP_FIELD_OPC_COND_OP ) { + field_cond_src =BNXT_ULP_FIELD_COND_SRC_TRUE ; +/* Read the constant from the second operand */ +memcpy (&const_val, fld->field_opr2,sizeof (uint16_t )); + const_val =tfp_be_to_cpu_16 (const_val); + }else { + field_cond_src = fld->field_cond_src; + } bitlen = fld->field_bit_size;/* Evaluate the condition */ -switch (fld->field_cond_src) { +switch (field_cond_src) {case BNXT_ULP_FIELD_COND_SRC_TRUE : src1_sel =1 ;break ;
@@ -1010,12 +1057,35 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx); -if (idx <BNXT_ULP_CF_IDX_LAST ) +if (idx >=BNXT_ULP_CF_IDX_LAST ) { +BNXT_TF_DBG (ERR ,"%s comp field [%d] read oob\n" , + name, idx); +return -EINVAL ; + } +if (fld->field_opc ==BNXT_ULP_FIELD_OPC_COND_OP ) { val =ulp_blob_push_32 (blob, &parms->comp_fld[idx], bitlen); -if (!val) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; +if (!val) { +BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , + name); +return -EINVAL ; + } + }else { + src1_val64 =ULP_COMP_FLD_IDX_RD (parms, idx); +if (ulp_mapper_field_process_inc_dec (fld, blob, + &src1_val64, + const_val, + bitlen, + &update_flag)) { +BNXT_TF_DBG (ERR ,"%s field cond opc failed\n" , + name); +return -EINVAL ; + } +if (update_flag) { +BNXT_TF_DBG (ERR ,"%s invalid field cond opc\n" , + name); +return -EINVAL ; + } }break ;case BNXT_ULP_FIELD_SRC_RF :
@@ -1032,11 +1102,33 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms, name, idx);return -EINVAL ; } - - val =ulp_blob_push_64 (blob, ®val, bitlen); -if (!val) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; +if (fld->field_opc ==BNXT_ULP_FIELD_OPC_COND_OP ) { + val =ulp_blob_push_64 (blob, ®val, bitlen); +if (!val) { +BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , + name); +return -EINVAL ; + } + }else { +if (ulp_mapper_field_process_inc_dec (fld, blob, + ®val, + const_val, + bitlen, + &update_flag)) { +BNXT_TF_DBG (ERR ,"%s field cond opc failed\n" , + name); +return -EINVAL ; + } +if (update_flag) { + regval =tfp_cpu_to_be_64 (regval); +if (ulp_regfile_write (parms->regfile, idx, + regval)) { +BNXT_TF_DBG (ERR , +"Write regfile[%d] fail\n" , + idx); +return -EINVAL ; + } + } }break ;case BNXT_ULP_FIELD_SRC_ACT_PROP :
@@ -1109,10 +1201,28 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms, name, idx);return -EINVAL ; } - val =ulp_blob_push_64 (blob, ®val, bitlen); -if (!val) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; +if (fld->field_opc ==BNXT_ULP_FIELD_OPC_COND_OP ) { + val =ulp_blob_push_64 (blob, ®val, bitlen); +if (!val) { +BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , + name); +return -EINVAL ; + } + }else { +if (ulp_mapper_field_process_inc_dec (fld, blob, + ®val, + const_val, + bitlen, + &update_flag)) { +BNXT_TF_DBG (ERR ,"%s field cond opc failed\n" , + name); +return -EINVAL ; + } +if (update_flag) { +BNXT_TF_DBG (ERR ,"%s invalid field cond opc\n" , + name); +return -EINVAL ; + } }break ;case BNXT_ULP_FIELD_SRC_HF :
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +17 -4
@@ -1176,7 +1176,7 @@ ulp_rte_udp_hdr_handler(const struct rte_flow_item *item,struct ulp_rte_hdr_bitmap *hdr_bitmap = ¶ms->hdr_bitmap;uint32_t idx = params->field_idx;uint32_t size; -uint16_t dst_port =0 ; +uint16_t dport =0 , sport =0 ;uint32_t cnt; cnt =ULP_COMP_FLD_IDX_RD (params,BNXT_ULP_CF_IDX_L4_HDR_CNT );
@@ -1194,12 +1194,12 @@ ulp_rte_udp_hdr_handler(const struct rte_flow_item *item, field =ulp_rte_parser_fld_copy (¶ms->hdr_field[idx], &udp_spec->hdr.src_port, size); - + sport = udp_spec->hdr.src_port; size =sizeof (udp_spec->hdr.dst_port); field =ulp_rte_parser_fld_copy (field, &udp_spec->hdr.dst_port, size); - dst_port = udp_spec->hdr.dst_port; + dport = udp_spec->hdr.dst_port; size =sizeof (udp_spec->hdr.dgram_len); field = ulp_rte_parser_fld_copy(field, &udp_spec->hdr.dgram_len,
@@ -1232,11 +1232,17 @@ ulp_rte_udp_hdr_handler(const struct rte_flow_item *item, ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_TCP)) {ULP_BITMAP_SET (hdr_bitmap->bits,BNXT_ULP_HDR_BIT_I_UDP );ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_I_L4 ,1 ); +ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_I_L4_SPORT , sport); +ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_I_L4_DPORT , dport); + } else {ULP_BITMAP_SET (hdr_bitmap->bits,BNXT_ULP_HDR_BIT_O_UDP );ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_O_L4 ,1 ); +ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_O_L4_SPORT , sport); +ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_O_L4_DPORT , dport); +/* Update the field protocol hdr bitmap */ -ulp_rte_l4_proto_type_update (params, dst_port); +ulp_rte_l4_proto_type_update (params, dport); }ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_L4_HDR_CNT , ++cnt);return BNXT_TF_RC_SUCCESS ;
@@ -1252,6 +1258,7 @@ ulp_rte_tcp_hdr_handler(const struct rte_flow_item *item,struct ulp_rte_hdr_field *field;struct ulp_rte_hdr_bitmap *hdr_bitmap = ¶ms->hdr_bitmap;uint32_t idx = params->field_idx; +uint16_t dport =0 , sport =0 ;uint32_t size;uint32_t cnt;
@@ -1266,10 +1273,12 @@ ulp_rte_tcp_hdr_handler(const struct rte_flow_item *item,* header fields */ if (tcp_spec) { + sport = tcp_spec->hdr.src_port; size =sizeof (tcp_spec->hdr.src_port); field =ulp_rte_parser_fld_copy (¶ms->hdr_field[idx], &tcp_spec->hdr.src_port, size); + dport = tcp_spec->hdr.dst_port; size =sizeof (tcp_spec->hdr.dst_port); field = ulp_rte_parser_fld_copy(field, &tcp_spec->hdr.dst_port,
@@ -1343,9 +1352,13 @@ ulp_rte_tcp_hdr_handler(const struct rte_flow_item *item, ULP_BITMAP_ISSET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_O_TCP)) { ULP_BITMAP_SET(hdr_bitmap->bits, BNXT_ULP_HDR_BIT_I_TCP); ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_I_L4, 1); + ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_I_L4_SPORT, sport); + ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_I_L4_DPORT, dport); } else {ULP_BITMAP_SET (hdr_bitmap->bits,BNXT_ULP_HDR_BIT_O_TCP );ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_O_L4 ,1 ); +ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_O_L4_SPORT , sport); +ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_O_L4_DPORT , dport); }ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_L4_HDR_CNT , ++cnt);return BNXT_TF_RC_SUCCESS ;
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +159 -13
230 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +76 -49
167 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +793 -8
1,084 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +783 -54
1,274 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +1 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 39/58 net/bnxt: refactor TF ULP
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
1. The flow database opcode is updated to split the alloc push resource item so it can be controlled using the control table.
2. The class and action match signatures are populated with pattern ids that are matched against template pattern id to reject any unsupported class and action combinations.
3. The flow DB opcode should be no op when accessing the global registry identifiers.
4. The resource function for branch is changed to control so that it is extended to perform flow database operations and not just branch operations.
5. The conditional goto processing now supports negative numbers to support looping of the mapper tables to support flow ranges and also enable conditional fail goto to support failure path mapper tables.
6. The field mapper opcode is updated to add all ones to fields that support exact match.
7. Added key info and identifier list to whitney action templates The whitney plus templates are updated to use the mapper infrastructure changes.
8. The partition interface table configuration of the default egress rule for the representor interface needs to use the reserved parif interface that is specific to each platform. The pipeline for the representor interface is broken since incorrect parif configuration cause the miss path packets to be dropped.
9. In the mapper table processing, if a failure condition is hit due to invalid memory type then use the conditional goto failure configuration instead of jumping to next table. This causes ipv6 exact match entry to be skipped. This patch fixes that issue.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 32 +- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 3 + drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 55 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 101 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 7 + drivers/net/bnxt/tf_ulp/ulp_matcher.c | 2 + drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 644 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 80798 +++++++++++++++- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 4140 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 558 +- .../tf_ulp/ulp_template_db_stingray_act.c | 16 +- .../tf_ulp/ulp_template_db_stingray_class.c | 154 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 512 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h | 4 + .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 4470 +- .../tf_ulp/ulp_template_db_wh_plus_class.c | 13072 ++- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 7 +- 17 files changed, 98371 insertions(+), 6204 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +17 -15
@@ -79,21 +79,23 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,struct ulp_rte_parser_params *params, enum bnxt_ulp_fdb_type flow_type) { - mapper_cparms->flow_type = flow_type; - mapper_cparms->app_priority = params->priority; - mapper_cparms->dir_attr = params->dir_attr; - mapper_cparms->class_tid = params->class_id; - mapper_cparms->act_tid = params->act_tmpl; - mapper_cparms->func_id = params->func_id; - mapper_cparms->hdr_bitmap = ¶ms->hdr_bitmap; - mapper_cparms->hdr_field = params->hdr_field; - mapper_cparms->comp_fld = params->comp_fld; - mapper_cparms->act = ¶ms->act_bitmap; - mapper_cparms->act_prop = ¶ms->act_prop; - mapper_cparms->flow_id = params->fid; - mapper_cparms->parent_flow = params->parent_flow; - mapper_cparms->parent_fid = params->parent_fid; - mapper_cparms->fld_bitmap = ¶ms->fld_bitmap; + mapper_cparms->flow_type = flow_type; + mapper_cparms->app_priority = params->priority; + mapper_cparms->dir_attr = params->dir_attr; + mapper_cparms->class_tid = params->class_id; + mapper_cparms->act_tid = params->act_tmpl; + mapper_cparms->func_id = params->func_id; + mapper_cparms->hdr_bitmap = ¶ms->hdr_bitmap; + mapper_cparms->hdr_field = params->hdr_field; + mapper_cparms->comp_fld = params->comp_fld; + mapper_cparms->act = ¶ms->act_bitmap; + mapper_cparms->act_prop = ¶ms->act_prop; + mapper_cparms->flow_id = params->fid; + mapper_cparms->parent_flow = params->parent_flow; + mapper_cparms->parent_fid = params->parent_fid; + mapper_cparms->fld_bitmap = ¶ms->fld_bitmap; + mapper_cparms->flow_pattern_id = params->flow_pattern_id; + mapper_cparms->act_pattern_id = params->act_pattern_id;/* update the signature fields into the computed field list */ ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_HDR_SIG_ID,
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +3 -0
@@ -360,6 +360,9 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev, goto err1; } +BNXT_TF_DBG (DEBUG ,"Creating default flow with template id: %u\n" , + ulp_class_tid); +/* Protect flow creation */ if (bnxt_ulp_cntxt_acquire_fdb_lock (ulp_ctx)) {BNXT_TF_DBG (ERR ,"Flow db lock acquire failed\n" );
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +20 -35
166 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.c +77 -24
203 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +7 -0
@@ -58,6 +58,8 @@ struct bnxt_ulp_mapper_parms {uint8_t tun_idx;uint32_t app_priority;uint64_t shared_hndl; +uint32_t flow_pattern_id; +uint32_t act_pattern_id; };struct bnxt_ulp_mapper_create_parms {
@@ -80,6 +82,11 @@ struct bnxt_ulp_mapper_create_parms {/* if set then create a parent flow */ uint32_t parent_flow;uint8_t tun_idx; + +/* support pattern based rejection */ +uint32_t flow_pattern_id; +uint32_t act_pattern_id; + };/* Function to initialize any dynamic mapper data. */
drivers/net/bnxt/tf_ulp/ulp_matcher.c +2 -0
@@ -79,6 +79,7 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params, *class_id = class_match->class_tid; params->hdr_sig_id = class_match->hdr_sig_id; params->flow_sig_id = class_match->flow_sig_id; + params->flow_pattern_id = class_match->flow_pattern_id;return BNXT_TF_RC_SUCCESS ; error:
@@ -115,6 +116,7 @@ ulp_matcher_action_match(struct ulp_rte_parser_params *params, goto error; } *act_id = act_match->act_tid; + params->act_pattern_id = act_match->act_pattern_id;BNXT_TF_DBG (DEBUG ,"Found matching action template %u\n" , *act_id);return BNXT_TF_RC_SUCCESS ;
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +601 -43
792 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +79773 -1025
1,759 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +3992 -148
4,140 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +453 -105
558 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c +77 -77
154 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +408 -104
512 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +4118 -352
4,470 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +8805 -4267
13,072 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +6 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 40/58 net/bnxt: add partial header field processing
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
For support for wild card TCAM, some of the header fields have to be partially written, hence this new opcode is added.
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 64 +++++++++++++------ .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 13 ++-- 2 files changed, 51 insertions(+), 26 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +44 -20
@@ -927,7 +927,7 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,uint32_t val_size =0 , field_size =0 ;uint64_t hdr_bit, act_bit, regval;uint16_t write_idx = blob->write_idx; -uint16_t idx, size_idx, bitlen; +uint16_t idx, size_idx, bitlen, offset;uint8_t *val =NULL ;uint8_t tmpval[16 ];uint8_t bit;
@@ -1340,6 +1340,46 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,break ;case BNXT_ULP_FIELD_SRC_REJECT :return -EINVAL ; +case BNXT_ULP_FIELD_SRC_SUB_HF : +if (!ulp_operand_read (fld_src_oper, + (uint8_t *)&idx,sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +return -EINVAL ; + } + idx =tfp_be_to_cpu_16 (idx); +/* get the index from the global field list */ +if (ulp_mapper_glb_field_tbl_get (parms, idx, &bit)) { +BNXT_TF_DBG (ERR ,"invalid ulp_glb_field_tbl idx %d\n" , + idx); +return -EINVAL ; + } + +/* get the offset next */ +if (!ulp_operand_read (&fld_src_oper[sizeof (uint16_t )], + (uint8_t *)&offset,sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +return -EINVAL ; + } + offset =tfp_be_to_cpu_16 (offset); +if ((offset + bitlen) > +ULP_BYTE_2_BITS (parms->hdr_field[bit].size) || +ULP_BITS_IS_BYTE_NOT_ALIGNED (offset)) { +BNXT_TF_DBG (ERR ,"Hdr field[%s] oob\n" , name); +return -EINVAL ; + } + offset =ULP_BITS_2_BYTE_NR (offset); + +/* write the value into blob */ +if (is_key) + val = &parms->hdr_field[bit].spec[offset]; +else + val = &parms->hdr_field[bit].mask[offset]; + +if (!ulp_blob_push (blob, val, bitlen)) { +BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); +return -EINVAL ; + } +break ;default :BNXT_TF_DBG (ERR ,"%s invalid field opcode 0x%x at %d\n" , name, fld_src, write_idx);
@@ -1630,25 +1670,9 @@ ulp_mapper_tcam_tbl_entry_write(struct bnxt_ulp_mapper_parms *parms,return rc; } -#define BNXT_ULP_WC_TCAM_SLICE_SIZE 80/* internal function to post process the key/mask blobs for wildcard tcam tbl */ -static void ulp_mapper_wc_tcam_tbl_post_process (struct ulp_blob *blob, -uint32_t len) +static void ulp_mapper_wc_tcam_tbl_post_process (struct ulp_blob *blob) { -uint8_t mode[2 ] = {0x0 ,0x0 }; -uint32_t mode_len = len /BNXT_ULP_WC_TCAM_SLICE_SIZE ; -uint32_t size, idx; - -/* Add the mode bits to the key and mask*/ -if (mode_len ==2 ) - mode[1 ] =2 ; -else if (mode_len >2 ) - mode[1 ] =3 ; - - size =BNXT_ULP_WC_TCAM_SLICE_SIZE +ULP_BYTE_2_BITS (sizeof (mode)); -for (idx =0 ; idx < mode_len; idx++) -ulp_blob_insert (blob, (size * idx), mode, -ULP_BYTE_2_BITS (sizeof (mode)));ulp_blob_perform_64B_word_swap (blob);ulp_blob_perform_64B_byte_swap (blob); }
@@ -1736,8 +1760,8 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,/* For wild card tcam perform the post process to swap the blob */ if (tbl->resource_type ==TF_TCAM_TBL_TYPE_WC_TCAM ) { -ulp_mapper_wc_tcam_tbl_post_process (&key, tbl->key_bit_size); -ulp_mapper_wc_tcam_tbl_post_process (&mask, tbl->key_bit_size); +ulp_mapper_wc_tcam_tbl_post_process (&key); +ulp_mapper_wc_tcam_tbl_post_process (&mask); }if (tbl->tbl_opcode ==BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE ) {
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +7 -6
@@ -278,12 +278,13 @@ enum bnxt_ulp_field_src {BNXT_ULP_FIELD_SRC_ACT_PROP_SZ =6 ,BNXT_ULP_FIELD_SRC_GLB_RF =7 ,BNXT_ULP_FIELD_SRC_HF =8 , -BNXT_ULP_FIELD_SRC_HDR_BIT =9 , -BNXT_ULP_FIELD_SRC_ACT_BIT =10 , -BNXT_ULP_FIELD_SRC_FIELD_BIT =11 , -BNXT_ULP_FIELD_SRC_SKIP =12 , -BNXT_ULP_FIELD_SRC_REJECT =13 , -BNXT_ULP_FIELD_SRC_LAST =14 +BNXT_ULP_FIELD_SRC_SUB_HF =9 , +BNXT_ULP_FIELD_SRC_HDR_BIT =10 , +BNXT_ULP_FIELD_SRC_ACT_BIT =11 , +BNXT_ULP_FIELD_SRC_FIELD_BIT =12 , +BNXT_ULP_FIELD_SRC_SKIP =13 , +BNXT_ULP_FIELD_SRC_REJECT =14 , +BNXT_ULP_FIELD_SRC_LAST =15 }; enum bnxt_ulp_generic_tbl_opc {
Signature · 1 line
2.17.1
PATCH 41/58 net/bnxt: add support for wild card pattern match
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
The computational field is enabled for wild card pattern support. The template checks the computational field to add a flow as wild card entry or exact match entry.
--- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 4 ++-- drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +2 -2
@@ -50,8 +50,8 @@ ulp_rte_parser_field_bitmap_update(struct ulp_rte_parser_params *params,ULP_INDEX_BITMAP_SET (params->fld_bitmap.bits, idx);/* Not exact match */ if (!ulp_bitmap_is_ones (field->mask, field->size)) -ULP_BITMAP_SET (params->fld_bitmap.bits, -BNXT_ULP_MATCH_TYPE_BITMASK_WM ); +ULP_COMP_FLD_IDX_WR (params, +BNXT_ULP_CF_IDX_WC_MATCH ,1 ); }else {ULP_INDEX_BITMAP_RESET (params->fld_bitmap.bits, idx); }
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +2 -1
@@ -180,7 +180,8 @@ enum bnxt_ulp_cf_idx {BNXT_ULP_CF_IDX_FID =49 ,BNXT_ULP_CF_IDX_HDR_SIG_ID =50 ,BNXT_ULP_CF_IDX_FLOW_SIG_ID =51 , -BNXT_ULP_CF_IDX_LAST =52 +BNXT_ULP_CF_IDX_WC_MATCH =52 , +BNXT_ULP_CF_IDX_LAST =53 }; enum bnxt_ulp_cond_list_opc {
Signature · 1 line
2.17.1
PATCH 42/58 net/bnxt: add support for GRE flows
In reply to Venkat DuvvuruThis patch does the following to support GRE flows:
1. RTE_FLOW_ITEM_TYPE_ANY & RTE_FLOW_ITEM_TYPE_GRE processing
2. Calculate the absolute function ID from the logical VF ID passed as part of RTE_FLOW_ACTION_TYPE_VF action.
3. Move bnxt_get_bp API to bnxt_ethdev.c
--- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_ethdev.c | 26 +++++++ drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 75 ++++++++++++++++++- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 9 +++ drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 2 + 5 files changed, 110 insertions(+), 3 deletions(-)
drivers/net/bnxt/bnxt.h +1 -0
@@ -982,6 +982,7 @@ bnxt_ulp_create_vfr_default_rules(struct rte_eth_dev *vfr_ethdev);int32_t bnxt_ulp_delete_vfr_default_rules (struct bnxt_representor *vfr);uint16_t bnxt_get_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type); +struct bnxt *bnxt_get_bp (uint16_t port);uint16_t bnxt_get_svif (uint16_t port_id,bool func_svif,enum bnxt_ulp_intf_type type);uint16_t bnxt_get_fw_func_id (uint16_t port,enum bnxt_ulp_intf_type type);
drivers/net/bnxt/bnxt_ethdev.c +26 -0
@@ -4787,6 +4787,32 @@ static void bnxt_config_vf_req_fwd(struct bnxt *bp)BNXT_HWRM_CMD_TO_FORWARD (HWRM_OEM_CMD ); } +struct bnxt * +bnxt_get_bp (uint16_t port) +{ +struct bnxt *bp; +struct rte_eth_dev *dev; + +if (!rte_eth_dev_is_valid_port (port)) { +PMD_DRV_LOG (ERR ,"Invalid port %d\n" , port); +return NULL ; + } + + dev = &rte_eth_devices[port]; +if (!is_bnxt_supported (dev)) { +PMD_DRV_LOG (ERR ,"Device %d not supported\n" , port); +return NULL ; + } + + bp = (struct bnxt *)dev->data->dev_private; +if (!BNXT_TRUFLOW_EN (bp)) { +PMD_DRV_LOG (ERR ,"TRUFLOW not enabled\n" ); +return NULL ; + } + +return bp; +} +uint16_t bnxt_get_svif (uint16_t port_id,bool func_svif,enum bnxt_ulp_intf_type type)
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +72 -3
110 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +9 -0
@@ -126,6 +126,15 @@ int32_t ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item, struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item GRE Header. */ +int32_t +ulp_rte_gre_hdr_handler (const struct rte_flow_item *item, +struct ulp_rte_parser_params *params); + +int32_t +ulp_rte_item_any_handler(const struct rte_flow_item *item __rte_unused, + struct ulp_rte_parser_params *params __rte_unused); +/* Function to handle the parsing of RTE Flow item void Header. */ int32_t ulp_rte_void_hdr_handler(const struct rte_flow_item *item,
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +2 -0
@@ -27,6 +27,7 @@#define BNXT_ULP_PROTO_HDR_UDP_NUM 4#define BNXT_ULP_PROTO_HDR_TCP_NUM 9#define BNXT_ULP_PROTO_HDR_VXLAN_NUM 4 +#define BNXT_ULP_PROTO_HDR_GRE_NUM 6#define BNXT_ULP_PROTO_HDR_MAX 128#define BNXT_ULP_PROTO_HDR_FIELD_SVIF_IDX 1
@@ -76,6 +77,7 @@ struct ulp_rte_parser_params {uint32_t parent_flow;uint32_t parent_fid;uint16_t func_id; +uint16_t port_id;uint32_t class_id;uint32_t act_tmpl;struct bnxt_ulp_context *ulp_ctx;
Signature · 1 line
2.17.1
PATCH 43/58 net/bnxt: enable extended exact match support
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
The templates are updated to enable the extended exact match table support. As part of this change, the action record size of the action has to be calculated dynamically so it can be included in the match table.
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 12 + drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 87 +- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 15 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 2 + drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 712 ++++++------- .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 141 ++- .../tf_ulp/ulp_template_db_wh_plus_class.c | 936 +++++++++++++----- 7 files changed, 1283 insertions(+), 622 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +12 -0
@@ -2042,6 +2042,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,bool alloc = false;bool write = false;bool search = false; +uint64_t act_rec_size;/* use the max size if encap is enabled */ if (tbl->encap_num_fields)
@@ -2286,6 +2287,17 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms, sparms.idx, rc); goto error; } + +/* Calculate action record size */ +if (tbl->resource_type ==TF_TBL_TYPE_EXT ) { + act_rec_size = (ULP_BITS_2_BYTE_NR (tmplen) +15 ) /16 ; + act_rec_size--; +if (ulp_regfile_write (parms->regfile, +BNXT_ULP_RF_IDX_ACTION_REC_SIZE , +tfp_cpu_to_be_64 (act_rec_size))) +BNXT_TF_DBG (ERR , +"Failed write the act rec size\n" ); + } }/* Link the resource to the flow in the flow db */
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +86 -1
603 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +9 -6
@@ -3,12 +3,12 @@* All rights reserved. */ -/* date: Thu Dec 17 19:43:07 2020 */ +/* date: Tue Jan 26 15:51:49 2021 */ #ifndef ULP_TEMPLATE_DB_H_ #define ULP_TEMPLATE_DB_H_ -#define BNXT_ULP_REGFILE_MAX_SZ 32 +#define BNXT_ULP_REGFILE_MAX_SZ 34#define BNXT_ULP_MAX_NUM_DEVICES 4#define BNXT_ULP_LOG2_MAX_NUM_DEV 2#define BNXT_ULP_GEN_TBL_MAX_SZ 6
@@ -30,13 +30,13 @@#define BNXT_ULP_GLB_TEMPLATE_TBL_MAX_SZ 1#define BNXT_ULP_GLB_FIELD_TBL_SHIFT 7#define BNXT_ULP_HDR_SIG_ID_SHIFT 4 -#define BNXT_ULP_GLB_FIELD_TBL_SIZE 5593 +#define BNXT_ULP_GLB_FIELD_TBL_SIZE 5595#define ULP_WH_PLUS_CLASS_TMPL_LIST_SIZE 8#define ULP_WH_PLUS_CLASS_TBL_LIST_SIZE 63 -#define ULP_WH_PLUS_CLASS_KEY_INFO_LIST_SIZE 412 +#define ULP_WH_PLUS_CLASS_KEY_INFO_LIST_SIZE 410#define ULP_WH_PLUS_CLASS_IDENT_LIST_SIZE 17#define ULP_WH_PLUS_CLASS_RESULT_FIELD_LIST_SIZE 503 -#define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 16 +#define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 18#define ULP_STINGRAY_CLASS_TMPL_LIST_SIZE 7#define ULP_STINGRAY_CLASS_TBL_LIST_SIZE 38#define ULP_STINGRAY_CLASS_KEY_INFO_LIST_SIZE 192
@@ -392,7 +392,9 @@ enum bnxt_ulp_rf_idx {BNXT_ULP_RF_IDX_HDR_SIG_ID =29 ,BNXT_ULP_RF_IDX_FLOW_SIG_ID =30 ,BNXT_ULP_RF_IDX_RID =31 , -BNXT_ULP_RF_IDX_LAST =32 +BNXT_ULP_RF_IDX_WC_KEY_ID_0 =32 , +BNXT_ULP_RF_IDX_EM_KEY_ID_0 =33 , +BNXT_ULP_RF_IDX_LAST =34 }; enum bnxt_ulp_tcam_tbl_opc {
@@ -4941,4 +4943,5 @@ enum bnxt_ulp_df_tpl {BNXT_ULP_DF_TPL_VF_TO_VFREP =6 ,BNXT_ULP_DF_TPL_LOOPBACK_ACTION_REC =7 }; +#endif
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +2 -0
@@ -17,6 +17,8 @@ enum bnxt_ulp_glb_hf {BNXT_ULP_GLB_HF_ID_I_ETH_SMAC ,BNXT_ULP_GLB_HF_ID_O_ETH_TYPE ,BNXT_ULP_GLB_HF_ID_I_ETH_TYPE , +BNXT_ULP_GLB_HF_ID_T_GRE_VER , +BNXT_ULP_GLB_HF_ID_T_GRE_PROTO_TYPE ,BNXT_ULP_GLB_HF_ID_O_IPV4_VER ,BNXT_ULP_GLB_HF_ID_I_IPV4_VER , BNXT_ULP_GLB_HF_ID_O_IPV4_TOS,
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +356 -356
832 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +138 -3
969 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +680 -256
519 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 44/58 net/bnxt: refactor ULP mapper and parser
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
1. The internal and external exact match table resource types is combined since the resource handle contains the encoded type whether it is internal or external exact match entry.
2. When a flow doesn't hit the offloaded rules, the default action is to send it to the kernel (L2 driver interface). In order to do that, TRUFLOW must know the kernel interface's (PF's) default vnic id. This patch fetches the PF's default vnic id from the dpdk core and stores it in port database. It also stores the mac addr for the future usage. Renamed compute field for layer 4 port enums. Added support for port database opcode that can get port details like mac address which can then be populated in the l2 context entry.
3. Both active and default bit set need to considered to check if a specific flow type is enabled or not.
4. ulp mapper fetches the dpdk port id from the compute field index BNXT_ULP_CF_IDX_DEV_PORT_ID which is used to get the interface’s mac address eventually. However, the compute field array is not populated with dpdk port id at the index BNXT_ULP_CF_IDX_DEV_PORT_ID. The problem fixed by populating the compute field array correctly.
5. Some dpdk applications may accumulate the flow counters while some may not. In cases where the application is accumulating the counters the PMD need not do the accumulation itself and viceversa to report the correct flow counters.
6. Pointer to bp is added to open session parms to support shared session.
--- drivers/net/bnxt/bnxt.h | 6 + drivers/net/bnxt/bnxt_ethdev.c | 86 +++++++ drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 5 + drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 1 + drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 2 + drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 25 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 95 +++++--- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 52 +++- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 37 +++ drivers/net/bnxt/tf_ulp/ulp_port_db.h | 15 ++ drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 114 +++++++-- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 8 + .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 59 +++-- .../tf_ulp/ulp_template_db_stingray_class.c | 4 +- .../tf_ulp/ulp_template_db_wh_plus_class.c | 48 ++-- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_tun.c | 227 +++++++++++++----- drivers/net/bnxt/tf_ulp/ulp_tun.h | 44 ++-- 19 files changed, 637 insertions(+), 199 deletions(-)
drivers/net/bnxt/bnxt.h +6 -0
@@ -668,8 +668,11 @@ struct bnxt {uint32_t flags2;#define BNXT_FLAGS2_PTP_TIMESYNC_ENABLED BIT(0)#define BNXT_FLAGS2_PTP_ALARM_SCHEDULED BIT(1) +#define BNXT_FLAGS2_ACCUM_STATS_EN BIT(2)#define BNXT_P5_PTP_TIMESYNC_ENABLED (bp) \ ((bp)->flags2 & BNXT_FLAGS2_PTP_TIMESYNC_ENABLED) +#define BNXT_ACCUM_STATS_EN (bp) \ + ((bp)->flags2 & BNXT_FLAGS2_ACCUM_STATS_EN)uint16_t chip_num;#define CHIP_NUM_58818 0xd818
@@ -981,7 +984,10 @@ int32_t bnxt_ulp_create_vfr_default_rules(struct rte_eth_dev *vfr_ethdev);int32_t bnxt_ulp_delete_vfr_default_rules (struct bnxt_representor *vfr); +void bnxt_get_iface_mac (uint16_t port,enum bnxt_ulp_intf_type type, +uint8_t *mac,uint8_t *parent_mac);uint16_t bnxt_get_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type); +uint16_t bnxt_get_parent_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type);struct bnxt *bnxt_get_bp (uint16_t port);uint16_t bnxt_get_svif (uint16_t port_id,bool func_svif,enum bnxt_ulp_intf_type type);
drivers/net/bnxt/bnxt_ethdev.c +86 -0
122 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +5 -0
@@ -287,6 +287,7 @@ ulp_ctx_session_open(struct bnxt *bp,return rc; } + params.bp = bp; rc =tf_open_session (&bp->tfp, ¶ms);if (rc) { BNXT_TF_DBG(ERR, "Failed to open TF session - %s, rc = %d\n",
@@ -1071,6 +1072,10 @@ bnxt_ulp_port_init(struct bnxt *bp) }/* create the default rules */ bnxt_ulp_create_df_rules (bp); + +if (BNXT_ACCUM_STATS_EN (bp)) + bp->ulp_ctx->cfg_data->accum_stats = true; +BNXT_TF_DBG (DEBUG ,"BNXT Port:%d ULP port init\n" , bp->eth_dev->data->port_id);return rc;
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +1 -0
@@ -67,6 +67,7 @@ struct bnxt_ulp_data {#define BNXT_ULP_TUN_ENTRY_INVALID -1#define BNXT_ULP_MAX_TUN_CACHE_ENTRIES 16struct bnxt_tun_cache_entry tun_tbl[BNXT_ULP_MAX_TUN_CACHE_ENTRIES ]; +bool accum_stats; };struct bnxt_ulp_context {
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +2 -0
@@ -143,6 +143,8 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,/* copy the device port id and direction for further processing */ ULP_COMP_FLD_IDX_WR (¶ms,BNXT_ULP_CF_IDX_INCOMING_IF , dev->data->port_id); +ULP_COMP_FLD_IDX_WR (¶ms,BNXT_ULP_CF_IDX_DEV_PORT_ID , + dev->data->port_id);ULP_COMP_FLD_IDX_WR (¶ms,BNXT_ULP_CF_IDX_SVIF_FLAG ,BNXT_ULP_INVALID_SVIF_VAL );
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +17 -8
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -317,8 +317,18 @@ static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,/* TBD - Get PKT/BYTE COUNT SHIFT/MASK from Template */ sw_cntr_indx = hw_cntr_id - fc_info->shadow_hw_tbl[dir].start_idx; sw_acc_tbl_entry = &fc_info->sw_acc_tbl[dir][sw_cntr_indx]; - sw_acc_tbl_entry->pkt_count =FLOW_CNTR_PKTS (stats, dparms); - sw_acc_tbl_entry->byte_count =FLOW_CNTR_BYTES (stats, dparms); +/* Some dpdk applications may accumulate the flow counters while some +* may not. In cases where the application is accumulating the counters +* the PMD need not do the accumulation itself and viceversa to report +* the correct flow counters. +*/ +if (ctxt->cfg_data->accum_stats) { + sw_acc_tbl_entry->pkt_count +=FLOW_CNTR_PKTS (stats, dparms); + sw_acc_tbl_entry->byte_count +=FLOW_CNTR_BYTES (stats, dparms); + }else { + sw_acc_tbl_entry->pkt_count =FLOW_CNTR_PKTS (stats, dparms); + sw_acc_tbl_entry->byte_count =FLOW_CNTR_BYTES (stats, dparms); + }/* Update the parent counters if it is child flow */ if (sw_acc_tbl_entry->parent_flow_id) {
@@ -628,11 +638,10 @@ int ulp_fc_mgr_query_count_get(struct bnxt_ulp_context *ctxt,pthread_mutex_unlock (&ulp_fc_info->fc_lock); }else if (params.resource_sub_type ==BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT_ACC ) { -/* Get the stats from the parent child table */ -ulp_flow_db_parent_flow_count_get (ctxt, - flow_id, - &count->hits, - &count->bytes); +/* Get stats from the parent child table */ +ulp_flow_db_parent_flow_count_get (ctxt, flow_id, + &count->hits, &count->bytes, + count->reset); count->hits_set =1 ; count->bytes_set =1 ; }else {
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +59 -36
242 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +3 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2019 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -390,7 +390,8 @@ int32_t ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt, uint32_t parent_fid, uint64_t *packet_count, - uint64_t *byte_count); + uint64_t *byte_count, + uint8_t count_reset);/* * reset the parent accumulation counters
drivers/net/bnxt/tf_ulp/ulp_mapper.c +43 -9
100 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_port_db.c +37 -0
@@ -182,6 +182,13 @@ int32_t ulp_port_db_dev_port_intf_update(struct bnxt_ulp_context *ulp_ctxt, func->ifindex = ifindex; } +/* When there is no match, the default action is to send the packet to +* the kernel. And to send it to the kernel, we need the PF's vnic id. +*/ + func->func_parent_vnic =bnxt_get_parent_vnic_id (port_id, intf->type); +bnxt_get_iface_mac (port_id, intf->type, func->func_mac, + func->func_parent_mac); + port_data = &port_db->phy_port_list[func->phy_port_id];if (!port_data->port_valid) { port_data->port_svif =
@@ -579,3 +586,33 @@ ulp_port_db_port_func_id_get(struct bnxt_ulp_context *ulp_ctxt, }return 0 ; } + +/* +* Api to get the parent mac address for a given port id. +* +* ulp_ctxt [in] Ptr to ulp context +* port_id [in].device port id +* mac_addr [out] mac address +* +* Returns 0 on success or negative number on failure. +*/ +int32_t +ulp_port_db_parent_mac_addr_get (struct bnxt_ulp_context *ulp_ctxt, +uint32_t port_id,uint8_t **mac_addr) +{ +struct bnxt_ulp_port_db *port_db; +uint16_t func_id; + + port_db =bnxt_ulp_cntxt_ptr2_port_db_get (ulp_ctxt); +if (ulp_port_db_port_func_id_get (ulp_ctxt, port_id, &func_id)) { +BNXT_TF_DBG (ERR ,"Invalid port_id %x\n" , port_id); +return -EINVAL ; + } + +if (!port_db->ulp_func_id_tbl[func_id].func_valid) { +BNXT_TF_DBG (ERR ,"Invalid func_id %x\n" , func_id); +return -ENOENT ; + } + *mac_addr = port_db->ulp_func_id_tbl[func_id].func_parent_mac; +return 0 ; +}
drivers/net/bnxt/tf_ulp/ulp_port_db.h +15 -0
@@ -46,6 +46,9 @@ struct ulp_func_if_info {uint16_t func_spif;uint16_t func_parif;uint16_t func_vnic; +uint8_t func_mac[RTE_ETHER_ADDR_LEN ]; +uint16_t func_parent_vnic; +uint8_t func_parent_mac[RTE_ETHER_ADDR_LEN ];uint16_t phy_port_id;uint16_t ifindex; };
@@ -272,4 +275,16 @@ int32_t ulp_port_db_port_func_id_get(struct bnxt_ulp_context *ulp_ctxt, uint16_t port_id, uint16_t *func_id); +/* +* Api to get the parent mac address for a given port id. +* +* ulp_ctxt [in] Ptr to ulp context +* port_id [in].device port id +* mac_addr [out] mac address +* +* Returns 0 on success or negative number on failure. +*/ +int32_t +ulp_port_db_parent_mac_addr_get (struct bnxt_ulp_context *ulp_ctxt, +uint32_t port_id,uint8_t **mac_addr);#endif /* _ULP_PORT_DB_H_ */
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +96 -18
218 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +8 -0
@@ -245,4 +245,12 @@ int32_t ulp_rte_jump_act_handler(const struct rte_flow_action *action_item, struct ulp_rte_parser_params *params); +int32_t +ulp_rte_sample_act_handler (const struct rte_flow_action *action_item, +struct ulp_rte_parser_params *params); + +int32_t +ulp_rte_shared_act_handler (const struct rte_flow_action *action_item, +struct ulp_rte_parser_params *params); +#endif /* _ULP_RTE_PARSER_H_ */
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +41 -18
89 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c +2 -2
@@ -205,7 +205,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_stingray_class_tbl_list[] = { .encap_num_fields = 0 }, {/* class_tid: 1, stingray, table: em.int_0 */ - .resource_func = BNXT_ULP_RESOURCE_FUNC_INT_EM_TABLE, + .resource_func = BNXT_ULP_RESOURCE_FUNC_EM_TABLE, .resource_type = TF_MEM_INTERNAL, .direction = TF_DIR_RX, .mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_INT,
@@ -228,7 +228,7 @@ struct bnxt_ulp_mapper_tbl_info ulp_stingray_class_tbl_list[] = { .encap_num_fields = 0 }, {/* class_tid: 1, stingray, table: eem.ext_0 */ - .resource_func = BNXT_ULP_RESOURCE_FUNC_EXT_EM_TABLE, + .resource_func = BNXT_ULP_RESOURCE_FUNC_EM_TABLE, .resource_type = TF_MEM_EXTERNAL, .direction = TF_DIR_RX, .mem_type_opcode = BNXT_ULP_MEM_TYPE_OPC_EXECUTE_IF_EXT,
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +24 -24
144 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +2 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2019 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -63,6 +63,7 @@ struct ulp_rte_act_prop {/* Structure to be used for passing all the parser functions */ struct ulp_rte_parser_params { +STAILQ_ENTRY (ulp_rte_parser_params) next;struct ulp_rte_hdr_bitmap hdr_bitmap;struct ulp_rte_hdr_bitmap hdr_fp_bit;struct ulp_rte_field_bitmap fld_bitmap;
drivers/net/bnxt/tf_ulp/ulp_tun.c +165 -62
323 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_tun.h +25 -19
99 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 45/58 net/bnxt: add support for generic hash table
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
Added support for generic table to enable search of keys that are larger than 16 bits using hash table.
--- drivers/net/bnxt/tf_ulp/meson.build | 1 + drivers/net/bnxt/tf_ulp/ulp_gen_hash.c | 369 + drivers/net/bnxt/tf_ulp/ulp_gen_hash.h | 166 + drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 130 +- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h | 30 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 90 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 17724 +++++++++------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 159 +- .../tf_ulp/ulp_template_db_stingray_class.c | 6 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 54 +- .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 2 + .../tf_ulp/ulp_template_db_wh_plus_class.c | 882 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 5 + drivers/net/bnxt/tf_ulp/ulp_utils.c | 8 + drivers/net/bnxt/tf_ulp/ulp_utils.h | 3 + 15 files changed, 11669 insertions(+), 7960 deletions(-) create mode 100644 drivers/net/bnxt/tf_ulp/ulp_gen_hash.c create mode 100644 drivers/net/bnxt/tf_ulp/ulp_gen_hash.h
drivers/net/bnxt/tf_ulp/meson.build +1 -0
@@ -23,6 +23,7 @@ sources += files( 'ulp_fc_mgr.c', 'ulp_tun.c', 'ulp_gen_tbl.c', + 'ulp_gen_hash.c', 'ulp_rte_handler_tbl.c', 'ulp_template_db_wh_plus_act.c', 'ulp_template_db_wh_plus_class.c',
drivers/net/bnxt/tf_ulp/ulp_gen_hash.c new file +369 -0
369 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_gen_hash.h new file +166 -0
166 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c +111 -19
201 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h +23 -7
@@ -6,6 +6,8 @@#ifndef _ULP_GEN_TBL_H_#define _ULP_GEN_TBL_H_ +#include "ulp_gen_hash.h" +/* Macros for reference count manipulation */ #define ULP_GEN_TBL_REF_CNT_INC (entry) {*(entry)->ref_count += 1; }#define ULP_GEN_TBL_REF_CNT_DEC (entry) {*(entry)->ref_count -= 1; }
@@ -16,9 +18,9 @@/* Structure to pass the generic table values across APIs */ struct ulp_mapper_gen_tbl_entry { -uint32_t *ref_count; -uint32_t byte_data_size; -uint8_t *byte_data; +uint32_t *ref_count; +uint32_t byte_data_size; +uint8_t *byte_data;enum bnxt_ulp_byte_order byte_order; };
@@ -39,9 +41,11 @@ struct ulp_mapper_gen_tbl_cont {/* Structure to store the generic tbl container */ struct ulp_mapper_gen_tbl_list { +const char *gen_tbl_name;struct ulp_mapper_gen_tbl_cont container;uint32_t mem_data_size;uint8_t *mem_data; +struct ulp_gen_hash_tbl *hash_tbl; };/* Forward declaration */
@@ -73,16 +77,14 @@ ulp_mapper_generic_tbl_list_deinit(struct bnxt_ulp_mapper_data *mapper_data);/* * Get the generic table list entry * -* ulp_ctxt [in] - Ptr to ulp_context -* tbl_idx [in] - Table index to the generic table list +* tbl_list [in] - Ptr to generic table * key [in] - Key index to the table * entry [out] - output will include the entry if found * * returns 0 on success. */ int32_t -ulp_mapper_gen_tbl_entry_get (struct bnxt_ulp_context *ulp, -uint32_t tbl_idx, +ulp_mapper_gen_tbl_entry_get (struct ulp_mapper_gen_tbl_list *tbl_list,uint32_t key,struct ulp_mapper_gen_tbl_entry *entry);
@@ -140,4 +142,18 @@ int32_t ulp_mapper_gen_tbl_res_free(struct bnxt_ulp_context *ulp_ctx, struct ulp_flow_db_res_params *res); +/* +* Write the generic table list hash entry +* +* tbl_list [in] - pointer to the generic table list +* hash_entry [in] - Hash table entry +* gen_tbl_ent [out] - generic table entry +* +* returns 0 on success. +*/ +int32_t +ulp_mapper_gen_tbl_hash_entry_add (struct ulp_mapper_gen_tbl_list *tbl_list, +struct ulp_gen_hash_entry_params *hash_entry, +struct ulp_mapper_gen_tbl_entry *gen_tbl_ent); +#endif /* _ULP_EN_TBL_H_ */
drivers/net/bnxt/tf_ulp/ulp_mapper.c +67 -23
173 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +10048 -7676
2,017 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +147 -12
159 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +49 -5
54 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +2 -0
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +667 -215
882 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +5 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 46/58 net/bnxt: add support for Thor platform
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
1. Add templates to support Thor platform.
2. Flow counter manager is not enabled if no flow counters are configured.
3. Mark database is not enabled if mark action is not supported.
4. Removed application to port default flow.
5. Add allocate and write for the global registry file.
6. Multiple default flow templates are combined to one.
7. Remove default loopback action record, this is required in order to support multiple platforms.
8. Enable port table support in the generic table.
9. remove global template table in orderto support multiple platforms.
10. Add support to get parent VNIC from port table database.
11. VF representor action mark is made optional since not all configurations need representor support.
12. Add layer 4 ports to computational fields.
13. Update templates to support the above changes.
14. Add support for wildcard.
---
drivers/net/bnxt/meson.build | 2 +
drivers/net/bnxt/tf_core/tf_core.h | 8 -
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 4 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 101 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 9 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 6 +-
drivers/net/bnxt/tf_ulp/meson.build | 4 +-
drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 67 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 18 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 2 +-
drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 9 +-
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 26 +-
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h | 14 +-
drivers/net/bnxt/tf_ulp/ulp_mapper.c | 414 +-
drivers/net/bnxt/tf_ulp/ulp_mapper.h | 7 +
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 12 +-
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h | 2 +-
drivers/net/bnxt/tf_ulp/ulp_matcher.c | 2 +-
drivers/net/bnxt/tf_ulp/ulp_matcher.h | 2 +-
drivers/net/bnxt/tf_ulp/ulp_port_db.c | 88 +-
drivers/net/bnxt/tf_ulp/ulp_port_db.h | 31 +-
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 18 +-
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 152 +-
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 7 +-
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 2 +-
.../net/bnxt/tf_ulp/ulp_template_db_class.c | 99772 +++++++++-------
.../net/bnxt/tf_ulp/ulp_template_db_enum.h | 8943 +-
.../net/bnxt/tf_ulp/ulp_template_db_field.h | 579 +-
.../tf_ulp/ulp_template_db_stingray_act.c | 709 -
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 752 +-
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h | 44 +-
.../bnxt/tf_ulp/ulp_template_db_thor_act.c | 229 +
...y_class.c => ulp_template_db_thor_class.c} | 5954 +-
.../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 75 +-
.../tf_ulp/ulp_template_db_wh_plus_class.c | 5403 +-
drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 12 +
drivers/net/bnxt/tf_ulp/ulp_tun.h | 4 -
drivers/net/bnxt/tf_ulp/ulp_utils.c | 187 +-
drivers/net/bnxt/tf_ulp/ulp_utils.h | 66 +-
39 files changed, 68795 insertions(+), 54941 deletions(-)
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c
rename drivers/net/bnxt/tf_ulp/{ulp_template_db_stingray_class.c => ulp_template_db_thor_class.c} (55%)drivers/net/bnxt/meson.build +2 -0
@@ -8,7 +8,9 @@ if is_windows subdir_done() endif +headers = files('rte_pmd_bnxt.h') cflags_options = [ + '-DRTE_LIBRTE_BNXT_TF', '-DSUPPORT_CFA_HW_ALL=1', ]
drivers/net/bnxt/tf_core/tf_core.h +0 -8
@@ -1104,10 +1104,6 @@ struct tf_alloc_tbl_scope_parms {* [in] Number of flows * 1000. If set, rx_mem_size_in_mb must equal 0. */ uint32_t rx_num_flows_in_k; -/** -* [in] SR2 only receive table access interface id -*/ -uint32_t rx_tbl_if_id;/** * [in] All Maximum key size required. */
@@ -1126,10 +1122,6 @@ struct tf_alloc_tbl_scope_parms {* [in] Number of flows * 1000 */ uint32_t tx_num_flows_in_k; -/** -* [in] SR2 only receive table access interface id -*/ -uint32_t tx_tbl_if_id;/** * [in] Flush pending HW cached flows every 1/10th of value * set in seconds, both idle and active flows are flushed
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h +1 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2019 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -23,12 +23,10 @@#define BNXT_ULP_DFLT_RX_MAX_ACTN_ENTRY 256#define BNXT_ULP_DFLT_RX_MEM 0#define BNXT_ULP_RX_NUM_FLOWS 32 -#define BNXT_ULP_RX_TBL_IF_ID 0#define BNXT_ULP_DFLT_TX_MAX_KEY 512#define BNXT_ULP_DFLT_TX_MAX_ACTN_ENTRY 256#define BNXT_ULP_DFLT_TX_MEM 0#define BNXT_ULP_TX_NUM_FLOWS 32 -#define BNXT_ULP_TX_TBL_IF_ID 0enum bnxt_tf_rc {BNXT_TF_RC_PARSE_ERR =-2 ,
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +91 -10
189 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +4 -5
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2020 Broadcom +* Copyright(c) 2019-2021 Broadcom * All rights reserved. */
@@ -10,6 +10,7 @@#include <stdbool.h> #include <sys/queue.h> +#include "rte_version.h" #include "rte_ethdev.h" #include "ulp_template_db_enum.h"
@@ -38,14 +39,12 @@ enum bnxt_ulp_flow_mem_type { };struct bnxt_ulp_df_rule_info { -uint32_t port_to_app_flow_id; -uint32_t app_to_port_flow_id; +uint32_t def_port_flow_id;uint8_t valid; };struct bnxt_ulp_vfr_rule_info { -uint32_t rep2vf_flow_id; -uint32_t vf2rep_flow_id; +uint32_t vfr_flow_id;uint16_t parent_port_id;uint8_t valid; };
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +5 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -70,8 +70,10 @@ bnxt_ulp_set_dir_attributes(struct ulp_rte_parser_params *params, params->dir_attr |=BNXT_ULP_FLOW_ATTR_EGRESS ;if (attr->ingress) params->dir_attr |=BNXT_ULP_FLOW_ATTR_INGRESS ; +#if RTE_VERSION_NUM (17 ,11 ,10 ,16 ) <RTE_VERSION if (attr->transfer) params->dir_attr |=BNXT_ULP_FLOW_ATTR_TRANSFER ; +#endif }void
@@ -79,6 +81,7 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,struct ulp_rte_parser_params *params, enum bnxt_ulp_fdb_type flow_type) { + memset(mapper_cparms, 0, sizeof(*mapper_cparms)); mapper_cparms->flow_type = flow_type; mapper_cparms->app_priority = params->priority; mapper_cparms->dir_attr = params->dir_attr;
@@ -186,6 +189,7 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev, params.fid = fid; params.func_id = func_id; params.priority = attr->priority; + params.port_id = dev->data->port_id;/* Perform the rte flow post process */ ret =bnxt_ulp_rte_parser_post_process (¶ms);if (ret ==BNXT_TF_RC_ERROR )
drivers/net/bnxt/tf_ulp/meson.build +2 -2
@@ -27,5 +27,5 @@ sources += files( 'ulp_rte_handler_tbl.c', 'ulp_template_db_wh_plus_act.c', 'ulp_template_db_wh_plus_class.c', - 'ulp_template_db_stingray_act.c', - 'ulp_template_db_stingray_class.c') + 'ulp_template_db_thor_act.c', + 'ulp_template_db_thor_class.c')
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +20 -47
135 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +15 -3
@@ -80,6 +80,12 @@ ulp_fc_mgr_init(struct bnxt_ulp_context *ctxt)return -EINVAL ; } +if (!dparms->flow_count_db_entries) { +BNXT_TF_DBG (DEBUG ,"flow counter support is not enabled\n" ); +bnxt_ulp_cntxt_ptr2_fc_info_set (ctxt,NULL ); +return 0 ; + } + ulp_fc_info =rte_zmalloc ("ulp_fc_info" ,sizeof (*ulp_fc_info),0 );if (!ulp_fc_info) goto error;
@@ -169,7 +175,10 @@ bool ulp_fc_mgr_thread_isstarted(struct bnxt_ulp_context *ctxt) ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ctxt); -return !!(ulp_fc_info->flags &ULP_FLAG_FC_THREAD ); +if (ulp_fc_info) +return !!(ulp_fc_info->flags &ULP_FLAG_FC_THREAD ); + +return false; }/*
@@ -186,7 +195,7 @@ ulp_fc_mgr_thread_start(struct bnxt_ulp_context *ctxt) ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ctxt); -if (!(ulp_fc_info->flags &ULP_FLAG_FC_THREAD )) { +if (ulp_fc_info && !(ulp_fc_info->flags &ULP_FLAG_FC_THREAD )) {rte_eal_alarm_set (US_PER_S *ULP_FC_TIMER , ulp_fc_mgr_alarm_cb, (void *)ctxt);
@@ -459,7 +468,10 @@ bool ulp_fc_mgr_start_idx_isset(struct bnxt_ulp_context *ctxt, enum tf_dir dir) ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ctxt); -return ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set; +if (ulp_fc_info) +return ulp_fc_info->shadow_hw_tbl[dir].start_idx_is_set; + +return false; }/*
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2019 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +7 -2
@@ -522,7 +522,9 @@ ulp_flow_db_init(struct bnxt_ulp_context *ulp_ctxt)bnxt_ulp_cntxt_ptr2_flow_db_set (ulp_ctxt, flow_db);/* Determine the number of flows based on EM type */ -bnxt_ulp_cntxt_mem_type_get (ulp_ctxt, &mtype); +if (bnxt_ulp_cntxt_mem_type_get (ulp_ctxt, &mtype)) + goto error_free; +if (mtype ==BNXT_ULP_FLOW_MEM_TYPE_INT ) num_flows = dparms->int_flow_db_num_entries;else
@@ -676,6 +678,7 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,struct bnxt_ulp_flow_db *flow_db;struct bnxt_ulp_flow_tbl *flow_tbl;struct ulp_fdb_resource_info *resource, *fid_resource; +struct bnxt_ulp_fc_info *ulp_fc_info;uint32_t idx; flow_db =bnxt_ulp_cntxt_ptr2_flow_db_get (ulp_ctxt);
@@ -728,9 +731,11 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,ulp_flow_db_res_params_to_info (fid_resource, params); } + ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ulp_ctxt);if (params->resource_type ==TF_TBL_TYPE_ACT_STATS_64 && params->resource_sub_type == -BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT ) { +BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT && + ulp_fc_info) {/* Store the first HW counter ID for this table */ if (!ulp_fc_mgr_start_idx_isset (ulp_ctxt, params->direction)) ulp_fc_mgr_start_idx_set(ulp_ctxt, params->direction,
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c +23 -3
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -246,8 +246,28 @@ ulp_mapper_gen_tbl_entry_data_get(struct ulp_mapper_gen_tbl_entry *entry,return 0 ; } -/* -* Free the generic table list entry +/* Free the generic table list entry +* +* ulp_ctx [in] - Pointer to the ulp context +* tbl_idx [in] - Index of the generic table +* ckey [in] - Key for the entry in the table +* +* returns 0 on success +*/ +int32_t +ulp_mapper_gen_tbl_entry_free (struct bnxt_ulp_context *ulp_ctx, +uint32_t tbl_idx,uint32_t ckey) +{ +struct ulp_flow_db_res_params res; + + res.direction = tbl_idx &0x1 ; + res.resource_sub_type = tbl_idx >>1 ; + res.resource_hndl = ckey; + +return ulp_mapper_gen_tbl_res_free (ulp_ctx, &res); +} + +/* Free the generic table list resource * * ulp_ctx [in] - Pointer to the ulp context * res [in] - Pointer to flow db resource entry
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h +13 -1
@@ -131,7 +131,7 @@ ulp_mapper_gen_tbl_entry_data_get(struct ulp_mapper_gen_tbl_entry *entry, uint32_t data_size);/* -* Free the generic table list entry +* Free the generic table list resource * * ulp_ctx [in] - Pointer to the ulp context * res [in] - Pointer to flow db resource entry
@@ -142,6 +142,18 @@ int32_t ulp_mapper_gen_tbl_res_free(struct bnxt_ulp_context *ulp_ctx, struct ulp_flow_db_res_params *res); +/* Free the generic table list entry +* +* ulp_ctx [in] - Pointer to the ulp context +* tbl_idx [in] - Index of the generic table +* ckey [in] - Key for the entry in the table +* +* returns 0 on success +*/ +int32_t +ulp_mapper_gen_tbl_entry_free (struct bnxt_ulp_context *ulp_ctx, +uint32_t tbl_idx,uint32_t ckey); +/* * Write the generic table list hash entry *
drivers/net/bnxt/tf_ulp/ulp_mapper.c +231 -183
630 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +7 -0
@@ -82,6 +82,7 @@ struct bnxt_ulp_mapper_create_parms {/* if set then create a parent flow */ uint32_t parent_flow;uint8_t tun_idx; +uint64_t shared_hndl;/* support pattern based rejection */ uint32_t flow_pattern_id;
@@ -120,4 +121,10 @@ ulp_mapper_resources_free(struct bnxt_ulp_context *ulp_ctx,enum bnxt_ulp_fdb_type flow_type, uint32_t fid); +int32_t +ulp_mapper_get_shared_fid (struct bnxt_ulp_context *ulp, +uint32_t id, +uint16_t key, +uint32_t *fid); +#endif /* _ULP_MAPPER_H_ */
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c +8 -4
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -73,6 +73,12 @@ ulp_mark_db_init(struct bnxt_ulp_context *ctxt)return -EINVAL ; } +if (!dparms->mark_db_lfid_entries || !dparms->mark_db_gfid_entries) { +BNXT_TF_DBG (DEBUG ,"mark Table is not allocated\n" ); +bnxt_ulp_cntxt_ptr2_mark_db_set (ctxt,NULL ); +return 0 ; + } + mark_tbl =rte_zmalloc ("ulp_rx_mark_tbl_ptr" ,sizeof (struct bnxt_ulp_mark_tbl ),0 );if (!mark_tbl)
@@ -182,10 +188,8 @@ ulp_mark_db_mark_get(struct bnxt_ulp_context *ctxt,return -EINVAL ; mtbl =bnxt_ulp_cntxt_ptr2_mark_db_get (ctxt); -if (!mtbl) { -BNXT_TF_DBG (ERR ,"Unable to get Mark Table\n" ); +if (!mtbl)return -EINVAL ; - } idx =ulp_mark_db_idx_get (is_gfid, fid, mtbl);
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2019 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_matcher.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_matcher.h +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_port_db.c +75 -13
122 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_port_db.h +29 -2
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2019 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -279,7 +279,7 @@ ulp_port_db_port_func_id_get(struct bnxt_ulp_context *ulp_ctxt,* Api to get the parent mac address for a given port id. * * ulp_ctxt [in] Ptr to ulp context -* port_id [in].device port id +* port_id [in] device port id * mac_addr [out] mac address * * Returns 0 on success or negative number on failure.
@@ -287,4 +287,31 @@ ulp_port_db_port_func_id_get(struct bnxt_ulp_context *ulp_ctxt,int32_t ulp_port_db_parent_mac_addr_get (struct bnxt_ulp_context *ulp_ctxt,uint32_t port_id,uint8_t **mac_addr); + +/* +* Api to get the mac address for a given port id. +* +* ulp_ctxt [in] Ptr to ulp context +* port_id [in] device port id +* mac_addr [out] mac address +* +* Returns 0 on success or negative number on failure. +*/ +int32_t +ulp_port_db_drv_mac_addr_get (struct bnxt_ulp_context *ulp_ctxt, +uint32_t port_id,uint8_t **mac_addr); + +/* +* Api to get the parent vnic for a given port id. +* +* ulp_ctxt [in] Ptr to ulp context +* port_id [in] device port id +* vnic [out] parent vnic +* +* Returns 0 on success or negative number on failure. +*/ +int32_t +ulp_port_db_parent_vnic_get (struct bnxt_ulp_context *ulp_ctxt, +uint32_t port_id,uint8_t **vnic); +#endif /* _ULP_PORT_DB_H_ */
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c +11 -7
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -208,6 +208,10 @@ struct bnxt_ulp_rte_act_info ulp_act_info[] = { [RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK ] = { .act_type =BNXT_ULP_ACT_TYPE_NOT_SUPPORTED , .proto_act_func =NULL + }, + [RTE_FLOW_ACTION_TYPE_SAMPLE ] = { + .act_type =BNXT_ULP_ACT_TYPE_SUPPORTED , + .proto_act_func = ulp_rte_sample_act_handler } };
@@ -230,8 +234,8 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = { .proto_hdr_func = NULL }, [RTE_FLOW_ITEM_TYPE_ANY] = { - .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED, - .proto_hdr_func =NULL + .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, + .proto_hdr_func = ulp_rte_item_any_handler }, [RTE_FLOW_ITEM_TYPE_PF] = { .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
@@ -270,8 +274,8 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = { .proto_hdr_func = ulp_rte_ipv6_hdr_handler }, [RTE_FLOW_ITEM_TYPE_ICMP] = { - .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED, - .proto_hdr_func =NULL + .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, + .proto_hdr_func = ulp_rte_icmp_hdr_handler }, [RTE_FLOW_ITEM_TYPE_UDP] = { .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
@@ -302,8 +306,8 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = { .proto_hdr_func = NULL }, [RTE_FLOW_ITEM_TYPE_GRE] = { - .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED, - .proto_hdr_func =NULL + .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, + .proto_hdr_func = ulp_rte_gre_hdr_handler }, [RTE_FLOW_ITEM_TYPE_FUZZY] = { .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED,
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +135 -17
268 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +6 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
@@ -135,6 +135,11 @@ int32_t ulp_rte_item_any_handler(const struct rte_flow_item *item __rte_unused, struct ulp_rte_parser_params *params __rte_unused); +/* Function to handle the parsing of RTE Flow item ICMP Header. */ +int32_t +ulp_rte_icmp_hdr_handler (const struct rte_flow_item *item, +struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item void Header. */ int32_t ulp_rte_void_hdr_handler(const struct rte_flow_item *item,
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +1 -1
@@ -1,5 +1,5 @@/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2014-2020 Broadcom +* Copyright(c) 2014-2021 Broadcom * All rights reserved. */
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +55908 -43864
1,226 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +4769 -4174
8,943 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +303 -276
579 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c deleted +0 -709
709 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +399 -353
752 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h +43 -1
44 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c new file +229 -0
229 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_class.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c +2711 -3243
5,954 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +55 -20
75 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +3433 -1970
5,403 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +12 -0
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_utils.c +179 -8
187 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_utils.h +64 -2
66 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 47/58 net/bnxt: refactor flow parser in ULP
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
1. Remove Ether type, Vlan type and IP proto type from pattern matching, since the header bits can be used for matching. This reduces the class template signatures by a factor of 8.
2. Remove the wild card bit in the pattern matching since same template can be used for both exact and wild card entries.
3. The action record pointers have to use higher range to not collide with the firmware action record pointers. Hence reduced the number of action record pointers for whitney platform.
4. The conditional update opcode provide functionality to reject flows for instance reject flows that do not adhere to flow signature match.
5. Added check to not populate protocol specifications if the protocol mask is null or zero.
6. Check that field array is not overrun.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 193 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 2 +- drivers/net/bnxt/tf_ulp/ulp_matcher.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 926 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 7 + .../net/bnxt/tf_ulp/ulp_template_db_class.c | 96165 ++-------------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 5307 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 31 +- .../bnxt/tf_ulp/ulp_template_db_thor_act.c | 1 - .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 220 +- .../tf_ulp/ulp_template_db_wh_plus_class.c | 302 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 13 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 2 +- 15 files changed, 8494 insertions(+), 94685 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +2 -2
@@ -94,7 +94,7 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp,/* Table Types */ res->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ; - res->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =16384 ; + res->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =8192 ; res->tbl_cnt[TF_DIR_RX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */
@@ -130,7 +130,7 @@ bnxt_ulp_tf_session_resources_get(struct bnxt *bp,/* Table Types */ res->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_FULL_ACT_RECORD ] =8192 ; - res->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =16384 ; + res->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_STATS_64 ] =8192 ; res->tbl_cnt[TF_DIR_TX ].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4 ] =1023 ;/* ENCAP */
drivers/net/bnxt/tf_ulp/ulp_mapper.c +149 -44
241 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +1 -1
@@ -26,7 +26,7 @@ struct bnxt_ulp_mapper_glb_resource_entry {struct bnxt_ulp_mapper_data {struct bnxt_ulp_mapper_glb_resource_entry - glb_res_tbl[TF_DIR_MAX ][BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ ]; + glb_res_tbl[TF_DIR_MAX ][BNXT_ULP_GLB_RF_IDX_LAST ];struct ulp_mapper_gen_tbl_list gen_tbl_list[BNXT_ULP_GEN_TBL_MAX_SZ ]; };
drivers/net/bnxt/tf_ulp/ulp_matcher.c +2 -2
@@ -52,7 +52,7 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,/* calculate the hash of the given flow */ class_hid =ulp_matcher_class_hash_calculate (params->hdr_bitmap.bits, - params->fld_bitmap.bits); + params->fld_s_bitmap.bits);/* validate the calculate hash values */ if (class_hid >=BNXT_ULP_CLASS_SIG_TBL_MAX_SZ )
@@ -66,7 +66,7 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,BNXT_TF_DBG (DEBUG ,"Proto Header does not match\n" ); goto error; } -if (ULP_BITMAP_CMP (¶ms->fld_bitmap, &class_match->field_sig)) { +if (ULP_BITMAP_CMP (¶ms->fld_s_bitmap, &class_match->field_sig)) {BNXT_TF_DBG (DEBUG ,"Field signature does not match\n" ); goto error; }
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +445 -481
1,141 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +7 -0
@@ -36,6 +36,13 @@#define BNXT_ULP_PARSER_IPV6_TC 0x0ff00000#define BNXT_ULP_PARSER_IPV6_FLOW_LABEL 0x000fffff +enum bnxt_ulp_prsr_action { +ULP_PRSR_ACT_DEFAULT =0 , +ULP_PRSR_ACT_MATCH_IGNORE =1 , +ULP_PRSR_ACT_MASK_IGNORE =2 , +ULP_PRSR_ACT_SPEC_IGNORE =4 +}; + void bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms, struct ulp_rte_parser_params *params,
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +6876 -89289
1,565 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +723 -4584
5,307 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +30 -1
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c +0 -1
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +109 -111
220 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +136 -166
302 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +12 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 48/58 net/bnxt: add shared session support to ULP
In reply to Venkat DuvvuruFrom: Mike Baucom <[email protected]>
Shared session permits cooperative sharing of prescribed resources between applications.
- devargs added for app-id in order to enable sharing session resources across applications
- shared session management added
- tf resource reservations are now app and device dependent
--- drivers/net/bnxt/bnxt.h | 2 + drivers/net/bnxt/bnxt_ethdev.c | 50 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 645 +++-- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 39 + drivers/net/bnxt/tf_ulp/ulp_mapper.c | 186 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 1 + .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 13 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 2177 +++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 33 + 9 files changed, 2909 insertions(+), 237 deletions(-)
drivers/net/bnxt/bnxt.h +2 -0
@@ -831,9 +831,11 @@ struct bnxt {uint16_t port_svif;struct tf tfp; +struct tf tfp_shared;struct bnxt_ulp_context *ulp_ctx;struct bnxt_flow_stat_info *flow_stat;uint16_t max_num_kflows; +uint8_t app_id;uint16_t tx_cfa_action; };
drivers/net/bnxt/bnxt_ethdev.c +50 -0
80 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +428 -217
723 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +39 -0
@@ -29,7 +29,13 @@/* defines for the ulp_flags */ #define BNXT_ULP_VF_REP_ENABLED 0x1 +#define BNXT_ULP_SHARED_SESSION_ENABLED 0x2 +#define BNXT_ULP_APP_DEV_UNSUPPORTED 0x4#define ULP_VF_REP_IS_ENABLED (flag) ((flag) & BNXT_ULP_VF_REP_ENABLED) +#define ULP_SHARED_SESSION_IS_ENABLED (flag) ((flag) &\ + BNXT_ULP_SHARED_SESSION_ENABLED) +#define ULP_APP_DEV_UNSUPPORTED_ENABLED (flag) ((flag) &\ + BNXT_ULP_APP_DEV_UNSUPPORTED)enum bnxt_ulp_flow_mem_type {BNXT_ULP_FLOW_MEM_TYPE_INT =0 ,
@@ -67,11 +73,13 @@ struct bnxt_ulp_data {#define BNXT_ULP_MAX_TUN_CACHE_ENTRIES 16struct bnxt_tun_cache_entry tun_tbl[BNXT_ULP_MAX_TUN_CACHE_ENTRIES ];bool accum_stats; +uint8_t app_id; };struct bnxt_ulp_context {struct bnxt_ulp_data *cfg_data;struct tf *g_tfp; +struct tf *g_shared_tfp; };struct bnxt_ulp_pci_info {
@@ -86,6 +94,7 @@ struct bnxt_ulp_session_state {struct bnxt_ulp_pci_info pci_info;struct bnxt_ulp_data *cfg_data;struct tf *g_tfp; +struct tf g_shared_tfp;uint32_t session_opened; };
@@ -135,6 +144,14 @@ int32_t bnxt_ulp_cntxt_tbl_scope_id_get(struct bnxt_ulp_context *ulp_ctx, uint32_t *tbl_scope_id); +/* Function to set the tfp session details in the ulp context. */ +int32_t +bnxt_ulp_cntxt_shared_tfp_set (struct bnxt_ulp_context *ulp,struct tf *tfp); + +/* Function to get the tfp session details from ulp context. */ +struct tf * +bnxt_ulp_cntxt_shared_tfp_get (struct bnxt_ulp_context *ulp); +/* Function to set the tfp session details in the ulp context. */ int32_t bnxt_ulp_cntxt_tfp_set (struct bnxt_ulp_context *ulp,struct tf *tfp);
@@ -233,4 +250,26 @@ bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context *ulp_ctx);int32_t ulp_post_process_tun_flow (struct ulp_rte_parser_params *params); +struct bnxt_ulp_glb_resource_info * +bnxt_ulp_app_glb_resource_info_list_get (uint32_t *num_entries); + +int32_t +bnxt_ulp_cntxt_app_id_set (struct bnxt_ulp_context *ulp_ctx,uint8_t app_id); + +int32_t +bnxt_ulp_cntxt_app_id_get (struct bnxt_ulp_context *ulp_ctx,uint8_t *app_id); + +bool +bnxt_ulp_cntxt_shared_session_enabled (struct bnxt_ulp_context *ulp_ctx); + +struct bnxt_ulp_app_capabilities_info * +bnxt_ulp_app_cap_list_get (uint32_t *num_entries); + +int32_t +bnxt_ulp_cntxt_app_caps_init (struct bnxt_ulp_context *ulp_ctx, +uint8_t app_id,uint32_t dev_id); + +struct bnxt_ulp_resource_resv_info * +bnxt_ulp_resource_resv_list_get (uint32_t *num_entries); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_mapper.c +169 -17
310 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +1 -0
@@ -22,6 +22,7 @@ struct bnxt_ulp_mapper_glb_resource_entry {enum bnxt_ulp_resource_func resource_func;uint32_t resource_type;/* TF_ enum type */ uint64_t resource_hndl; +bool shared; };struct bnxt_ulp_mapper_data {
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +10 -3
@@ -26,8 +26,10 @@#define BNXT_ULP_ACT_HID_SHFTR 27#define BNXT_ULP_ACT_HID_SHFTL 26#define BNXT_ULP_ACT_HID_MASK 2047 -#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 11 -#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 10 +#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33 +#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 27 +#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 219 +#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 2#define BNXT_ULP_COND_GOTO_REJECT 1023#define BNXT_ULP_COND_GOTO_RF 0x10000#define BNXT_ULP_GLB_FIELD_TBL_SHIFT 7
@@ -348,7 +350,8 @@ enum bnxt_ulp_glb_rf_idx {BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0 =9 ,BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0 =10 ,BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 =11 , -BNXT_ULP_GLB_RF_IDX_LAST =12 +BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1 =12 , +BNXT_ULP_GLB_RF_IDX_LAST =13 }; enum bnxt_ulp_hdr_type {
@@ -476,6 +479,10 @@ enum bnxt_ulp_template_type {BNXT_ULP_TEMPLATE_TYPE_LAST =2 }; +enum bnxt_ulp_app_cap { +BNXT_ULP_APP_CAP_SHARED_EN =0x00000001 +}; +enum bnxt_ulp_fdb_resource_flags {BNXT_ULP_FDB_RESOURCE_FLAGS_DIR_INGR =0x00 ,BNXT_ULP_FDB_RESOURCE_FLAGS_DIR_EGR =0x01
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +2177 -0
1,765 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +33 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 49/58 net/bnxt: add field opcodes in ULP
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
Add field opcodes that perform logical evaluation of multiple conditions.
--- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 806 +- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 73 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 622 +- .../bnxt/tf_ulp/ulp_template_db_thor_act.c | 196 - .../bnxt/tf_ulp/ulp_template_db_thor_class.c | 6009 ++------------- .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 1734 ++--- .../tf_ulp/ulp_template_db_wh_plus_class.c | 6487 +++++++---------- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 5 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 6 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 2 +- 10 files changed, 4514 insertions(+), 11426 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_mapper.c +404 -402
@@ -20,11 +20,18 @@#include "ulp_template_db_tbl.h" #include "ulp_port_db.h" +static uint8_t mapper_fld_zeros[16 ] = {0 }; +static uint8_t mapper_fld_ones[16 ] = {0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF }; +static uint8_t mapper_fld_one[16 ] = { +0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 , +0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 +}; +static const char *ulp_mapper_tmpl_name_str (enum bnxt_ulp_template_type tmpl_type) {
@@ -882,7 +889,6 @@ ulp_mapper_ident_extract(struct bnxt_ulp_mapper_parms *parms,static int32_t ulp_mapper_field_port_db_process (struct bnxt_ulp_mapper_parms *parms, -struct bnxt_ulp_mapper_field_info *fld,uint32_t port_id,uint16_t val16,uint8_t **val)
@@ -912,332 +918,122 @@ ulp_mapper_field_port_db_process(struct bnxt_ulp_mapper_parms *parms, }break ;default : -BNXT_TF_DBG (ERR ,"Invalid port_data %s\n" , fld->description); -return -EINVAL ; - } -return 0 ; -} - -static int32_t -ulp_mapper_field_process_inc_dec (struct bnxt_ulp_mapper_field_info *fld, -struct ulp_blob *blob, -uint64_t *val64, -uint16_t const_val16, -uint32_t bitlen, -uint32_t *update_flag) -{ -uint64_t l_val64 = *val64; - -if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST || - fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST_POST ) { - l_val64 += const_val16; - l_val64 =tfp_be_to_cpu_64 (l_val64); -ulp_blob_push_64 (blob, &l_val64, bitlen); - }else if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST || - fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST_POST ) { - l_val64 -= const_val16; - l_val64 =tfp_be_to_cpu_64 (l_val64); -ulp_blob_push_64 (blob, &l_val64, bitlen); - }else { -BNXT_TF_DBG (ERR ,"Invalid field opcode %u\n" , fld->field_opc); +BNXT_TF_DBG (ERR ,"Invalid port_data %d\n" , port_data);return -EINVAL ; } - -if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_MINUS_CONST_POST || - fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_PLUS_CONST_POST ) { - *val64 = l_val64; - *update_flag =1 ; - }return 0 ; }static int32_t -ulp_mapper_field_process (struct bnxt_ulp_mapper_parms *parms, -enum tf_dir dir, -struct bnxt_ulp_mapper_field_info *fld, -struct ulp_blob *blob, -uint8_t is_key, -const char *name) +ulp_mapper_field_src_process (struct bnxt_ulp_mapper_parms *parms, +enum bnxt_ulp_field_src field_src, +uint8_t *field_opr, +enum tf_dir dir, +uint8_t is_key, +uint32_t bitlen, +uint8_t **val, +uint32_t *val_len, +uint64_t *value) { -uint32_t val_size =0 , field_size =0 ; -uint64_t hdr_bit, act_bit, regval; -uint16_t write_idx = blob->write_idx; -uint16_t idx, size_idx, bitlen, offset; -uint8_t *val =NULL ; -uint8_t tmpval[16 ]; +struct bnxt_ulp_mapper_data *m;uint8_t bit; -uint32_t src1_sel =0 ; -enum bnxt_ulp_field_src fld_src; -uint8_t *fld_src_oper; -enum bnxt_ulp_field_cond_src field_cond_src; -uint16_t const_val =0 ; -uint32_t update_flag =0 ; -uint64_t src1_val64; -uint32_t port_id; +uint32_t port_id, val_size, field_size; +uint16_t idx, size_idx, offset; +uint32_t bytelen =ULP_BITS_2_BYTE (bitlen); +uint8_t *buffer; +uint64_t lregval;bool shared; -/* process the field opcode */ -if (fld->field_opc !=BNXT_ULP_FIELD_OPC_COND_OP ) { - field_cond_src =BNXT_ULP_FIELD_COND_SRC_TRUE ; -/* Read the constant from the second operand */ -memcpy (&const_val, fld->field_opr2,sizeof (uint16_t )); - const_val =tfp_be_to_cpu_16 (const_val); - }else { - field_cond_src = fld->field_cond_src; - } - - bitlen = fld->field_bit_size; -/* Evaluate the condition */ -switch (field_cond_src) { -case BNXT_ULP_FIELD_COND_SRC_TRUE : - src1_sel =1 ; -break ; -case BNXT_ULP_FIELD_COND_SRC_CF : -if (!ulp_operand_read (fld->field_cond_opr, - (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed.\n" , name); -return -EINVAL ; - } - idx =tfp_be_to_cpu_16 (idx); -if (idx >=BNXT_ULP_CF_IDX_LAST ) { -BNXT_TF_DBG (ERR ,"%s invalid index %u\n" , name, idx); -return -EINVAL ; - } -/* check if the computed field is set */ -if (ULP_COMP_FLD_IDX_RD (parms, idx)) - src1_sel =1 ; -break ; -case BNXT_ULP_FIELD_COND_SRC_RF : -if (!ulp_operand_read (fld->field_cond_opr, - (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); -return -EINVAL ; - } - - idx =tfp_be_to_cpu_16 (idx); -/* Uninitialized regfile entries return 0 */ -if (!ulp_regfile_read (parms->regfile, idx, ®val)) { -BNXT_TF_DBG (ERR ,"%s regfile[%d] read oob\n" , - name, idx); -return -EINVAL ; - } -if (regval) - src1_sel =1 ; -break ; -case BNXT_ULP_FIELD_COND_SRC_ACT_BIT : -if (!ulp_operand_read (fld->field_cond_opr, - (uint8_t *)&act_bit,sizeof (uint64_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); -return -EINVAL ; - } - act_bit =tfp_be_to_cpu_64 (act_bit); -if (ULP_BITMAP_ISSET (parms->act_bitmap->bits, act_bit)) - src1_sel =1 ; -break ; -case BNXT_ULP_FIELD_COND_SRC_HDR_BIT : -if (!ulp_operand_read (fld->field_cond_opr, - (uint8_t *)&hdr_bit,sizeof (uint64_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); -return -EINVAL ; - } - hdr_bit =tfp_be_to_cpu_64 (hdr_bit); -if (ULP_BITMAP_ISSET (parms->hdr_bitmap->bits, hdr_bit)) - src1_sel =1 ; -break ; -case BNXT_ULP_FIELD_COND_SRC_FIELD_BIT : -if (!ulp_operand_read (fld->field_cond_opr, (uint8_t *)&idx, -sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed.\n" , name); -return -EINVAL ; - } - idx =tfp_be_to_cpu_16 (idx); -/* get the index from the global field list */ -if (ulp_mapper_glb_field_tbl_get (parms, idx, &bit)) { -BNXT_TF_DBG (ERR ,"invalid ulp_glb_field_tbl idx %d\n" , - idx); -return -EINVAL ; - } -if (bit && (ULP_INDEX_BITMAP_GET (parms->fld_bitmap->bits, bit))) - src1_sel =1 ; -break ; -default : -BNXT_TF_DBG (ERR ,"%s invalid field opcode 0x%x at %d\n" , - name, fld->field_cond_src, write_idx); -return -EINVAL ; - } - -/* pick the selected source */ -if (src1_sel) { - fld_src = fld->field_src1; - fld_src_oper = fld->field_opr1; - }else { - fld_src = fld->field_src2; - fld_src_oper = fld->field_opr2; - } - + *val_len = bitlen; + *value =0 ;/* Perform the action */ -switch (fld_src) { +switch (field_src) {case BNXT_ULP_FIELD_SRC_ZERO : -if (ulp_blob_pad_push (blob, bitlen) <0 ) { -BNXT_TF_DBG (ERR ,"%s too large for blob\n" , name); -return -EINVAL ; - } + *val = mapper_fld_zeros;break ;case BNXT_ULP_FIELD_SRC_CONST : - val = fld_src_oper; -if (!ulp_blob_push (blob, val, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; - } + *val = field_opr;break ;case BNXT_ULP_FIELD_SRC_ONES : - val = mapper_fld_ones; -if (!ulp_blob_push (blob, val, bitlen)) { -BNXT_TF_DBG (ERR ,"%s too large for blob\n" , name); -return -EINVAL ; - } + *val = mapper_fld_ones; + *value =1 ;break ;case BNXT_ULP_FIELD_SRC_CF : -if (!ulp_operand_read (fld_src_oper, +if (!ulp_operand_read (field_opr, (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed.\n" , - name); +BNXT_TF_DBG (ERR ,"CF operand read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx); -if (idx >=BNXT_ULP_CF_IDX_LAST ) { -BNXT_TF_DBG (ERR ,"%s comp field [%d] read oob\n" , - name, idx); +if (idx >=BNXT_ULP_CF_IDX_LAST || bytelen >sizeof (uint32_t )) { +BNXT_TF_DBG (ERR ,"comp field [%d] read oob %d\n" , idx, + bytelen);return -EINVAL ; } -if (fld->field_opc ==BNXT_ULP_FIELD_OPC_COND_OP ) { - val =ulp_blob_push_32 (blob, &parms->comp_fld[idx], - bitlen); -if (!val) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , - name); -return -EINVAL ; - } - }else if (fld->field_opc ==BNXT_ULP_FIELD_OPC_PORT_TABLE ) { - port_id =ULP_COMP_FLD_IDX_RD (parms, idx); -if (ulp_mapper_field_port_db_process (parms, fld, - port_id, const_val, - &val)) { -BNXT_TF_DBG (ERR ,"%s field port table failed\n" , - name); -return -EINVAL ; - } -if (!ulp_blob_push (blob, val, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , - name); -return -EINVAL ; - } - }else { - src1_val64 =ULP_COMP_FLD_IDX_RD (parms, idx); -if (ulp_mapper_field_process_inc_dec (fld, blob, - &src1_val64, - const_val, - bitlen, - &update_flag)) { -BNXT_TF_DBG (ERR ,"%s field cond opc failed\n" , - name); -return -EINVAL ; - } -if (update_flag) { -BNXT_TF_DBG (ERR ,"%s invalid field cond opc\n" , - name); -return -EINVAL ; - } - } + buffer = (uint8_t *)&parms->comp_fld[idx]; + *val = &buffer[sizeof (uint32_t ) - bytelen]; + *value =ULP_COMP_FLD_IDX_RD (parms, idx);break ;case BNXT_ULP_FIELD_SRC_RF : -if (!ulp_operand_read (fld_src_oper, +if (!ulp_operand_read (field_opr, (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +BNXT_TF_DBG (ERR ,"RF operand read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx);/* Uninitialized regfile entries return 0 */ -if (!ulp_regfile_read (parms->regfile, idx, ®val)) { -BNXT_TF_DBG (ERR ,"%s regfile[%d] read oob\n" , - name, idx); +if (!ulp_regfile_read (parms->regfile, idx, &lregval) || +sizeof (uint64_t ) < bytelen) { +BNXT_TF_DBG (ERR ,"regfile[%d] read oob %u\n" , idx, + bytelen);return -EINVAL ; } -if (fld->field_opc ==BNXT_ULP_FIELD_OPC_COND_OP ) { - val =ulp_blob_push_64 (blob, ®val, bitlen); -if (!val) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , - name); -return -EINVAL ; - } - }else { -if (ulp_mapper_field_process_inc_dec (fld, blob, - ®val, - const_val, - bitlen, - &update_flag)) { -BNXT_TF_DBG (ERR ,"%s field cond opc failed\n" , - name); -return -EINVAL ; - } -if (update_flag) { - regval =tfp_cpu_to_be_64 (regval); -if (ulp_regfile_write (parms->regfile, idx, - regval)) { -BNXT_TF_DBG (ERR , -"Write regfile[%d] fail\n" , - idx); -return -EINVAL ; - } - } - } + buffer = (uint8_t *)&parms->regfile->entry[idx].data; + *val = &buffer[sizeof (uint64_t ) - bytelen]; + *value =tfp_be_to_cpu_64 (lregval);break ;case BNXT_ULP_FIELD_SRC_ACT_PROP : -if (!ulp_operand_read (fld_src_oper, +if (!ulp_operand_read (field_opr, (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +BNXT_TF_DBG (ERR ,"Action operand read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx); -if (idx >=BNXT_ULP_ACT_PROP_IDX_LAST ) { -BNXT_TF_DBG (ERR ,"%s act_prop[%d] oob\n" , name, idx); +BNXT_TF_DBG (ERR ,"act_prop[%d] oob\n" , idx);return -EINVAL ; } - val = &parms->act_prop->act_details[idx]; + buffer = &parms->act_prop->act_details[idx]; field_size =ulp_mapper_act_prop_size_get (idx); -if (bitlen <ULP_BYTE_2_BITS (field_size)) { - field_size = field_size - ((bitlen +7 ) /8 ); - val += field_size; - } -if (!ulp_blob_push (blob, val, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); +if (bytelen > field_size) { +BNXT_TF_DBG (ERR ,"act_prop[%d] field size small %u\n" , + idx, field_size);return -EINVAL ; } + *val = &buffer[field_size - bytelen];break ;case BNXT_ULP_FIELD_SRC_ACT_PROP_SZ : -if (!ulp_operand_read (fld_src_oper, +if (!ulp_operand_read (field_opr, (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +BNXT_TF_DBG (ERR ,"Action sz operand read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx);if (idx >=BNXT_ULP_ACT_PROP_IDX_LAST ) { -BNXT_TF_DBG (ERR ,"%s act_prop[%d] oob\n" , name, idx); +BNXT_TF_DBG (ERR ,"act_prop_sz[%d] oob\n" , idx);return -EINVAL ; } - val = &parms->act_prop->act_details[idx]; + *val = &parms->act_prop->act_details[idx];/* get the size index next */ -if (!ulp_operand_read (&fld_src_oper[sizeof (uint16_t )], +if (!ulp_operand_read (&field_opr[sizeof (uint16_t )], (uint8_t *)&size_idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +BNXT_TF_DBG (ERR ,"Action sz operand read failed\n" );return -EINVAL ; } size_idx =tfp_be_to_cpu_16 (size_idx); -if (size_idx >=BNXT_ULP_ACT_PROP_IDX_LAST ) {BNXT_TF_DBG (ERR ,"act_prop[%d] oob\n" , size_idx);return -EINVAL ;
@@ -1245,51 +1041,32 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,memcpy (&val_size, &parms->act_prop->act_details[size_idx],sizeof (uint32_t )); val_size =tfp_be_to_cpu_32 (val_size); - val_size =ULP_BYTE_2_BITS (val_size); -ulp_blob_push_encap (blob, val, val_size); + *val_len =ULP_BYTE_2_BITS (val_size);break ;case BNXT_ULP_FIELD_SRC_GLB_RF : -if (!ulp_operand_read (fld_src_oper, - (uint8_t *)&idx, -sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed.\n" , name); +if (!ulp_operand_read (field_opr, + (uint8_t *)&idx,sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"Global regfile read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx); -if (ulp_mapper_glb_resource_read (parms->mapper_data, dir, - idx, ®val, &shared)) { -BNXT_TF_DBG (ERR ,"%s global regfile[%d] read failed.\n" , - name, idx); +if (ulp_mapper_glb_resource_read (parms->mapper_data, + dir, idx, &lregval, &shared) || +sizeof (uint64_t ) < bytelen) { +BNXT_TF_DBG (ERR ,"Global regfile[%d] read failed %u\n" , + idx, bytelen);return -EINVAL ; } -if (fld->field_opc ==BNXT_ULP_FIELD_OPC_COND_OP ) { - val =ulp_blob_push_64 (blob, ®val, bitlen); -if (!val) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , - name); -return -EINVAL ; - } - }else { -if (ulp_mapper_field_process_inc_dec (fld, blob, - ®val, - const_val, - bitlen, - &update_flag)) { -BNXT_TF_DBG (ERR ,"%s field cond opc failed\n" , - name); -return -EINVAL ; - } -if (update_flag) { -BNXT_TF_DBG (ERR ,"%s invalid field cond opc\n" , - name); -return -EINVAL ; - } - } + m = parms->mapper_data; + buffer = (uint8_t *)&m->glb_res_tbl[dir][idx].resource_hndl; + *val = &buffer[sizeof (uint64_t ) - bytelen]; + *value =tfp_be_to_cpu_64 (lregval);break ;case BNXT_ULP_FIELD_SRC_HF : -if (!ulp_operand_read (fld_src_oper, (uint8_t *)&idx, -sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed.\n" , name); +case BNXT_ULP_FIELD_SRC_SUB_HF : +if (!ulp_operand_read (field_opr, + (uint8_t *)&idx,sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"Header field read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx);
@@ -1300,69 +1077,67 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,return -EINVAL ; }if (is_key) - val = parms->hdr_field[bit].spec; + buffer = parms->hdr_field[bit].spec;else - val = parms->hdr_field[bit].mask; + buffer = parms->hdr_field[bit].mask; -/* -* Need to account for how much data was pushed to the header -* field vs how much is to be inserted in the key/mask. -*/ field_size = parms->hdr_field[bit].size; -if (bitlen <ULP_BYTE_2_BITS (field_size)) { - field_size = field_size - ((bitlen +7 ) /8 ); - val += field_size; - } - -if (!ulp_blob_push (blob, val, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); +if (bytelen > field_size) { +BNXT_TF_DBG (ERR ,"Hdr field[%d] size small %u\n" , + bit, field_size);return -EINVAL ; } +if (field_src ==BNXT_ULP_FIELD_SRC_HF ) { + *val = &buffer[field_size - bytelen]; + }else { +/* get the offset next */ +if (!ulp_operand_read (&field_opr[sizeof (uint16_t )], + (uint8_t *)&offset, +sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"Hdr fld size read failed\n" ); +return -EINVAL ; + } + offset =tfp_be_to_cpu_16 (offset); + offset =ULP_BITS_2_BYTE_NR (offset); +if ((offset + bytelen) > field_size) { +BNXT_TF_DBG (ERR ,"Hdr field[%d] oob\n" , bit); +return -EINVAL ; + } + *val = &buffer[offset]; + }break ;case BNXT_ULP_FIELD_SRC_HDR_BIT : -if (!ulp_operand_read (fld_src_oper, - (uint8_t *)&hdr_bit,sizeof (uint64_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); -return -EINVAL ; - } - hdr_bit =tfp_be_to_cpu_64 (hdr_bit); -memset (tmpval,0 ,sizeof (tmpval)); -if (ULP_BITMAP_ISSET (parms->hdr_bitmap->bits, hdr_bit)) - tmpval[0 ] =1 ; -if (bitlen >ULP_BYTE_2_BITS (sizeof (tmpval))) { -BNXT_TF_DBG (ERR ,"%s field size is incorrect\n" , name); +if (!ulp_operand_read (field_opr, + (uint8_t *)&lregval,sizeof (uint64_t ))) { +BNXT_TF_DBG (ERR ,"Header bit read failed\n" );return -EINVAL ; } -if (!ulp_blob_push (blob, tmpval, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; + lregval =tfp_be_to_cpu_64 (lregval); +if (ULP_BITMAP_ISSET (parms->hdr_bitmap->bits, lregval)) { + *val = mapper_fld_one; + *value =1 ; + }else { + *val = mapper_fld_zeros; } - val = tmpval;break ;case BNXT_ULP_FIELD_SRC_ACT_BIT : -if (!ulp_operand_read (fld_src_oper, - (uint8_t *)&act_bit,sizeof (uint64_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); -return -EINVAL ; - } - act_bit =tfp_be_to_cpu_64 (act_bit); -memset (tmpval,0 ,sizeof (tmpval)); -if (ULP_BITMAP_ISSET (parms->act_bitmap->bits, act_bit)) - tmpval[0 ] =1 ; -if (bitlen >ULP_BYTE_2_BITS (sizeof (tmpval))) { -BNXT_TF_DBG (ERR ,"%s field size is incorrect\n" , name); +if (!ulp_operand_read (field_opr, + (uint8_t *)&lregval,sizeof (uint64_t ))) { +BNXT_TF_DBG (ERR ,"Action bit read failed\n" );return -EINVAL ; } -if (!ulp_blob_push (blob, tmpval, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; + lregval =tfp_be_to_cpu_64 (lregval); +if (ULP_BITMAP_ISSET (parms->act_bitmap->bits, lregval)) { + *val = mapper_fld_one; + *value =1 ; + }else { + *val = mapper_fld_zeros; } - val = tmpval;break ;case BNXT_ULP_FIELD_SRC_FIELD_BIT : -if (!ulp_operand_read (fld_src_oper, (uint8_t *)&idx, -sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed.\n" , name); +if (!ulp_operand_read (field_opr, + (uint8_t *)&idx,sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"Field bit read failed\n" );return -EINVAL ; } idx =tfp_be_to_cpu_16 (idx);
@@ -1372,70 +1147,294 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms, idx);return -EINVAL ; } -memset (tmpval,0 ,sizeof (tmpval)); -if (ULP_INDEX_BITMAP_GET (parms->fld_bitmap->bits, bit)) - tmpval[0 ] =1 ; -if (bitlen >ULP_BYTE_2_BITS (sizeof (tmpval))) { -BNXT_TF_DBG (ERR ,"%s field size is incorrect\n" , name); +if (ULP_INDEX_BITMAP_GET (parms->fld_bitmap->bits, bit)) { + *val = mapper_fld_one; + *value =1 ; + }else { + *val = mapper_fld_zeros; + } +break ; +case BNXT_ULP_FIELD_SRC_PORT_TABLE : +/* The port id is present in the comp field list */ + port_id =ULP_COMP_FLD_IDX_RD (parms, +BNXT_ULP_CF_IDX_DEV_PORT_ID ); +/* get the port table enum */ +if (!ulp_operand_read (field_opr, + (uint8_t *)&idx,sizeof (uint16_t ))) { +BNXT_TF_DBG (ERR ,"Port table enum read failed\n" );return -EINVAL ; } -if (!ulp_blob_push (blob, tmpval, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); + idx =tfp_be_to_cpu_16 (idx); +if (ulp_mapper_field_port_db_process (parms, port_id, idx, + val)) { +BNXT_TF_DBG (ERR ,"field port table failed\n" );return -EINVAL ; } - val = tmpval; -break ;case BNXT_ULP_FIELD_SRC_SKIP :/* do nothing */ break ;case BNXT_ULP_FIELD_SRC_REJECT :return -EINVAL ; -case BNXT_ULP_FIELD_SRC_SUB_HF : -if (!ulp_operand_read (fld_src_oper, - (uint8_t *)&idx,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); +default : +BNXT_TF_DBG (ERR ,"invalid field opcode 0x%x\n" , field_src); +return -EINVAL ; + } +return 0 ; +} + +static int32_t ulp_mapper_field_buffer_eval (uint8_t *buffer,uint32_t bitlen, +uint64_t *output) +{ +uint16_t val_16; +uint32_t val_32; +uint64_t val_64; +uint32_t bytelen; + + bytelen =ULP_BITS_2_BYTE (bitlen); +if (bytelen ==sizeof (uint8_t )) { + *output = *((uint8_t *)buffer); + }else if (bytelen ==sizeof (uint16_t )) { + val_16 = *((uint16_t *)buffer); + *output =tfp_be_to_cpu_16 (val_16); + }else if (bytelen ==sizeof (uint32_t )) { + val_32 = *((uint32_t *)buffer); + *output =tfp_be_to_cpu_32 (val_32); + }else if (bytelen ==sizeof (val_64)) { + val_64 = *((uint64_t *)buffer); + *output =tfp_be_to_cpu_64 (val_64); + }else { + *output =0 ; +return -EINVAL ; + } +return 0 ; +} + +static int32_t ulp_mapper_field_blob_write (enum bnxt_ulp_field_src fld_src, +struct ulp_blob *blob, +uint8_t *val, +uint32_t val_len, +uint8_t **out_val) +{ +if (fld_src ==BNXT_ULP_FIELD_SRC_ZERO ) { +if (ulp_blob_pad_push (blob, val_len) <0 ) { +BNXT_TF_DBG (ERR ,"too large for blob\n" );return -EINVAL ; } - idx =tfp_be_to_cpu_16 (idx); -/* get the index from the global field list */ -if (ulp_mapper_glb_field_tbl_get (parms, idx, &bit)) { -BNXT_TF_DBG (ERR ,"invalid ulp_glb_field_tbl idx %d\n" , - idx); + }else if (fld_src ==BNXT_ULP_FIELD_SRC_ACT_PROP_SZ ) { +if (ulp_blob_push_encap (blob, val, val_len) <0 ) { +BNXT_TF_DBG (ERR ,"encap blob push failed\n" );return -EINVAL ; } - -/* get the offset next */ -if (!ulp_operand_read (&fld_src_oper[sizeof (uint16_t )], - (uint8_t *)&offset,sizeof (uint16_t ))) { -BNXT_TF_DBG (ERR ,"%s operand read failed\n" , name); + }else { +if (!ulp_blob_push (blob, val, val_len)) { +BNXT_TF_DBG (ERR ,"push of val1 failed\n" );return -EINVAL ; } - offset =tfp_be_to_cpu_16 (offset); -if ((offset + bitlen) > -ULP_BYTE_2_BITS (parms->hdr_field[bit].size) || -ULP_BITS_IS_BYTE_NOT_ALIGNED (offset)) { -BNXT_TF_DBG (ERR ,"Hdr field[%s] oob\n" , name); -return -EINVAL ; + } + *out_val = val; +return 0 ; +} + +static int32_t +ulp_mapper_field_opc_process (struct bnxt_ulp_mapper_parms *parms, +enum tf_dir dir, +struct bnxt_ulp_mapper_field_info *fld, +struct ulp_blob *blob, +uint8_t is_key, +const char *name) +{ +uint16_t write_idx = blob->write_idx; +uint8_t *val =NULL , *val1, *val2, *val3; +uint32_t val_len =0 , val1_len =0 , val2_len =0 , val3_len =0 ; +uint8_t process_src1 =0 , process_src2 =0 , process_src3 =0 ; +uint8_t eval_src1 =0 , eval_src2 =0 , eval_src3 =0 ; +uint64_t val_int =0 , val1_int =0 , val2_int =0 , val3_int =0 ; +uint64_t value1 =0 , value2 =0 , value3 =0 ; +int32_t rc =0 ; + +/* prepare the field source and values */ +switch (fld->field_opc) { +case BNXT_ULP_FIELD_OPC_SRC1 : + process_src1 =1 ; +break ; +case BNXT_ULP_FIELD_OPC_SRC1_THEN_SRC2_ELSE_SRC3 : + process_src1 =1 ; +break ; +case BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2_OR_SRC3 : +case BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2_OR_SRC3 : + process_src3 =1 ; + eval_src3 =1 ; + process_src1 =1 ; + process_src2 =1 ; + eval_src1 =1 ; + eval_src2 =1 ; +break ; +case BNXT_ULP_FIELD_OPC_SRC1_PLUS_SRC2 : +case BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2 : +case BNXT_ULP_FIELD_OPC_SRC1_PLUS_SRC2_POST : +case BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2_POST : +case BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2 : +case BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2 : + process_src1 =1 ; + process_src2 =1 ; + eval_src1 =1 ; + eval_src2 =1 ; +break ; +default : +break ; + } + +/* process the src1 opcode */ +if (process_src1) { +if (ulp_mapper_field_src_process (parms, fld->field_src1, + fld->field_opr1, dir, is_key, + fld->field_bit_size, &val1, + &val1_len, &value1)) { +BNXT_TF_DBG (ERR ,"fld src1 process failed\n" ); + goto error; + } +if (eval_src1) { +if (ulp_mapper_field_buffer_eval (val1, val1_len, + &val1_int)) { +BNXT_TF_DBG (ERR ,"fld src1 eval failed\n" ); + goto error; + } } - offset =ULP_BITS_2_BYTE_NR (offset); + } -/* write the value into blob */ -if (is_key) - val = &parms->hdr_field[bit].spec[offset]; +/* for "if then clause" set the correct process */ +if (fld->field_opc ==BNXT_ULP_FIELD_OPC_SRC1_THEN_SRC2_ELSE_SRC3 ) { +if (value1) + process_src2 =1 ;else - val = &parms->hdr_field[bit].mask[offset]; + process_src3 =1 ; + } -if (!ulp_blob_push (blob, val, bitlen)) { -BNXT_TF_DBG (ERR ,"%s push to blob failed\n" , name); -return -EINVAL ; +/* process src2 opcode */ +if (process_src2) { +if (ulp_mapper_field_src_process (parms, fld->field_src2, + fld->field_opr2, dir, is_key, + fld->field_bit_size, &val2, + &val2_len, &value2)) { +BNXT_TF_DBG (ERR ,"fld src2 process failed\n" ); + goto error; + } +if (eval_src2) { +if (ulp_mapper_field_buffer_eval (val2, val2_len, + &val2_int)) { +BNXT_TF_DBG (ERR ,"fld src2 eval failed\n" ); + goto error; + } + } + } + +/* process src3 opcode */ +if (process_src3) { +if (ulp_mapper_field_src_process (parms, fld->field_src3, + fld->field_opr3, dir, is_key, + fld->field_bit_size, &val3, + &val3_len, &value3)) { +BNXT_TF_DBG (ERR ,"fld src3 process failed\n" ); + goto error; + } +if (eval_src3) { +if (ulp_mapper_field_buffer_eval (val3, val3_len, + &val3_int)) { +BNXT_TF_DBG (ERR ,"fld src3 eval failed\n" ); + goto error; + } + } + } + + val_len = fld->field_bit_size; +/* process the field opcodes */ +switch (fld->field_opc) { +case BNXT_ULP_FIELD_OPC_SRC1 : +if (ulp_mapper_field_blob_write (fld->field_src1, + blob, val1, val1_len, &val)) + goto error; + val_len = val1_len; +break ; +case BNXT_ULP_FIELD_OPC_SRC1_THEN_SRC2_ELSE_SRC3 : +if (value1) { +if (ulp_mapper_field_blob_write (fld->field_src2, blob, + val2, val2_len, &val)) + goto error; + val_len = val2_len; + }else { +if (ulp_mapper_field_blob_write (fld->field_src3, blob, + val3, val3_len, &val)) + goto error; + val_len = val3_len; }break ; +case BNXT_ULP_FIELD_OPC_SRC1_PLUS_SRC2 : +case BNXT_ULP_FIELD_OPC_SRC1_PLUS_SRC2_POST : + val_int = val1_int + val2_int; + val_int =tfp_cpu_to_be_64 (val_int); + val =ulp_blob_push_64 (blob, &val_int, fld->field_bit_size); +if (!val) { +BNXT_TF_DBG (ERR ,"push to blob failed\n" ); + goto error; + } +break ; +case BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2 : +case BNXT_ULP_FIELD_OPC_SRC1_MINUS_SRC2_POST : + val_int = val1_int - val2_int; + val_int =tfp_cpu_to_be_64 (val_int); + val =ulp_blob_push_64 (blob, &val_int, fld->field_bit_size); +if (!val) { +BNXT_TF_DBG (ERR ,"push to blob failed\n" ); + goto error; + } +break ; +case BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2 : + val_int = val1_int | val2_int; + val_int =tfp_cpu_to_be_64 (val_int); + val =ulp_blob_push_64 (blob, &val_int, fld->field_bit_size); +if (!val) { +BNXT_TF_DBG (ERR ,"push to blob failed\n" ); + goto error; + } +break ; +case BNXT_ULP_FIELD_OPC_SRC1_OR_SRC2_OR_SRC3 : + val_int = val1_int | val2_int | val3_int; + val_int =tfp_cpu_to_be_64 (val_int); + val =ulp_blob_push_64 (blob, &val_int, fld->field_bit_size); +if (!val) { +BNXT_TF_DBG (ERR ,"push to blob failed\n" ); + goto error; + } +break ; +case BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2 : + val_int = val1_int & val2_int; + val_int =tfp_cpu_to_be_64 (val_int); + val =ulp_blob_push_64 (blob, &val_int, fld->field_bit_size); +if (!val) { +BNXT_TF_DBG (ERR ,"push to blob failed\n" ); + goto error; + } +break ; +case BNXT_ULP_FIELD_OPC_SRC1_AND_SRC2_OR_SRC3 : + val_int = val1_int & (val2_int | val3_int); + val_int =tfp_cpu_to_be_64 (val_int); + val =ulp_blob_push_64 (blob, &val_int, fld->field_bit_size); +if (!val) { +BNXT_TF_DBG (ERR ,"push to blob failed\n" ); + goto error; + } +break ; +case BNXT_ULP_FIELD_OPC_SKIP : +break ;default : -BNXT_TF_DBG (ERR ,"%s invalid field opcode 0x%x at %d\n" , - name, fld_src, write_idx); -return -EINVAL ; +break ; } -return 0 ; + +return rc; +error: +BNXT_TF_DBG (ERR ,"Error in %s:%s process %u:%u\n" , name, + fld->description, (val) ? write_idx :0 , val_len); +return -EINVAL ; }/*
@@ -1474,8 +1473,8 @@ ulp_mapper_tbl_result_build(struct bnxt_ulp_mapper_parms *parms,ulp_blob_encap_swap_idx_set (data);/* Process the result fields */ - rc =ulp_mapper_field_process (parms, tbl->direction, - &dflds[i], data,0 , name); + rc =ulp_mapper_field_opc_process (parms, tbl->direction, + &dflds[i], data,0 , name);if (rc) {BNXT_TF_DBG (ERR ,"data field failed\n" );return rc;
@@ -1877,9 +1876,9 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,*/ for (i =0 ; i < num_kflds; i++) {/* Setup the key */ - rc =ulp_mapper_field_process (parms, tbl->direction, - &kflds[i].field_info_spec, - key,1 ,"TCAM Key" ); + rc =ulp_mapper_field_opc_process (parms, tbl->direction, + &kflds[i].field_info_spec, + key,1 ,"TCAM Key" );if (rc) {BNXT_TF_DBG (ERR ,"Key field set failed %s\n" , kflds[i].field_info_spec.description);
@@ -1887,9 +1886,9 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms, }/* Setup the mask */ - rc =ulp_mapper_field_process (parms, tbl->direction, - &kflds[i].field_info_mask, - mask,0 ,"TCAM Mask" ); + rc =ulp_mapper_field_opc_process (parms, tbl->direction, + &kflds[i].field_info_mask, + mask,0 ,"TCAM Mask" );if (rc) {BNXT_TF_DBG (ERR ,"Mask field set failed %s\n" , kflds[i].field_info_mask.description);
@@ -2077,9 +2076,9 @@ ulp_mapper_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,/* create the key */ for (i =0 ; i < num_kflds; i++) {/* Setup the key */ - rc =ulp_mapper_field_process (parms, tbl->direction, - &kflds[i].field_info_spec, - &key,1 ,"EM Key" ); + rc =ulp_mapper_field_opc_process (parms, tbl->direction, + &kflds[i].field_info_spec, + &key,1 ,"EM Key" );if (rc) {BNXT_TF_DBG (ERR ,"Key field set failed.\n" );return rc;
@@ -2645,9 +2644,9 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms, }for (i =0 ; i < num_kflds; i++) {/* Setup the key */ - rc =ulp_mapper_field_process (parms, tbl->direction, - &kflds[i].field_info_spec, - &key,1 ,"Gen Tbl Key" ); + rc =ulp_mapper_field_opc_process (parms, tbl->direction, + &kflds[i].field_info_spec, + &key,1 ,"Gen Tbl Key" );if (rc) { BNXT_TF_DBG(ERR, "Failed to create key for Gen tbl rc=%d\n",
@@ -3159,6 +3158,9 @@ ulp_mapper_cc_upd_opr_compute(struct bnxt_ulp_mapper_parms *parms, } *result =tfp_be_to_cpu_64 (regval);break ; +case BNXT_ULP_CC_UPD_SRC_CONST : + *result = cc_opr; +break ;default :BNXT_TF_DBG (ERR ,"invalid src code %u\n" , cc_src);return -EINVAL ;
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +35 -38
128 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +321 -301
1,878 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c +0 -196
196 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_class.c +520 -5489
6,009 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +614 -1120
1,734 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +2614 -3873
6,487 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +2 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 50/58 net/bnxt: add support for application ID in ULP matcher
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
The application id in the ulp matcher makes the template matching restrict to only flows that are support for that application.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 11 + drivers/net/bnxt/tf_ulp/ulp_mapper.c | 61 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 3 +- drivers/net/bnxt/tf_ulp/ulp_matcher.c | 28 +- drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 87 +- .../net/bnxt/tf_ulp/ulp_template_db_class.c | 5690 +++++++++-------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 21 +- .../net/bnxt/tf_ulp/ulp_template_db_field.h | 1050 +-- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 14 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 3 + 10 files changed, 3886 insertions(+), 3082 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +11 -0
@@ -99,6 +99,7 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms, mapper_cparms->fld_bitmap = ¶ms->fld_bitmap; mapper_cparms->flow_pattern_id = params->flow_pattern_id; mapper_cparms->act_pattern_id = params->act_pattern_id; + mapper_cparms->app_id = params->app_id;/* update the signature fields into the computed field list */ ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_HDR_SIG_ID,
@@ -140,6 +141,11 @@ bnxt_ulp_flow_create(struct rte_eth_dev *dev,memset (¶ms,0 ,sizeof (struct ulp_rte_parser_params )); params.ulp_ctx = ulp_ctx; +if (bnxt_ulp_cntxt_app_id_get (params.ulp_ctx, ¶ms.app_id)) { +BNXT_TF_DBG (ERR ,"failed to get the app id\n" ); + goto flow_error; + } +/* Set the flow attributes */ bnxt_ulp_set_dir_attributes (¶ms, attr);
@@ -258,6 +264,11 @@ bnxt_ulp_flow_validate(struct rte_eth_dev *dev,memset (¶ms,0 ,sizeof (struct ulp_rte_parser_params )); params.ulp_ctx = ulp_ctx; +if (bnxt_ulp_cntxt_app_id_get (params.ulp_ctx, ¶ms.app_id)) { +BNXT_TF_DBG (ERR ,"failed to get the app id\n" ); + goto parse_error; + } +/* Set the flow attributes */ bnxt_ulp_set_dir_attributes (¶ms, attr);
drivers/net/bnxt/tf_ulp/ulp_mapper.c +26 -35
121 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +2 -1
@@ -61,6 +61,7 @@ struct bnxt_ulp_mapper_parms {uint64_t shared_hndl;uint32_t flow_pattern_id;uint32_t act_pattern_id; +uint8_t app_id; };struct bnxt_ulp_mapper_create_parms {
@@ -88,7 +89,7 @@ struct bnxt_ulp_mapper_create_parms {/* support pattern based rejection */ uint32_t flow_pattern_id;uint32_t act_pattern_id; - +uint8_t app_id; };/* Function to initialize any dynamic mapper data. */
drivers/net/bnxt/tf_ulp/ulp_matcher.c +24 -4
@@ -23,13 +23,15 @@ ulp_matcher_class_hash_calculate(uint64_t hi_sig, uint64_t lo_sig)/* Utility function to calculate the action matcher hash */ static uint32_t -ulp_matcher_action_hash_calculate (uint64_t hi_sig) +ulp_matcher_action_hash_calculate (uint64_t hi_sig,uint64_t app_id) {uint64_t hash; hi_sig |= ((hi_sig %BNXT_ULP_ACT_HID_HIGH_PRIME ) <<BNXT_ULP_ACT_HID_SHFTL ); - hash = hi_sig; + app_id |= ((app_id %BNXT_ULP_CLASS_HID_LOW_PRIME ) << + (BNXT_ULP_CLASS_HID_SHFTL +2 )); + hash = hi_sig ^ app_id; hash = (hash >>BNXT_ULP_ACT_HID_SHFTR ) &BNXT_ULP_ACT_HID_MASK ;return (uint32_t )hash; }
@@ -51,7 +53,8 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params, vf_to_vf =ULP_COMP_FLD_IDX_RD (params,BNXT_ULP_CF_IDX_VF_TO_VF );/* calculate the hash of the given flow */ - class_hid =ulp_matcher_class_hash_calculate (params->hdr_bitmap.bits, + class_hid =ulp_matcher_class_hash_calculate ((params->hdr_bitmap.bits ^ + params->app_id), params->fld_s_bitmap.bits);/* validate the calculate hash values */
@@ -70,6 +73,14 @@ ulp_matcher_pattern_match(struct ulp_rte_parser_params *params,BNXT_TF_DBG (DEBUG ,"Field signature does not match\n" ); goto error; } + +/* Match the application id before proceeding */ +if (params->app_id != class_match->app_sig) { +BNXT_TF_DBG (DEBUG ,"Field to match the app id %u:%u\n" , + params->app_id, class_match->app_sig); + goto error; + } +if (vf_to_vf != class_match->act_vnic) {BNXT_TF_DBG (DEBUG ,"Vnic Match failed\n" ); goto error;
@@ -101,7 +112,8 @@ ulp_matcher_action_match(struct ulp_rte_parser_params *params,struct bnxt_ulp_act_match_info *act_match;/* calculate the hash of the given flow action */ - act_hid =ulp_matcher_action_hash_calculate (params->act_bitmap.bits); + act_hid =ulp_matcher_action_hash_calculate (params->act_bitmap.bits, + params->app_id);/* validate the calculate hash values */ if (act_hid >=BNXT_ULP_ACT_SIG_TBL_MAX_SZ )
@@ -115,6 +127,14 @@ ulp_matcher_action_match(struct ulp_rte_parser_params *params,BNXT_TF_DBG (DEBUG ,"Action Header does not match\n" ); goto error; } + +/* Match the application id before proceeding */ +if (params->app_id != act_match->app_sig) { +BNXT_TF_DBG (DEBUG ,"Field to match the app id %u:%u\n" , + params->app_id, act_match->app_sig); + goto error; + } + *act_id = act_match->act_tid; params->act_pattern_id = act_match->act_pattern_id;BNXT_TF_DBG (DEBUG ,"Found matching action template %u\n" , *act_id);
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +86 -1
603 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +3188 -2502
2,169 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +14 -7
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +525 -525
1,050 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 51/58 net/bnxt: process resource lists before session open
In reply to Venkat DuvvuruFrom: Mike Baucom <[email protected]>
Shared sessions require both named and unnamed resources to be requested during a tf_open_session. ULP uses named resources for global resources that are pre-allocated and remain through the life of the application. Unnamed resources are generally per flow resources and allocated on demand. The sum of both named and unnamed resources must be requested when initializing the session. The ulp_init now processes both lists prior to calling tf_open_session for both shared and regular sessions.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 177 ++++++++++++------ drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 37 ++-- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 1 + drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 36 ++++ drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 6 + 6 files changed, 183 insertions(+), 78 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +121 -56
@@ -77,6 +77,15 @@ bnxt_ulp_app_cap_list_get(uint32_t *num_entries)return ulp_app_cap_info_list; } +static struct bnxt_ulp_resource_resv_info * +bnxt_ulp_app_resource_resv_list_get (uint32_t *num_entries) +{ +if (num_entries ==NULL ) +return NULL ; + *num_entries =BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ ; +return ulp_app_resource_resv_list; +} +struct bnxt_ulp_resource_resv_info *bnxt_ulp_resource_resv_list_get (uint32_t *num_entries) {
@@ -96,23 +105,18 @@ bnxt_ulp_app_glb_resource_info_list_get(uint32_t *num_entries) }static int32_t -bnxt_ulp_tf_resources_get (struct bnxt_ulp_context *ulp_ctx, -struct tf_session_resources *res) +bnxt_ulp_named_resources_calc (struct bnxt_ulp_context *ulp_ctx, +struct bnxt_ulp_glb_resource_info *info, +uint32_t num, +struct tf_session_resources *res) { -struct bnxt_ulp_resource_resv_info *info =NULL ; -uint32_t dev_id, res_type, i, num; +uint32_t dev_id, res_type, i;enum tf_dir dir;uint8_t app_id;int32_t rc =0 ; -if (!ulp_ctx || !res) { -BNXT_TF_DBG (ERR ,"Invalid arguments to get resources.\n" ); -return -EINVAL ; - } - - info =bnxt_ulp_resource_resv_list_get (&num); -if (!info) { -BNXT_TF_DBG (ERR ,"Unable to get resource reservation list.\n" ); +if (ulp_ctx ==NULL || info ==NULL || res ==NULL || num ==0 ) { +BNXT_TF_DBG (ERR ,"Invalid parms to named resources calc.\n" );return -EINVAL ; }
@@ -124,31 +128,33 @@ bnxt_ulp_tf_resources_get(struct bnxt_ulp_context *ulp_ctx, rc =bnxt_ulp_cntxt_dev_id_get (ulp_ctx, &dev_id);if (rc) { -BNXT_TF_DBG (ERR ,"Unable to get the device id from ulp.\n" ); +BNXT_TF_DBG (ERR ,"Unable to get the dev id from ulp.\n" );return -EINVAL ; }for (i =0 ; i < num; i++) { -if (app_id != info[i].app_id || dev_id != info[i].device_id) +if (dev_id != info[i].device_id || app_id != info[i].app_id)continue ; dir = info[i].direction; res_type = info[i].resource_type;switch (info[i].resource_func) {case BNXT_ULP_RESOURCE_FUNC_IDENTIFIER : - res->ident_cnt[dir].cnt[res_type] = info[i].count; + res->ident_cnt[dir].cnt[res_type]++;break ;case BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE : - res->tbl_cnt[dir].cnt[res_type] = info[i].count; + res->tbl_cnt[dir].cnt[res_type]++;break ;case BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE : - res->tcam_cnt[dir].cnt[res_type] = info[i].count; + res->tcam_cnt[dir].cnt[res_type]++;break ;case BNXT_ULP_RESOURCE_FUNC_EM_TABLE : - res->em_cnt[dir].cnt[res_type] = info[i].count; + res->em_cnt[dir].cnt[res_type]++;break ;default : -break ; +BNXT_TF_DBG (ERR ,"Unknown resource func (0x%x)\n," , + info[i].resource_func); +continue ; } }
@@ -156,14 +162,20 @@ bnxt_ulp_tf_resources_get(struct bnxt_ulp_context *ulp_ctx, }static int32_t -bnxt_ulp_tf_shared_session_resources_get (struct bnxt_ulp_context *ulp_ctx, -struct tf_session_resources *res) +bnxt_ulp_unnamed_resources_calc (struct bnxt_ulp_context *ulp_ctx, +struct bnxt_ulp_resource_resv_info *info, +uint32_t num, +struct tf_session_resources *res) { -struct bnxt_ulp_glb_resource_info *info; -uint32_t dev_id, res_type, i, num; +uint32_t dev_id, res_type, i;enum tf_dir dir;uint8_t app_id; -int32_t rc; +int32_t rc =0 ; + +if (ulp_ctx ==NULL || res ==NULL || info ==NULL || num ==0 ) { +BNXT_TF_DBG (ERR ,"Invalid arguments to get resources.\n" ); +return -EINVAL ; + } rc =bnxt_ulp_cntxt_app_id_get (ulp_ctx, &app_id);if (rc) {
@@ -173,48 +185,108 @@ bnxt_ulp_tf_shared_session_resources_get(struct bnxt_ulp_context *ulp_ctx, rc =bnxt_ulp_cntxt_dev_id_get (ulp_ctx, &dev_id);if (rc) { -BNXT_TF_DBG (ERR ,"Unable to get device id from ulp.\n" ); +BNXT_TF_DBG (ERR ,"Unable to get the dev id from ulp.\n" );return -EINVAL ; } -/* Make sure the resources are zero before accumulating. */ -memset (res,0 ,sizeof (struct tf_session_resources )); - -/* Get the list and tally the resources. */ - info =bnxt_ulp_app_glb_resource_info_list_get (&num); -if (!info) { -BNXT_TF_DBG (ERR ,"Unable to get app global resource list\n" ); -return -EINVAL ; - }for (i =0 ; i < num; i++) { -if (dev_id != info[i].device_id || app_id != info[i].app_id) +if (app_id != info[i].app_id || dev_id != info[i].device_id)continue ; dir = info[i].direction; res_type = info[i].resource_type;switch (info[i].resource_func) {case BNXT_ULP_RESOURCE_FUNC_IDENTIFIER : - res->ident_cnt[dir].cnt[res_type]++; + res->ident_cnt[dir].cnt[res_type] = info[i].count;break ;case BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE : - res->tbl_cnt[dir].cnt[res_type]++; + res->tbl_cnt[dir].cnt[res_type] = info[i].count;break ;case BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE : - res->tcam_cnt[dir].cnt[res_type]++; + res->tcam_cnt[dir].cnt[res_type] = info[i].count;break ;case BNXT_ULP_RESOURCE_FUNC_EM_TABLE : - res->em_cnt[dir].cnt[res_type]++; + res->em_cnt[dir].cnt[res_type] = info[i].count;break ;default : -BNXT_TF_DBG (ERR ,"Unknown resource func (0x%x)\n," , - info[i].resource_func); -continue ; +break ; } } -return 0 ; } +static int32_t +bnxt_ulp_tf_resources_get (struct bnxt_ulp_context *ulp_ctx, +struct tf_session_resources *res) +{ +struct bnxt_ulp_resource_resv_info *unnamed =NULL ; +uint32_t unum; +int32_t rc =0 ; + +if (ulp_ctx ==NULL || res ==NULL ) { +BNXT_TF_DBG (ERR ,"Invalid arguments to get resources.\n" ); +return -EINVAL ; + } + + unnamed =bnxt_ulp_resource_resv_list_get (&unum); +if (unnamed ==NULL ) { +BNXT_TF_DBG (ERR ,"Unable to get resource resv list.\n" ); +return -EINVAL ; + } + + rc =bnxt_ulp_unnamed_resources_calc (ulp_ctx, unnamed, unum, res); +if (rc) +BNXT_TF_DBG (ERR ,"Unable to calc resources for session.\n" ); + +return rc; +} + +static int32_t +bnxt_ulp_tf_shared_session_resources_get (struct bnxt_ulp_context *ulp_ctx, +struct tf_session_resources *res) +{ +struct bnxt_ulp_resource_resv_info *unnamed; +struct bnxt_ulp_glb_resource_info *named; +uint32_t unum, nnum; +int32_t rc; + +if (ulp_ctx ==NULL || res ==NULL ) { +BNXT_TF_DBG (ERR ,"Invalid arguments to get resources.\n" ); +return -EINVAL ; + } + +/* Make sure the resources are zero before accumulating. */ +memset (res,0 ,sizeof (struct tf_session_resources )); + +/* +* Shared resources are comprised of both named and unnamed resources. +* First get the unnamed counts, and then add the named to the result. +*/ +/* Get the baseline counts */ + unnamed =bnxt_ulp_app_resource_resv_list_get (&unum); +if (unnamed ==NULL ) { +BNXT_TF_DBG (ERR ,"Unable to get shared resource resv list.\n" ); +return -EINVAL ; + } + rc =bnxt_ulp_unnamed_resources_calc (ulp_ctx, unnamed, unum, res); +if (rc) { +BNXT_TF_DBG (ERR ,"Unable to calc resources for shared session.\n" ); +return -EINVAL ; + } + +/* Get the named list and add the totals */ + named =bnxt_ulp_app_glb_resource_info_list_get (&nnum); +if (named ==NULL ) { +BNXT_TF_DBG (ERR ,"Unable to get app global resource list\n" ); +return -EINVAL ; + } + rc =bnxt_ulp_named_resources_calc (ulp_ctx, named, nnum, res); +if (rc) +BNXT_TF_DBG (ERR ,"Unable to calc named resources\n" ); + +return rc; +} +int32_t bnxt_ulp_cntxt_app_caps_init (struct bnxt_ulp_context *ulp_ctx,uint8_t app_id,uint32_t dev_id)
@@ -320,10 +392,8 @@ ulp_ctx_shared_session_open(struct bnxt *bp,strncat (parms.ctrl_chan_name,"-tf_shared" , copy_num_bytes); rc =bnxt_ulp_tf_shared_session_resources_get (bp->ulp_ctx, resources); -if (rc) { -BNXT_TF_DBG (ERR ,"Unable to get shared resource count.\n" ); +if (rc)return rc; - } rc =bnxt_ulp_cntxt_dev_id_get (bp->ulp_ctx, &ulp_dev_id);if (rc) {
@@ -342,8 +412,7 @@ ulp_ctx_shared_session_open(struct bnxt *bp, parms.device_type =TF_DEVICE_TYPE_THOR ;break ;default : -BNXT_TF_DBG (ERR ,"Unable to determine device for " -"opening session.\n" ); +BNXT_TF_DBG (ERR ,"Unable to determine dev for opening session.\n" );return rc; }
@@ -450,18 +519,14 @@ ulp_ctx_session_open(struct bnxt *bp, params.device_type =TF_DEVICE_TYPE_THOR ;break ;default : -BNXT_TF_DBG (ERR ,"Unable to determine device for " -"opening session.\n" ); +BNXT_TF_DBG (ERR ,"Unable to determine device for opening session.\n" );return rc; } resources = ¶ms.resources; rc =bnxt_ulp_tf_resources_get (bp->ulp_ctx, resources); -if (rc) { -BNXT_TF_DBG (ERR ,"Unable to determine tf resources for " -"session open.\n" ); +if (rc)return rc; - } params.bp = bp; rc =tf_open_session (&bp->tfp, ¶ms);
@@ -708,8 +773,8 @@ ulp_ctx_init(struct bnxt *bp, rc =bnxt_ulp_cntxt_app_caps_init (bp->ulp_ctx, bp->app_id, devid);if (rc) { -BNXT_TF_DBG (ERR ,"Unable to set capabilities for " -" app(%x)/dev(%x)\n" , bp->app_id, devid); +BNXT_TF_DBG (ERR ,"Unable to set caps for app(%x)/dev(%x)\n" , + bp->app_id, devid); goto error_deinit; }
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +2 -2
@@ -321,8 +321,8 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev, ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev);if (!ulp_ctx) { -BNXT_TF_DBG (ERR ,"ULP context is not initialized. " -"Failed to create default flow.\n" ); +BNXT_TF_DBG (ERR , +"ULP context is not initialized. Failed to create dflt flow.\n" );return -EINVAL ; }
drivers/net/bnxt/tf_ulp/ulp_mapper.c +17 -20
@@ -2296,8 +2296,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms, tbl->tbl_operand, ®val, &shared)) {BNXT_TF_DBG (ERR , -"Failed to get tbl idx from Global " -"regfile[%d].\n" , +"Failed to get tbl idx from Glb RF[%d].\n" , tbl->tbl_operand);return -EINVAL ; }
@@ -2347,8 +2346,9 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms, gparms.data_sz_in_bytes, data.byte_order);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to read fields on tbl read " -"rc=%d\n" , rc); +BNXT_TF_DBG (ERR , +"Failed to get flds on tbl read rc=%d\n" , + rc);return rc; }return 0 ;
@@ -2433,8 +2433,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms, rc =tf_set_tbl_entry (tfp, &sparms);if (rc) {BNXT_TF_DBG (ERR , -"Index table[%s][%s][%x] write failed " -"rc=%d\n" , +"Index table[%s][%s][%x] write fail rc=%d\n" ,tf_tbl_type_2_str (sparms.type),tf_dir_2_str (sparms.dir), sparms.idx, rc);
@@ -2833,15 +2832,15 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx, rc =bnxt_ulp_cntxt_dev_id_get (ulp_ctx, &dev_id);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to get device id for " -"global init (%d)\n" , rc); +BNXT_TF_DBG (ERR ,"Failed to get device id for glb init (%d)\n" , + rc);return rc; } rc =bnxt_ulp_cntxt_app_id_get (ulp_ctx, &app_id);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to get app id for " -"global init (%d)\n" , rc); +BNXT_TF_DBG (ERR ,"Failed to get app id for glb init (%d)\n" , + rc);return rc; }
@@ -2916,15 +2915,15 @@ ulp_mapper_app_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx, rc =bnxt_ulp_cntxt_app_id_get (ulp_ctx, &app_id);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to get the app id in global init " -"(%d).\n" , rc); +BNXT_TF_DBG (ERR ,"Failed to get the app id in glb init (%d).\n" , + rc);return rc; } rc =bnxt_ulp_cntxt_dev_id_get (ulp_ctx, &dev_id);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to get device id for app " -"global init (%d)\n" , rc); +BNXT_TF_DBG (ERR ,"Failed to get dev id for app glb init (%d)\n" , + rc);return rc; }
@@ -3413,8 +3412,8 @@ ulp_mapper_tbls_process(struct bnxt_ulp_mapper_parms *parms, uint32_t tid) cond_tbls, num_cond_tbls, &cond_rc);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to process cond opc list " -"(%d)\n" , rc); +BNXT_TF_DBG (ERR ,"Failed to proc cond opc list (%d)\n" , + rc); goto error; }/* Skip the table if False */
@@ -3812,8 +3811,7 @@ ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)if (bnxt_ulp_cntxt_shared_session_enabled (ulp_ctx)) { rc =ulp_mapper_app_glb_resource_info_init (ulp_ctx, data);if (rc) { -BNXT_TF_DBG (ERR ,"Failed to initialize app " -"global resources\n" ); +BNXT_TF_DBG (ERR ,"Failed to init app glb resources\n" ); goto error; } }
@@ -3840,8 +3838,7 @@ ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx)if (!ulp_ctx) {BNXT_TF_DBG (ERR , -"Failed to acquire ulp context, so data may " -"not be released.\n" ); +"Failed to acquire ulp context, so data may not be released.\n" );return ; }
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +1 -0
@@ -29,6 +29,7 @@#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 27#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 219 +#define BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ 4#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 6#define BNXT_ULP_COND_GOTO_REJECT 1023#define BNXT_ULP_COND_GOTO_RF 0x10000
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +36 -0
@@ -270,6 +270,42 @@ struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = { } }; +/* List of unnamed app tf resources required to be reserved per app/device */ +struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[] = { + { + .app_id =1 , + .device_id =BNXT_ULP_DEVICE_ID_WH_PLUS , + .direction =TF_DIR_RX , + .resource_func =BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE , + .resource_type =TF_TCAM_TBL_TYPE_WC_TCAM , + .count =256 + }, + { + .app_id =1 , + .device_id =BNXT_ULP_DEVICE_ID_THOR , + .direction =TF_DIR_RX , + .resource_func =BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE , + .resource_type =TF_TCAM_TBL_TYPE_WC_TCAM , + .count =256 + }, + { + .app_id =2 , + .device_id =BNXT_ULP_DEVICE_ID_WH_PLUS , + .direction =TF_DIR_RX , + .resource_func =BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE , + .resource_type =TF_TCAM_TBL_TYPE_WC_TCAM , + .count =256 + }, + { + .app_id =2 , + .device_id =BNXT_ULP_DEVICE_ID_THOR , + .direction =TF_DIR_RX , + .resource_func =BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE , + .resource_type =TF_TCAM_TBL_TYPE_WC_TCAM , + .count =256 + } +}; +/* List of device specific parameters */ struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[] = { {
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +6 -0
@@ -391,6 +391,12 @@ extern struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[];*/ extern struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[]; +/* +* The ulp_app_resource_resv_list provides the list of tf resources required +* when calling tf_open. +*/ +extern struct bnxt_ulp_resource_resv_info ulp_app_resource_resv_list[]; +/* * The_app_cap_info_list provides the list of ULP capabilities per app/device. */
Signature · 1 line
2.17.1
PATCH 52/58 net/bnxt: add support for shared sessions in ULP
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
1. Add template support for shared sessions.
2. Store the shared session flag in flow data base.
3. Store WC tcam region in the computational field.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 10 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 5 +- drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 11 + drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 2 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 19 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 18 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 57 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 1 - .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 21 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 444 ++-- .../bnxt/tf_ulp/ulp_template_db_thor_class.c | 68 +- .../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 1100 +++++----- .../tf_ulp/ulp_template_db_wh_plus_class.c | 1838 +++++++++-------- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 3 + 14 files changed, 1805 insertions(+), 1792 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +7 -3
@@ -671,7 +671,7 @@ ulp_eem_tbl_scope_deinit(struct bnxt *bp, struct bnxt_ulp_context *ulp_ctx)if (!ulp_ctx || !ulp_ctx->cfg_data)return -EINVAL ; - tfp =bnxt_ulp_cntxt_tfp_get (ulp_ctx); + tfp =bnxt_ulp_cntxt_tfp_get (ulp_ctx,BNXT_ULP_SHARED_SESSION_NO );if (!tfp) {BNXT_TF_DBG (ERR ,"Failed to get the truflow pointer\n" );return -EINVAL ;
@@ -1632,13 +1632,17 @@ bnxt_ulp_cntxt_tfp_set(struct bnxt_ulp_context *ulp, struct tf *tfp)/* Function to get the tfp session details from the ulp context. */ struct tf * -bnxt_ulp_cntxt_tfp_get (struct bnxt_ulp_context *ulp) +bnxt_ulp_cntxt_tfp_get (struct bnxt_ulp_context *ulp, +enum bnxt_ulp_shared_session shared) {if (!ulp) {BNXT_TF_DBG (ERR ,"Invalid arguments\n" );return NULL ; } -return ulp->g_tfp; +if (shared) +return ulp->g_shared_tfp; +else +return ulp->g_tfp; }/*
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +4 -1
@@ -31,11 +31,13 @@#define BNXT_ULP_VF_REP_ENABLED 0x1#define BNXT_ULP_SHARED_SESSION_ENABLED 0x2#define BNXT_ULP_APP_DEV_UNSUPPORTED 0x4 +#define BNXT_ULP_HIGH_AVAIL_ENABLED 0x8#define ULP_VF_REP_IS_ENABLED (flag) ((flag) & BNXT_ULP_VF_REP_ENABLED)#define ULP_SHARED_SESSION_IS_ENABLED (flag) ((flag) &\ BNXT_ULP_SHARED_SESSION_ENABLED)#define ULP_APP_DEV_UNSUPPORTED_ENABLED (flag) ((flag) &\ BNXT_ULP_APP_DEV_UNSUPPORTED) +#define ULP_HIGH_AVAIL_IS_ENABLED (flag) ((flag) & BNXT_ULP_HIGH_AVAIL_ENABLED)enum bnxt_ulp_flow_mem_type {BNXT_ULP_FLOW_MEM_TYPE_INT =0 ,
@@ -158,7 +160,8 @@ bnxt_ulp_cntxt_tfp_set(struct bnxt_ulp_context *ulp, struct tf *tfp);/* Function to get the tfp session details from ulp context. */ struct tf * -bnxt_ulp_cntxt_tfp_get (struct bnxt_ulp_context *ulp); +bnxt_ulp_cntxt_tfp_get (struct bnxt_ulp_context *ulp, +enum bnxt_ulp_shared_session shared);/* Get the device table entry based on the device id. */ struct bnxt_ulp_device_params *
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +11 -0
@@ -81,6 +81,8 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,struct ulp_rte_parser_params *params, enum bnxt_ulp_fdb_type flow_type) { + uint32_t ulp_flags = 0; +memset (mapper_cparms,0 ,sizeof (*mapper_cparms)); mapper_cparms->flow_type = flow_type; mapper_cparms->app_priority = params->priority;
@@ -106,6 +108,15 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms, params->hdr_sig_id);ULP_COMP_FLD_IDX_WR (params,BNXT_ULP_CF_IDX_FLOW_SIG_ID , params->flow_sig_id); + +/* update the WC Priority flag */ +if (!bnxt_ulp_cntxt_ptr2_ulp_flags_get (params->ulp_ctx, &ulp_flags) && +ULP_HIGH_AVAIL_IS_ENABLED (ulp_flags)) { +/* TBD: read the state and Set the WC priority */ +ULP_COMP_FLD_IDX_WR (params, +BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG ,1 ); + } + }/* Function to create the rte flow. */
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +1 -1
@@ -389,7 +389,7 @@ ulp_fc_mgr_alarm_cb(void *arg)return ; } - tfp =bnxt_ulp_cntxt_tfp_get (ctxt); + tfp =bnxt_ulp_cntxt_tfp_get (ctxt,BNXT_ULP_SHARED_SESSION_NO );if (!tfp) {BNXT_TF_DBG (ERR ,"Failed to get the truflow pointer\n" );return ;
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +17 -2
@@ -156,7 +156,7 @@ ulp_flow_db_res_params_to_info(struct ulp_fdb_resource_info *resource_info, resource_info->resource_hndl = (uint32_t )params->resource_hndl; resource_info->resource_type = params->resource_type; resource_info->resource_sub_type = params->resource_sub_type; - resource_info->reserved = params->reserved; + resource_info->fdb_flags = params->fdb_flags; }else { resource_info->resource_em_handle = params->resource_hndl; }
@@ -187,7 +187,7 @@ ulp_flow_db_res_info_to_params(struct ulp_fdb_resource_info *resource_info, params->resource_hndl = resource_info->resource_hndl; params->resource_type = resource_info->resource_type; params->resource_sub_type = resource_info->resource_sub_type; - params->reserved = resource_info->reserved; + params->fdb_flags = resource_info->fdb_flags; } }
@@ -1900,3 +1900,18 @@ ulp_flow_db_parent_flow_count_reset(struct bnxt_ulp_context *ulp_ctxt) } } } + +/* +* Set the shared bit for the flow db entry +* +* res [in] Ptr to fdb entry +* shared [in] shared flag +* +* returns none +*/ +void ulp_flow_db_shared_session_set (struct ulp_flow_db_res_params *res, +enum bnxt_ulp_shared_session shared) +{ +if (res && (shared &BNXT_ULP_SHARED_SESSION_YES )) + res->fdb_flags |=ULP_FDB_FLAG_SHARED_SESSION ; +}
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +16 -2
@@ -13,6 +13,9 @@#define BNXT_FLOW_DB_DEFAULT_NUM_FLOWS 512#define BNXT_FLOW_DB_DEFAULT_NUM_RESOURCES 8 +/* Defines for the fdb flag */ +#define ULP_FDB_FLAG_SHARED_SESSION 0x1 +/* * Structure for the flow database resource information * The below structure is based on the below paritions
@@ -30,7 +33,7 @@ struct ulp_fdb_resource_info {uint8_t resource_func_lower;uint8_t resource_type;uint8_t resource_sub_type; -uint8_t reserved; +uint8_t fdb_flags;uint32_t resource_hndl; }; };
@@ -86,7 +89,7 @@ struct ulp_flow_db_res_params {enum bnxt_ulp_resource_func resource_func;uint8_t resource_type;uint8_t resource_sub_type; -uint8_t reserved; +uint8_t fdb_flags;uint8_t critical_resource;uint64_t resource_hndl; };
@@ -403,4 +406,15 @@ ulp_flow_db_parent_flow_count_get(struct bnxt_ulp_context *ulp_ctxt,void ulp_flow_db_parent_flow_count_reset (struct bnxt_ulp_context *ulp_ctxt); +/* +* Set the shared bit for the flow db entry +* +* res [in] Ptr to fdb entry +* shared [in] shared flag +* +* returns none +*/ +void ulp_flow_db_shared_session_set (struct ulp_flow_db_res_params *res, +enum bnxt_ulp_shared_session shared); +#endif /* _ULP_FLOW_DB_H_ */
drivers/net/bnxt/tf_ulp/ulp_mapper.c +41 -16
216 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +0 -1
@@ -48,7 +48,6 @@ struct bnxt_ulp_mapper_parms {struct ulp_rte_field_bitmap *fld_bitmap;uint32_t *comp_fld;struct ulp_regfile *regfile; -struct tf *tfp;struct bnxt_ulp_context *ulp_ctx;uint32_t fid;enum bnxt_ulp_fdb_type flow_type;
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +15 -6
@@ -3,7 +3,7 @@* All rights reserved. */ -/* date: Wed Mar 17 11:31:19 2021 */ +/* date: Sun Mar 21 13:04:51 2021 */ #ifndef ULP_TEMPLATE_DB_H_ #define ULP_TEMPLATE_DB_H_
@@ -26,10 +26,10 @@#define BNXT_ULP_ACT_HID_SHFTR 27#define BNXT_ULP_ACT_HID_SHFTL 26#define BNXT_ULP_ACT_HID_MASK 2047 -#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33 -#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 27 -#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 219#define BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ 4 +#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33 +#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 26 +#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 205#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 6#define BNXT_ULP_COND_GOTO_REJECT 1023#define BNXT_ULP_COND_GOTO_RF 0x10000
@@ -218,7 +218,8 @@ enum bnxt_ulp_cf_idx {BNXT_ULP_CF_IDX_HDR_SIG_ID =59 ,BNXT_ULP_CF_IDX_FLOW_SIG_ID =60 ,BNXT_ULP_CF_IDX_WC_MATCH =61 , -BNXT_ULP_CF_IDX_LAST =62 +BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG =62 , +BNXT_ULP_CF_IDX_LAST =63 }; enum bnxt_ulp_cond_list_opc {
@@ -468,6 +469,12 @@ enum bnxt_ulp_rf_idx {BNXT_ULP_RF_IDX_LAST =40 }; +enum bnxt_ulp_shared_session { +BNXT_ULP_SHARED_SESSION_NO =0 , +BNXT_ULP_SHARED_SESSION_YES =1 , +BNXT_ULP_SHARED_SESSION_LAST =2 +}; +enum bnxt_ulp_tcam_tbl_opc {BNXT_ULP_TCAM_TBL_OPC_NOT_USED =0 ,BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE =1 ,
@@ -571,6 +578,7 @@ enum bnxt_ulp_act_prop_sz {BNXT_ULP_ACT_PROP_SZ_ENCAP_TUN =32 ,BNXT_ULP_ACT_PROP_SZ_JUMP =4 ,BNXT_ULP_ACT_PROP_SZ_SHARED_HANDLE =8 , +BNXT_ULP_ACT_PROP_SZ_RSS =64 , BNXT_ULP_ACT_PROP_SZ_LAST = 4 };
@@ -617,7 +625,8 @@ enum bnxt_ulp_act_prop_idx {BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN =225 ,BNXT_ULP_ACT_PROP_IDX_JUMP =257 ,BNXT_ULP_ACT_PROP_IDX_SHARED_HANDLE =261 , -BNXT_ULP_ACT_PROP_IDX_LAST =269 +BNXT_ULP_ACT_PROP_IDX_RSS =269 , +BNXT_ULP_ACT_PROP_IDX_LAST =333 }; enum ulp_wp_sym {
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +163 -281
1,281 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_class.c +34 -34
188 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +550 -550
1,096 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +943 -895
1,838 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 53/58 net/bnxt: add HA support in ULP
In reply to Venkat DuvvuruFrom: Mike Baucom <[email protected]>
Added the ability for cooperative applications to share resources and perform some high availability functions.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 59 +++ drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 10 + drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 15 +- drivers/net/bnxt/tf_ulp/meson.build | 1 + drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 551 ++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h | 67 +++ drivers/net/bnxt/tf_ulp/ulp_mapper.c | 52 ++- 7 files changed, 745 insertions(+), 10 deletions(-) create mode 100644 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c create mode 100644 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +59 -0
@@ -23,6 +23,7 @@#include "ulp_mapper.h" #include "ulp_port_db.h" #include "ulp_tun.h" +#include "ulp_ha_mgr.h" /* Linked list of all TF sessions. */ STAILQ_HEAD(, bnxt_ulp_session_state) bnxt_ulp_session_list =
@@ -315,6 +316,9 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt_ulp_context *ulp_ctx,if (info[i].flags &BNXT_ULP_APP_CAP_SHARED_EN ) ulp_ctx->cfg_data->ulp_flags |=BNXT_ULP_SHARED_SESSION_ENABLED ; +if (info[i].flags &BNXT_ULP_APP_CAP_HOT_UPGRADE_EN ) + ulp_ctx->cfg_data->ulp_flags |= +BNXT_ULP_HIGH_AVAIL_ENABLED ; }if (!found) { BNXT_TF_DBG(ERR, "APP ID %d, Device ID: 0x%x not supported.\n",
@@ -1137,9 +1141,18 @@ static void bnxt_ulp_deinit(struct bnxt *bp, struct bnxt_ulp_session_state *session) { + bool ha_enabled; +if (!bp->ulp_ctx || !bp->ulp_ctx->cfg_data)return ; + ha_enabled =bnxt_ulp_cntxt_ha_enabled (bp->ulp_ctx); +if (ha_enabled && session->session_opened) { +int32_t rc =ulp_ha_mgr_close (bp->ulp_ctx); +if (rc) +BNXT_TF_DBG (ERR ,"Failed to close HA (%d)\n" , rc); + } +/* clean up default flows */ bnxt_ulp_destroy_df_rules (bp, true);
@@ -1179,6 +1192,9 @@ bnxt_ulp_deinit(struct bnxt *bp,/* free the flow db lock */ pthread_mutex_destroy (&bp->ulp_ctx->cfg_data->flow_db_lock); +if (ha_enabled) +ulp_ha_mgr_deinit (bp->ulp_ctx); +/* Delete the ulp context and tf session and free the ulp context */ ulp_ctx_deinit (bp, session);BNXT_TF_DBG (DEBUG ,"ulp ctx has been deinitialized\n" );
@@ -1275,6 +1291,19 @@ bnxt_ulp_init(struct bnxt *bp,BNXT_TF_DBG (ERR ,"Failed to set tx global configuration\n" ); goto jump_to_error; } + +if (bnxt_ulp_cntxt_ha_enabled (bp->ulp_ctx)) { + rc =ulp_ha_mgr_init (bp->ulp_ctx); +if (rc) { +BNXT_TF_DBG (ERR ,"Failed to initialize HA %d\n" , rc); + goto jump_to_error; + } + rc =ulp_ha_mgr_open (bp->ulp_ctx); +if (rc) { +BNXT_TF_DBG (ERR ,"Failed to Process HA Open %d\n" , rc); + goto jump_to_error; + } + }BNXT_TF_DBG (DEBUG ,"ulp ctx has been initialized\n" );return rc;
@@ -1828,3 +1857,33 @@ bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context *ulp_ctx)pthread_mutex_unlock (&ulp_ctx->cfg_data->flow_db_lock); } + +/* Function to set the ha info into the context */ +int32_t +bnxt_ulp_cntxt_ptr2_ha_info_set (struct bnxt_ulp_context *ulp_ctx, +struct bnxt_ulp_ha_mgr_info *ulp_ha_info) +{ +if (ulp_ctx ==NULL || ulp_ctx->cfg_data ==NULL ) { +BNXT_TF_DBG (ERR ,"Invalid ulp context data\n" ); +return -EINVAL ; + } + ulp_ctx->cfg_data->ha_info = ulp_ha_info; +return 0 ; +} + +/* Function to retrieve the ha info from the context. */ +struct bnxt_ulp_ha_mgr_info * +bnxt_ulp_cntxt_ptr2_ha_info_get (struct bnxt_ulp_context *ulp_ctx) +{ +if (ulp_ctx ==NULL || ulp_ctx->cfg_data ==NULL ) +return NULL ; +return ulp_ctx->cfg_data->ha_info; +} + +bool +bnxt_ulp_cntxt_ha_enabled (struct bnxt_ulp_context *ulp_ctx) +{ +if (ulp_ctx ==NULL || ulp_ctx->cfg_data ==NULL ) +return false; +return !!ULP_HIGH_AVAIL_IS_ENABLED (ulp_ctx->cfg_data->ulp_flags); +}
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +10 -0
@@ -67,6 +67,7 @@ struct bnxt_ulp_data {void *mapper_data;struct bnxt_ulp_port_db *port_db;struct bnxt_ulp_fc_info *fc_info; +struct bnxt_ulp_ha_mgr_info *ha_info;uint32_t ulp_flags;struct bnxt_ulp_df_rule_info df_rule_info[RTE_MAX_ETHPORTS ];struct bnxt_ulp_vfr_rule_info vfr_rule_info[RTE_MAX_ETHPORTS ];
@@ -275,4 +276,13 @@ bnxt_ulp_cntxt_app_caps_init(struct bnxt_ulp_context *ulp_ctx,struct bnxt_ulp_resource_resv_info *bnxt_ulp_resource_resv_list_get (uint32_t *num_entries); +int32_t +bnxt_ulp_cntxt_ptr2_ha_info_set (struct bnxt_ulp_context *ulp_ctx, +struct bnxt_ulp_ha_mgr_info *ulp_ha_info); + +struct bnxt_ulp_ha_mgr_info * +bnxt_ulp_cntxt_ptr2_ha_info_get (struct bnxt_ulp_context *ulp_ctx); + +bool +bnxt_ulp_cntxt_ha_enabled (struct bnxt_ulp_context *ulp_ctx);#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +11 -4
@@ -11,6 +11,7 @@#include "ulp_mapper.h" #include "ulp_fc_mgr.h" #include "ulp_port_db.h" +#include "ulp_ha_mgr.h" #include <rte_malloc.h> static int32_t
@@ -112,11 +113,17 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms,/* update the WC Priority flag */ if (!bnxt_ulp_cntxt_ptr2_ulp_flags_get (params->ulp_ctx, &ulp_flags) &&ULP_HIGH_AVAIL_IS_ENABLED (ulp_flags)) { -/* TBD: read the state and Set the WC priority */ -ULP_COMP_FLD_IDX_WR (params, -BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG ,1 ); +enum ulp_ha_mgr_region region =ULP_HA_REGION_LOW ; +int32_t rc; + + rc =ulp_ha_mgr_region_get (params->ulp_ctx, ®ion); +if (rc) +BNXT_TF_DBG (ERR ,"Unable to get WC region\n" ); +if (region ==ULP_HA_REGION_HI ) +ULP_COMP_FLD_IDX_WR (params, +BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG , +1 ); } - }/* Function to create the rte flow. */
drivers/net/bnxt/tf_ulp/meson.build +1 -0
@@ -24,6 +24,7 @@ sources += files( 'ulp_tun.c', 'ulp_gen_tbl.c', 'ulp_gen_hash.c', + 'ulp_ha_mgr.c', 'ulp_rte_handler_tbl.c', 'ulp_template_db_wh_plus_act.c', 'ulp_template_db_wh_plus_class.c',
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c new file +551 -0
551 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h new file +67 -0
67 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.c +46 -6
110 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 54/58 net/bnxt: add support for icmp6 ULP parsing
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
This patch adds support for parsing rte_flow items for icmp6 flows.
--- drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 48 +++++++++++++++++++ drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 ++ 3 files changed, 55 insertions(+), 2 deletions(-)
drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c +2 -2
@@ -346,8 +346,8 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = { .proto_hdr_func = NULL }, [RTE_FLOW_ITEM_TYPE_ICMP6] = { - .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED, - .proto_hdr_func =NULL + .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, + .proto_hdr_func = ulp_rte_icmp6_hdr_handler }, [RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS] = { .hdr_type = BNXT_ULP_HDR_TYPE_NOT_SUPPORTED,
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +48 -0
54 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +5 -0
@@ -147,6 +147,11 @@ int32_t ulp_rte_icmp_hdr_handler(const struct rte_flow_item *item, struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item ICMP6 Header. */ +int32_t +ulp_rte_icmp6_hdr_handler (const struct rte_flow_item *item, +struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item void Header. */ int32_t ulp_rte_void_hdr_handler(const struct rte_flow_item *item,
Signature · 1 line
2.17.1
PATCH 55/58 net/bnxt: add support for ULP context list for timers
In reply to Venkat DuvvuruFrom: Kishore Padmanabha <[email protected]>
The alarm callback needs to have a valid context pointer when it is invoked, the context could become invalid if the port goes down and the callback is invoked before it is cancelled.
--- drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 95 ++++++++++++++++++++++++++++ drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 12 ++++ drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 30 ++++++--- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 37 +++++------ 4 files changed, 144 insertions(+), 30 deletions(-)
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +95 -0
@@ -8,6 +8,7 @@#include <rte_flow.h> #include <rte_flow_driver.h> #include <rte_tailq.h> +#include <rte_spinlock.h> #include "bnxt.h" #include "bnxt_ulp.h"
@@ -32,6 +33,17 @@ STAILQ_HEAD(, bnxt_ulp_session_state) bnxt_ulp_session_list =/* Mutex to synchronize bnxt_ulp_session_list operations. */ static pthread_mutex_t bnxt_ulp_global_mutex =PTHREAD_MUTEX_INITIALIZER ; +/* Spin lock to protect context global list */ +rte_spinlock_t bnxt_ulp_ctxt_lock; +TAILQ_HEAD (cntx_list_entry_list, ulp_context_list_entry); +static struct cntx_list_entry_list ulp_cntx_list = +TAILQ_HEAD_INITIALIZER (ulp_cntx_list); + +/* Static function declarations */ +static int32_t bnxt_ulp_cntxt_list_init (void ); +static int32_t bnxt_ulp_cntxt_list_add (struct bnxt_ulp_context *ulp_ctx); +static void bnxt_ulp_cntxt_list_del (struct bnxt_ulp_context *ulp_ctx); +/* * Allow the deletion of context only for the bnxt device that * created the session.
@@ -743,6 +755,16 @@ ulp_ctx_init(struct bnxt *bp,int32_t rc =0 ;enum bnxt_ulp_device_id devid; +/* Initialize the context entries list */ +bnxt_ulp_cntxt_list_init (); + +/* Add the context to the context entries list */ + rc =bnxt_ulp_cntxt_list_add (bp->ulp_ctx); +if (rc) { +BNXT_TF_DBG (ERR ,"Failed to add the context list entry\n" ); +return -ENOMEM ; + } +/* Allocate memory to hold ulp context data. */ ulp_data =rte_zmalloc ("bnxt_ulp_data" ,sizeof (struct bnxt_ulp_data ),0 );
@@ -878,6 +900,13 @@ ulp_ctx_attach(struct bnxt *bp,/* update the session details in bnxt tfp */ bp->tfp.session = session->g_tfp->session; +/* Add the context to the context entries list */ + rc =bnxt_ulp_cntxt_list_add (bp->ulp_ctx); +if (rc) { +BNXT_TF_DBG (ERR ,"Failed to add the context list entry\n" ); +return -EINVAL ; + } +/* * The supported flag will be set during the init. Use it now to * know if we should go through the attach.
@@ -1448,6 +1477,9 @@ bnxt_ulp_port_deinit(struct bnxt *bp)BNXT_TF_DBG (DEBUG ,"BNXT Port:%d ULP port deinit\n" , bp->eth_dev->data->port_id); +/* Free the ulp context in the context entry list */ +bnxt_ulp_cntxt_list_del (bp->ulp_ctx); +/* Get the session details */ pci_dev =RTE_DEV_TO_PCI (bp->eth_dev->device); pci_addr = &pci_dev->addr;
@@ -1887,3 +1919,66 @@ bnxt_ulp_cntxt_ha_enabled(struct bnxt_ulp_context *ulp_ctx)return false;return !!ULP_HIGH_AVAIL_IS_ENABLED (ulp_ctx->cfg_data->ulp_flags); } + +static int32_t +bnxt_ulp_cntxt_list_init (void ) +{ +/* Create the cntxt spin lock */ +rte_spinlock_init (&bnxt_ulp_ctxt_lock); + +return 0 ; +} + +static int32_t +bnxt_ulp_cntxt_list_add (struct bnxt_ulp_context *ulp_ctx) +{ +struct ulp_context_list_entry *entry; + + entry =rte_zmalloc (NULL ,sizeof (struct ulp_context_list_entry ),0 ); +if (entry ==NULL ) { +BNXT_TF_DBG (ERR ,"unable to allocate memory\n" ); +return -ENOMEM ; + } + +rte_spinlock_lock (&bnxt_ulp_ctxt_lock); + entry->ulp_ctx = ulp_ctx; +TAILQ_INSERT_TAIL (&ulp_cntx_list, entry, next); +rte_spinlock_unlock (&bnxt_ulp_ctxt_lock); +return 0 ; +} + +static void +bnxt_ulp_cntxt_list_del (struct bnxt_ulp_context *ulp_ctx) +{ +struct ulp_context_list_entry *entry, *temp; + +rte_spinlock_lock (&bnxt_ulp_ctxt_lock); + TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) { +if (entry->ulp_ctx == ulp_ctx) { +TAILQ_REMOVE (&ulp_cntx_list, entry, next); +rte_free (entry); +break ; + } + } +rte_spinlock_unlock (&bnxt_ulp_ctxt_lock); +} + +struct bnxt_ulp_context * +bnxt_ulp_cntxt_entry_acquire (void ) +{ +struct ulp_context_list_entry *entry; + +/* take a lock and get the first ulp context available */ +if (rte_spinlock_trylock (&bnxt_ulp_ctxt_lock)) { + TAILQ_FOREACH(entry, &ulp_cntx_list, next) +if (entry->ulp_ctx) +return entry->ulp_ctx; + } +return NULL ; +} + +void +bnxt_ulp_cntxt_entry_release (void ) +{ +rte_spinlock_unlock (&bnxt_ulp_ctxt_lock); +}
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +12 -0
@@ -112,6 +112,11 @@ struct ulp_tlv_param {uint8_t value[16 ]; }; +struct ulp_context_list_entry { +TAILQ_ENTRY (ulp_context_list_entry) next; +struct bnxt_ulp_context *ulp_ctx; +}; +/* * Allow the deletion of context only for the bnxt device that * created the session
@@ -285,4 +290,11 @@ bnxt_ulp_cntxt_ptr2_ha_info_get(struct bnxt_ulp_context *ulp_ctx);bool bnxt_ulp_cntxt_ha_enabled (struct bnxt_ulp_context *ulp_ctx); + +struct bnxt_ulp_context * +bnxt_ulp_cntxt_entry_acquire (void ); + +void +bnxt_ulp_cntxt_entry_release (void ); +#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +22 -8
@@ -197,8 +197,7 @@ ulp_fc_mgr_thread_start(struct bnxt_ulp_context *ctxt)if (ulp_fc_info && !(ulp_fc_info->flags &ULP_FLAG_FC_THREAD )) {rte_eal_alarm_set (US_PER_S *ULP_FC_TIMER , - ulp_fc_mgr_alarm_cb, - (void *)ctxt); + ulp_fc_mgr_alarm_cb,NULL ); ulp_fc_info->flags |=ULP_FLAG_FC_THREAD ; }
@@ -220,7 +219,7 @@ void ulp_fc_mgr_thread_cancel(struct bnxt_ulp_context *ctxt)return ; ulp_fc_info->flags &= ~ULP_FLAG_FC_THREAD ; -rte_eal_alarm_cancel (ulp_fc_mgr_alarm_cb, (void *)ctxt); +rte_eal_alarm_cancel (ulp_fc_mgr_alarm_cb,NULL ); }/*
@@ -363,35 +362,48 @@ static int ulp_get_single_flow_stat(struct bnxt_ulp_context *ctxt,*/ void -ulp_fc_mgr_alarm_cb (void *arg) +ulp_fc_mgr_alarm_cb(void *arg __rte_unused) {int rc =0 ;unsigned int j;enum tf_dir i; -struct bnxt_ulp_context *ctxt = arg; +struct bnxt_ulp_context *ctxt;struct bnxt_ulp_fc_info *ulp_fc_info;struct bnxt_ulp_device_params *dparms;struct tf *tfp;uint32_t dev_id, hw_cntr_id =0 , num_entries =0 ; + ctxt =bnxt_ulp_cntxt_entry_acquire (); +if (ctxt ==NULL ) { +BNXT_TF_DBG (INFO ,"could not get the ulp context lock\n" ); +rte_eal_alarm_set (US_PER_S *ULP_FC_TIMER , + ulp_fc_mgr_alarm_cb,NULL ); +return ; + } + ulp_fc_info =bnxt_ulp_cntxt_ptr2_fc_info_get (ctxt); -if (!ulp_fc_info) +if (!ulp_fc_info) { +bnxt_ulp_cntxt_entry_release ();return ; + }if (bnxt_ulp_cntxt_dev_id_get (ctxt, &dev_id)) {BNXT_TF_DBG (DEBUG ,"Failed to get device id\n" ); +bnxt_ulp_cntxt_entry_release ();return ; } dparms =bnxt_ulp_device_params_get (dev_id);if (!dparms) {BNXT_TF_DBG (DEBUG ,"Failed to device parms\n" ); +bnxt_ulp_cntxt_entry_release ();return ; } tfp =bnxt_ulp_cntxt_tfp_get (ctxt,BNXT_ULP_SHARED_SESSION_NO );if (!tfp) {BNXT_TF_DBG (ERR ,"Failed to get the truflow pointer\n" ); +bnxt_ulp_cntxt_entry_release ();return ; }
@@ -405,6 +417,7 @@ ulp_fc_mgr_alarm_cb(void *arg)if (!ulp_fc_info->num_entries) {pthread_mutex_unlock (&ulp_fc_info->fc_lock);ulp_fc_mgr_thread_cancel (ctxt); +bnxt_ulp_cntxt_entry_release ();return ; }/*
@@ -443,12 +456,13 @@ ulp_fc_mgr_alarm_cb(void *arg)if (rc) {ulp_fc_mgr_thread_cancel (ctxt); +bnxt_ulp_cntxt_entry_release ();return ; } out: +bnxt_ulp_cntxt_entry_release ();rte_eal_alarm_set (US_PER_S *ULP_FC_TIMER , - ulp_fc_mgr_alarm_cb, - (void *)ctxt); + ulp_fc_mgr_alarm_cb,NULL ); }/*
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c +15 -22
@@ -26,7 +26,7 @@#define ULP_HA_IF_TBL_IDX 10static void ulp_ha_mgr_timer_cancel (struct bnxt_ulp_context *ulp_ctx); -static int32_t ulp_ha_mgr_timer_start (struct bnxt_ulp_context *ulp_ctx); +static int32_t ulp_ha_mgr_timer_start (void );static void ulp_ha_mgr_timer_cb (void *arg);static int32_t ulp_ha_mgr_app_type_set (struct bnxt_ulp_context *ulp_ctx,enum ulp_ha_mgr_app_type app_type);
@@ -126,7 +126,7 @@ ulp_ha_mgr_app_type_set(struct bnxt_ulp_context *ulp_ctx,* - Release the flow db lock for flows to continue */ static void -ulp_ha_mgr_timer_cb (void *arg) +ulp_ha_mgr_timer_cb(void *arg __rte_unused) {struct tf_move_tcam_shared_entries_parms mparms = {0 };struct bnxt_ulp_context *ulp_ctx;
@@ -134,7 +134,13 @@ ulp_ha_mgr_timer_cb(void *arg)struct tf *tfp;int32_t rc; - ulp_ctx = (struct bnxt_ulp_context *)arg; + ulp_ctx =bnxt_ulp_cntxt_entry_acquire (); +if (ulp_ctx ==NULL ) { +BNXT_TF_DBG (INFO ,"could not get the ulp context lock\n" ); +ulp_ha_mgr_timer_start (); +return ; + } + rc =ulp_ha_mgr_state_get (ulp_ctx, &curr_state);if (rc) {/*
@@ -180,31 +186,18 @@ ulp_ha_mgr_timer_cb(void *arg)BNXT_TF_DBG (INFO ,"On HA CB: SEC[SEC_TIMER_COPY] => PRIM[PRIM_RUN]\n" ); unlock:bnxt_ulp_cntxt_release_fdb_lock (ulp_ctx); +bnxt_ulp_cntxt_entry_release ();return ; cb_restart: -ulp_ha_mgr_timer_start (ulp_ctx); +bnxt_ulp_cntxt_entry_release (); +ulp_ha_mgr_timer_start (); }static int32_t -ulp_ha_mgr_timer_start (struct bnxt_ulp_context *ulp_ctx) +ulp_ha_mgr_timer_start (void ) { -struct bnxt_ulp_ha_mgr_info *ha_info; - -if (ulp_ctx ==NULL ) { -BNXT_TF_DBG (ERR ,"Invalid parmsi for ha timer start.\n" ); -return -EINVAL ; - } - - ha_info =bnxt_ulp_cntxt_ptr2_ha_info_get (ulp_ctx); - -if (ha_info ==NULL ) { -BNXT_TF_DBG (ERR ,"Unable to get HA Info in timer start.\n" ); -return -EINVAL ; - } - ha_info->flags |=ULP_HA_TIMER_THREAD ;rte_eal_alarm_set (US_PER_S *ULP_HA_TIMER_SEC , - ulp_ha_mgr_timer_cb, - (void *)ulp_ctx); + ulp_ha_mgr_timer_cb,NULL );return 0 ; }
@@ -374,7 +367,7 @@ ulp_ha_mgr_open(struct bnxt_ulp_context *ulp_ctx)* Clear the high region so the secondary can begin overriding * the current entries. */ - rc =ulp_ha_mgr_timer_start (ulp_ctx); + rc =ulp_ha_mgr_timer_start ();if (rc) {BNXT_TF_DBG (ERR ,"Unable to start timer on HA Open.\n" );return -EINVAL ;
Signature · 1 line
2.17.1
PATCH 56/58 net/bnxt: cleanup ULP parser and mapper
In reply to Venkat DuvvuruFrom: Shahaji Bhosle <[email protected]>
1. disable accum_stats for thor
2. delete the generic port table for default flow
3. The packet mask to calculate the number of packets must be 28 bits.
4. Increase the wc tcam entries to 512 per application and add 2 shared l2 context tcam entries to match identifiers for flow scaling
5. ignore multiple critical resources in ulp flow database
6. Renamed conditional code update to function opcode.
7. Updated tf debug logs to support the above changes.
8. As part of the HA cleanup, the shared session name now allows the user to designate that the session uses the wc_tcam regions within the shared session.
9. The CFA action pointer does not exist if there is no support for VF representor, so no need to display the message for use case where there is no support for VF representors.
10. Cleanup flow counter software accumulation.
11. When an ungraceful exit of testpmd happens, the HA code now clears the appropriate shared WC region and sets the HA state.
12. Removal of unnecessary INFO message. The message is an indicator that the ports are being removed from dpdk, but all cleanup has not completed. Once the cleanup is completed, the timer will be stopped.
--- drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h | 4 +- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h | 8 +- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c | 2 +- drivers/net/bnxt/tf_core/bitalloc.h | 2 +- drivers/net/bnxt/tf_core/cfa_resource_types.h | 2 +- drivers/net/bnxt/tf_core/dpool.h | 10 +- drivers/net/bnxt/tf_core/tf_core.h | 8 +- drivers/net/bnxt/tf_core/tf_em.h | 2 +- drivers/net/bnxt/tf_core/tf_session.h | 2 +- drivers/net/bnxt/tf_core/tf_shadow_tcam.c | 2 +- drivers/net/bnxt/tf_core/tfp.h | 6 +- drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 378 + drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h | 29 + drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 102 +- drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 4 + drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 1 + drivers/net/bnxt/tf_ulp/meson.build | 1 + drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 3 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 103 +- drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 + drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 14 +- drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 2 +- drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 14 +- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 197 +- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 153 +- drivers/net/bnxt/tf_ulp/ulp_mapper.h | 6 +- drivers/net/bnxt/tf_ulp/ulp_port_db.c | 43 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 38 +- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 2 +- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 92 +- drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c | 158 +- .../bnxt/tf_ulp/ulp_template_db_thor_act.c | 185 +- .../bnxt/tf_ulp/ulp_template_db_thor_class.c | 29120 +++++++++++++++- .../tf_ulp/ulp_template_db_wh_plus_class.c | 76 +- drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 20 +- drivers/net/bnxt/tf_ulp/ulp_utils.c | 8 +- drivers/net/bnxt/tf_ulp/ulp_utils.h | 4 +- 37 files changed, 30000 insertions(+), 802 deletions(-) create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +2 -2
@@ -44,7 +44,7 @@ struct hcapi_cfa_devinfo {/** CFA device specific function hooks structure * * The following device hooks can be defined; unless noted otherwise, they are -* optional and can be filled with a null pointer. The pupose of these hooks +* optional and can be filled with a null pointer. The purpose of these hooks * to support CFA device operations for different device variants. */ struct hcapi_cfa_devops {
@@ -93,7 +93,7 @@ struct hcapi_cfa_devops {* is stored. It holds the bucket index and the data pointer of * a dynamic bucket that is chained to static bucket * When using the HWOP GET, this is a pointer to the key location -* which should be retreved. +* which should be retrieved. * * (valid for SR2 only). * @return
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h +4 -4
@@ -100,7 +100,7 @@ enum hcapi_cfa_hwops {* operation is also undo the add operation * performed by the HCAPI_CFA_HWOPS_ADD op. */ - HCAPI_CFA_HWOPS_EVICT, /*< This operaton is used to evit entries from + HCAPI_CFA_HWOPS_EVICT, /*< This operation is used to edit entries from* CFA cache memories. This operation is only * applicable to tables that use CFA caches. */
@@ -231,7 +231,7 @@ struct hcapi_cfa_key_tbl {uint32_t size;/** [in] number of key buckets, applicable for newer chips */ uint32_t num_buckets; -/** [in] For EEM, this is KEY1 base mem pointer. Fo off-chip EM, +/** [in] For EEM, this is KEY1 base mem pointer. For off-chip EM, * this is the key record memory base pointer within the key table, * applicable for newer chip */
@@ -273,8 +273,8 @@ struct hcapi_cfa_key_data {uint8_t tbl_scope;/** [in] the fid owner of the key */ uint64_t metadata; -/** [in] stored with the bucket which can be used to by -* the caller to retreved later via the GET HW OP. +/** [in] stored with the bucket which can be used by +* the caller to retrieve later via the GET HW OP. */ };
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c +1 -1
@@ -230,7 +230,7 @@ static int hcapi_cfa_p4_key_hw_op_del(struct hcapi_cfa_hwop *op,return rc; } -/** Apporiximation of hcapi_cfa_key_hw_op() +/** Approximation of hcapi_cfa_key_hw_op() * * */
drivers/net/bnxt/tf_core/bitalloc.h +1 -1
@@ -60,7 +60,7 @@ struct bitalloc {#define BA_NO_ENTRY_FOUND -1/** -* Initializates the bitallocator +* Initializes the bitallocator * * Returns 0 on success, -1 on failure. Size is arbitrary up to * BITALLOC_MAX_SIZE
drivers/net/bnxt/tf_core/cfa_resource_types.h +1 -1
@@ -57,7 +57,7 @@#define CFA_RESOURCE_TYPE_P59_RANGE_PROF 0x15UL/* Range */ #define CFA_RESOURCE_TYPE_P59_RANGE 0x16UL -/* Link Aggrigation */ +/* Link Aggregation */ #define CFA_RESOURCE_TYPE_P59_LAG 0x17UL/* VEB TCAM */ #define CFA_RESOURCE_TYPE_P59_VEB_TCAM 0x18UL
drivers/net/bnxt/tf_core/dpool.h +5 -5
@@ -49,7 +49,7 @@ struct dpool_free_list_entry {* Free list * * Used internally to record free entries in the dpool entry array. -* Each entry represents a single or multiple contiguious entries +* Each entry represents a single or multiple contiguous entries * in the dpool entry array. * * Used only during the defrag operation.
@@ -98,7 +98,7 @@ struct dpool_adj_list_entry {* * A list of references to entries in the dpool entry array that * have free entries to the left and right. Since we pack to the -* left entries will always have a non zero left cout. +* left entries will always have a non zero left out. * * Used only during the defrag operation. */
@@ -281,17 +281,17 @@ void dpool_dump(struct dpool *dpool);/** * dpool_defrag * -* De-fragment the dpool array and apply the specified defrag stratagy. +* De-fragment the dpool array and apply the specified defrag strategy. * * [in] dpool * The dpool * * [in] entry_size -* If using the DP_DEFRAG_TO_FIT stratagy defrag will stop when there's +* If using the DP_DEFRAG_TO_FIT strategy defrag will stop when there's * at least entry_size space available. * * [i] defrag -* Defrag stratagy: +* Defrag strategy: * * DP_DEFRAG_ALL (0x1) - Defrag until there is nothing left * to defrag.
drivers/net/bnxt/tf_core/tf_core.h +4 -4
@@ -396,7 +396,7 @@ enum tf_search_status {enum tf_em_tbl_type {/** The number of internal EM records for the session */ TF_EM_TBL_TYPE_EM_RECORD , -/** The number of table scopes reequested */ +/** The number of table scopes requested */ TF_EM_TBL_TYPE_TBL_SCOPE ,TF_EM_TBL_TYPE_MAX };
@@ -415,7 +415,7 @@ enum tf_em_tbl_type {*/ struct tf_session_info {/** -* TrueFlow Version. Used to control the structure layout when +* TruFlow Version. Used to control the structure layout when * sharing sessions. No guarantee that a secondary process * would come from the same version of an executable. * TruFlow initializes this variable on tf_open_session().
@@ -520,7 +520,7 @@ struct tf_identifier_resources {struct tf_tbl_resources {/** * Array of TF Table types where each entry is expected to be -* set to the requeste resource number of that specific +* set to the requested resource number of that specific * type. The index used is tf_tbl_type. */ uint16_t cnt[TF_TBL_TYPE_MAX ];
@@ -1677,7 +1677,7 @@ struct tf_search_tbl_entry_parms {* * Implementation: * -* A hash is performed on the result data and mappe3d to a shadow copy entry +* A hash is performed on the result data and mapped to a shadow copy entry * where the result is populated. If the result matches the entry, hit is set, * ref_cnt is incremented (if alloc), and the search status indicates what * action the caller can take regarding setting the entry.
drivers/net/bnxt/tf_core/tf_em.h +1 -1
@@ -95,7 +95,7 @@* | Index |E | * +--------------+--+ * -* E = Entry (bucket inndex) +* E = Entry (bucket index) */ #define TF_EM_INTERNAL_INDEX_SHIFT 2#define TF_EM_INTERNAL_INDEX_MASK 0xFFFC
drivers/net/bnxt/tf_core/tf_session.h +1 -1
@@ -59,7 +59,7 @@* tf_session_info. */ struct tf_session { -/** TrueFlow Version. Used to control the structure layout +/** TruFlow Version. Used to control the structure layout * when sharing sessions. No guarantee that a secondary * process would come from the same version of an executable. */
drivers/net/bnxt/tf_core/tf_shadow_tcam.c +1 -1
@@ -25,7 +25,7 @@* - the result table is stored separately since it only needs to be accessed * when the key matches. * - the result has a back pointer to the hash table via the hb handle. The -* hb handle is a 32 bit represention of the hash with a valid bit, bucket +* hb handle is a 32 bit representation of the hash with a valid bit, bucket * element index, and the hash index. It is necessary to store the hb handle * with the result since subsequent removes only provide the tcam index. *
drivers/net/bnxt/tf_core/tfp.h +3 -3
@@ -38,7 +38,7 @@ struct tfp_spinlock_parms {/** * @file * -* TrueFlow Portability API Header File +* TruFlow Portability API Header File */ /**
@@ -119,8 +119,8 @@ struct tfp_calloc_parms {*/ /** -* Provides communication capability from the TrueFlow API layer to -* the TrueFlow firmware. The portability layer internally provides +* Provides communication capability from the TruFlow API layer to +* the TruFlow firmware. The portability layer internally provides * the transport to the firmware. * * [in] session, pointer to session handle
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c new file +378 -0
378 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2021-2021 Broadcom +* All rights reserved. +*/ + +#ifndef _BNXT_TF_PMD_ABSTRACT_H_ +#define _BNXT_TF_PMD_ABSTRACT_H_ + +#include "bnxt_tf_common.h" +#include "ulp_mapper.h" + +int32_t bnxt_rss_config_action_apply (struct bnxt_ulp_mapper_parms *parms); +int32_t bnxt_pmd_get_parent_mac_addr (struct bnxt_ulp_mapper_parms *parms, +uint8_t *mac); +void bnxt_pmd_get_iface_mac (uint16_t port,enum bnxt_ulp_intf_type type, +uint8_t *mac,uint8_t *parent_mac); +uint16_t bnxt_pmd_get_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type); +uint16_t bnxt_pmd_get_parent_vnic_id (uint16_t port,enum bnxt_ulp_intf_type type); +struct bnxt *bnxt_pmd_get_bp (uint16_t port); +uint16_t bnxt_pmd_get_svif (uint16_t port_id,bool func_svif, +enum bnxt_ulp_intf_type type); +uint16_t bnxt_pmd_get_fw_func_id (uint16_t port,enum bnxt_ulp_intf_type type); +uint16_t bnxt_pmd_get_parif (uint16_t port,enum bnxt_ulp_intf_type type); +uint16_t bnxt_pmd_get_phy_port_id (uint16_t port); +uint16_t bnxt_pmd_get_vport (uint16_t port); +enum bnxt_ulp_intf_type bnxt_pmd_get_interface_type (uint16_t port); +int32_t bnxt_pmd_set_unicast_rxmask (struct rte_eth_dev *eth_dev); + +#endif /* _BNXT_TF_PMD_ABSTRACT_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp.c +81 -21
213 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/bnxt_ulp.h +4 -0
@@ -32,6 +32,7 @@#define BNXT_ULP_SHARED_SESSION_ENABLED 0x2#define BNXT_ULP_APP_DEV_UNSUPPORTED 0x4#define BNXT_ULP_HIGH_AVAIL_ENABLED 0x8 +#define BNXT_ULP_APP_UNICAST_ONLY 0x10#define ULP_VF_REP_IS_ENABLED (flag) ((flag) & BNXT_ULP_VF_REP_ENABLED)#define ULP_SHARED_SESSION_IS_ENABLED (flag) ((flag) &\ BNXT_ULP_SHARED_SESSION_ENABLED)
@@ -77,6 +78,7 @@ struct bnxt_ulp_data {struct bnxt_tun_cache_entry tun_tbl[BNXT_ULP_MAX_TUN_CACHE_ENTRIES ];bool accum_stats;uint8_t app_id; +uint8_t num_shared_clients; };struct bnxt_ulp_context {
@@ -297,4 +299,6 @@ bnxt_ulp_cntxt_entry_acquire(void);void bnxt_ulp_cntxt_entry_release (void ); +uint8_t +bnxt_ulp_cntxt_num_shared_clients_get (struct bnxt_ulp_context *ulp_ctx);#endif /* _BNXT_ULP_H_ */
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c +1 -0
@@ -103,6 +103,7 @@ bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms, mapper_cparms->flow_pattern_id = params->flow_pattern_id; mapper_cparms->act_pattern_id = params->act_pattern_id; mapper_cparms->app_id = params->app_id; + mapper_cparms->port_id = params->port_id;/* update the signature fields into the computed field list */ ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_HDR_SIG_ID,
drivers/net/bnxt/tf_ulp/meson.build +1 -0
@@ -22,6 +22,7 @@ sources += files( 'ulp_def_rules.c', 'ulp_fc_mgr.c', 'ulp_tun.c', + 'bnxt_tf_pmd_shim.c', 'ulp_gen_tbl.c', 'ulp_gen_hash.c', 'ulp_ha_mgr.c',
drivers/net/bnxt/tf_ulp/ulp_def_rules.c +2 -1
@@ -299,7 +299,7 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev, uint32_t *flow_id) {struct ulp_rte_hdr_field hdr_field[BNXT_ULP_PROTO_HDR_MAX ]; -uint32_t comp_fld[BNXT_ULP_CF_IDX_LAST ]; +uint64_t comp_fld[BNXT_ULP_CF_IDX_LAST ];struct bnxt_ulp_mapper_create_parms mapper_params = {0 };struct ulp_rte_act_prop act_prop;struct ulp_rte_act_bitmap act = {0 };
@@ -318,6 +318,7 @@ ulp_default_flow_create(struct rte_eth_dev *eth_dev, mapper_params.comp_fld = comp_fld; mapper_params.class_tid = ulp_class_tid; mapper_params.flow_type =BNXT_ULP_FDB_TYPE_DEFAULT ; + mapper_params.port_id = eth_dev->data->port_id; ulp_ctx =bnxt_ulp_eth_dev_ptr2_cntxt_get (eth_dev);if (!ulp_ctx) {
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c +93 -10
152 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h +1 -0
@@ -48,6 +48,7 @@ struct bnxt_ulp_fc_info {uint32_t flags;uint32_t num_entries;pthread_mutex_t fc_lock; +uint32_t num_counters; };int32_t
drivers/net/bnxt/tf_ulp/ulp_flow_db.c +10 -4
@@ -116,7 +116,7 @@ ulp_flow_db_resource_func_get(struct ulp_fdb_resource_info *res_info) func = (((res_info->nxt_resource_idx &ULP_FLOW_DB_RES_FUNC_MASK ) >>ULP_FLOW_DB_RES_FUNC_BITS ) <<ULP_FLOW_DB_RES_FUNC_UPPER ); -/* The reource func is split into upper and lower */ +/* The resource func is split into upper and lower */ if (func &ULP_FLOW_DB_RES_FUNC_NEED_LOWER )return (func | res_info->resource_func_lower);return func;
@@ -712,6 +712,12 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt, } fid_resource = &flow_tbl->flow_resources[fid]; +if (params->critical_resource && fid_resource->resource_em_handle) { +BNXT_TF_DBG (DEBUG ,"Ignore multiple critical resources\n" ); +/* Ignore the multiple critical resources */ + params->critical_resource =BNXT_ULP_CRITICAL_RESOURCE_NO ; + } +if (!params->critical_resource) {/* Not the critical_resource so allocate a resource */ idx = flow_tbl->flow_tbl_stack[flow_tbl->tail_index];
@@ -735,7 +741,7 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,if (params->resource_type ==TF_TBL_TYPE_ACT_STATS_64 && params->resource_sub_type ==BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TABLE_INT_COUNT && - ulp_fc_info) { + ulp_fc_info && ulp_fc_info->num_counters) {/* Store the first HW counter ID for this table */ if (!ulp_fc_mgr_start_idx_isset (ulp_ctxt, params->direction)) ulp_fc_mgr_start_idx_set(ulp_ctxt, params->direction,
@@ -760,7 +766,7 @@ ulp_flow_db_resource_add(struct bnxt_ulp_context *ulp_ctxt,* flow_type [in] Specify it is regular or default flow * fid [in] The index to the flow entry * params [in/out] The contents to be copied into params. -* Onlythe critical_resource needs to be set by the caller. +* Only the critical_resource needs to be set by the caller. * * Returns 0 on success and negative on failure. */
@@ -1287,7 +1293,7 @@ ulp_default_flow_db_cfa_action_get(struct bnxt_ulp_context *ulp_ctx,BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE , sub_typ, ¶ms);if (rc) { -BNXT_TF_DBG (ERR ,"CFA Action ptr not found for flow id %u\n" , +BNXT_TF_DBG (INFO ,"CFA Action ptr not found for flow id %u\n" , flow_id);return -ENOENT ; }
drivers/net/bnxt/tf_ulp/ulp_flow_db.h +1 -1
@@ -18,7 +18,7 @@/* * Structure for the flow database resource information -* The below structure is based on the below paritions +* The below structure is based on the below partitions * nxt_resource_idx = dir[31],resource_func_upper[30:28],nxt_resource_idx[27:0] * If resource_func is EM_TBL then use resource_em_handle. * Else the other part of the union is used and
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c +9 -5
@@ -346,11 +346,15 @@ ulp_mapper_gen_tbl_res_free(struct bnxt_ulp_context *ulp_ctx,return -EINVAL ; } fid =tfp_be_to_cpu_32 (fid); - -/* Destroy the flow associated with the shared flow id */ -if (ulp_mapper_flow_destroy (ulp_ctx,BNXT_ULP_FDB_TYPE_RID , - fid)) -BNXT_TF_DBG (ERR ,"Error in deleting shared flow id %x\n" , fid); +/* no need to del if fid is 0 since there is no associated resource */ +if (fid) { +/* Destroy the flow associated with the shared flow id */ +if (ulp_mapper_flow_destroy (ulp_ctx,BNXT_ULP_FDB_TYPE_RID , + fid)) +BNXT_TF_DBG (ERR , +"Error in deleting shared flow id %x\n" , + fid); + }/* Delete the entry from the hash table */ if (gen_tbl_list->hash_tbl)
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c +145 -52
301 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.c +94 -59
257 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_mapper.h +4 -2
@@ -46,7 +46,7 @@ struct bnxt_ulp_mapper_parms {struct ulp_rte_hdr_bitmap *hdr_bitmap;struct ulp_rte_hdr_field *hdr_field;struct ulp_rte_field_bitmap *fld_bitmap; -uint32_t *comp_fld; +uint64_t *comp_fld;struct ulp_regfile *regfile;struct bnxt_ulp_context *ulp_ctx;uint32_t fid;
@@ -61,13 +61,14 @@ struct bnxt_ulp_mapper_parms {uint32_t flow_pattern_id;uint32_t act_pattern_id;uint8_t app_id; +uint16_t port_id; };struct bnxt_ulp_mapper_create_parms {uint32_t app_priority;struct ulp_rte_hdr_bitmap *hdr_bitmap;struct ulp_rte_hdr_field *hdr_field; -uint32_t *comp_fld; +uint64_t *comp_fld;struct ulp_rte_act_bitmap *act;struct ulp_rte_act_prop *act_prop;struct ulp_rte_field_bitmap *fld_bitmap;
@@ -89,6 +90,7 @@ struct bnxt_ulp_mapper_create_parms {uint32_t flow_pattern_id;uint32_t act_pattern_id;uint8_t app_id; +uint16_t port_id; };/* Function to initialize any dynamic mapper data. */
drivers/net/bnxt/tf_ulp/ulp_port_db.c +22 -21
85 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +28 -10
@@ -201,8 +201,7 @@ bnxt_ulp_comp_fld_intf_update(struct ulp_rte_parser_params *params) dir =ULP_COMP_FLD_IDX_RD (params,BNXT_ULP_CF_IDX_DIRECTION );/* read the port id details */ - port_id =ULP_COMP_FLD_IDX_RD (params, -BNXT_ULP_CF_IDX_INCOMING_IF ); + port_id =ULP_COMP_FLD_IDX_RD (params,BNXT_ULP_CF_IDX_INCOMING_IF );if (ulp_port_db_dev_port_to_ulp_index (params->ulp_ctx, port_id, &ifindex)) {
@@ -856,7 +855,7 @@ ulp_rte_vlan_hdr_handler(const struct rte_flow_item *item, BNXT_ULP_HDR_BIT_II_VLAN); inner_flag =1 ; }else { -BNXT_TF_DBG (ERR ,"Error Parsing:Vlan hdr found withtout eth\n" ); +BNXT_TF_DBG (ERR ,"Error Parsing:Vlan hdr found without eth\n" );return BNXT_TF_RC_ERROR ; }/* Update the field protocol hdr bitmap */
@@ -1691,15 +1690,34 @@ int32_t ulp_rte_rss_act_handler(const struct rte_flow_action *action_item, struct ulp_rte_parser_params *param) { - const struct rte_flow_action_rss *rss = action_item->conf; + const struct rte_flow_action_rss *rss; +struct ulp_rte_act_prop *ap = ¶m->act_prop; -if (rss) { -/* Update the hdr_bitmap with vxlan */ -ULP_BITMAP_SET (param->act_bitmap.bits,BNXT_ULP_ACT_BIT_RSS ); -return BNXT_TF_RC_SUCCESS ; +if (action_item ==NULL || action_item->conf ==NULL ) { +BNXT_TF_DBG (ERR ,"Parse Err: invalid rss configuration\n" ); +return BNXT_TF_RC_ERROR ; } -BNXT_TF_DBG (ERR ,"Parse Error: RSS arg is invalid\n" ); -return BNXT_TF_RC_ERROR ; + + rss = action_item->conf; +/* Copy the rss into the specific action properties */ +memcpy (&ap->act_details[BNXT_ULP_ACT_PROP_IDX_RSS_TYPES ], &rss->types, +BNXT_ULP_ACT_PROP_SZ_RSS_TYPES ); +memcpy (&ap->act_details[BNXT_ULP_ACT_PROP_IDX_RSS_LEVEL ], &rss->level, +BNXT_ULP_ACT_PROP_SZ_RSS_LEVEL ); +memcpy (&ap->act_details[BNXT_ULP_ACT_PROP_IDX_RSS_KEY_LEN ], + &rss->key_len,BNXT_ULP_ACT_PROP_SZ_RSS_KEY_LEN ); + +if (rss->key_len >BNXT_ULP_ACT_PROP_SZ_RSS_KEY ) { +BNXT_TF_DBG (ERR ,"Parse Err: RSS key too big\n" ); +return BNXT_TF_RC_ERROR ; + } +memcpy (&ap->act_details[BNXT_ULP_ACT_PROP_IDX_RSS_KEY ], rss->key, + rss->key_len); + +/* set the RSS action header bit */ +ULP_BITMAP_SET (param->act_bitmap.bits,BNXT_ULP_ACT_BIT_RSS ); + +return BNXT_TF_RC_SUCCESS ; }/* Function to handle the parsing of RTE Flow action vxlan_encap Header. */
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +1 -1
@@ -24,7 +24,7 @@#define BNXT_ULP_ENCAP_IPV6_DO 2#define BNXT_ULP_ENCAP_IPV6_SIZE 24#define BNXT_ULP_ENCAP_UDP_SIZE 4 -#define BNXT_ULP_INVALID_SVIF_VAL -1U +#define BNXT_ULP_INVALID_SVIF_VAL -1UL#define BNXT_ULP_GET_IPV6_VER (vtcf) \ (((vtcf) & BNXT_ULP_PARSER_IPV6_VER_MASK) >> 28)
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +53 -39
152 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +131 -27
348 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c +176 -9
204 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_thor_class.c +28658 -462
481 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +38 -38
76 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_struct.h +10 -10
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 57/58 net/bnxt: reorganize ULP template directory structure
In reply to Venkat DuvvuruReorganize ulp template directory structure and add meson.build file to the respective directories.
---
.../bnxt/tf_ulp/generic_templates/meson.build | 13 +
.../ulp_template_db_act.c | 0
.../ulp_template_db_class.c | 0
.../ulp_template_db_enum.h | 0
.../ulp_template_db_field.h | 0
.../ulp_template_db_tbl.c | 0
.../ulp_template_db_tbl.h | 0
.../ulp_template_db_thor_act.c | 0
.../ulp_template_db_thor_class.c | 0
.../ulp_template_db_wh_plus_act.c | 0
.../ulp_template_db_wh_plus_class.c | 0
drivers/net/bnxt/tf_ulp/meson.build | 11 +-
drivers/net/bnxt/tf_ulp/ulp_template_db.c | 4622 -----------------
drivers/net/bnxt/tf_ulp/ulp_template_db.h | 614 ---
.../net/bnxt/tf_ulp/ulp_template_field_db.h | 224 -
15 files changed, 16 insertions(+), 5468 deletions(-)
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/meson.build
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_act.c (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_class.c (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_enum.h (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_field.h (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_tbl.c (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_tbl.h (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_thor_act.c (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_thor_class.c (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_wh_plus_act.c (100%)
rename drivers/net/bnxt/tf_ulp/{ => generic_templates}/ulp_template_db_wh_plus_class.c (100%)
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db.h
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_field_db.hdrivers/net/bnxt/tf_ulp/generic_templates/meson.build new file +13 -0
@@ -0,0 +1,13 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation +# Copyright(c) 2020 Broadcom + +includes += include_directories('.') +sources += files( + 'ulp_template_db_class.c', + 'ulp_template_db_act.c', + 'ulp_template_db_tbl.c', + 'ulp_template_db_wh_plus_act.c', + 'ulp_template_db_wh_plus_class.c', + 'ulp_template_db_thor_act.c', + 'ulp_template_db_thor_class.c')
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_act.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_act.c +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_class.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_field.h renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_field.h +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.c +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.h renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_act.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_thor_act.c +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_thor_class.c +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_act.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c +0 -0
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_class.c renamed from drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c +0 -0
drivers/net/bnxt/tf_ulp/meson.build +3 -8
@@ -10,9 +10,6 @@ sources += files( 'bnxt_ulp.c', 'ulp_mark_mgr.c', 'ulp_flow_db.c', - 'ulp_template_db_tbl.c', - 'ulp_template_db_class.c', - 'ulp_template_db_act.c', 'ulp_utils.c', 'ulp_mapper.c', 'ulp_matcher.c',
@@ -26,8 +23,6 @@ sources += files( 'ulp_gen_tbl.c', 'ulp_gen_hash.c', 'ulp_ha_mgr.c', - 'ulp_rte_handler_tbl.c', - 'ulp_template_db_wh_plus_act.c', - 'ulp_template_db_wh_plus_class.c', - 'ulp_template_db_thor_act.c', - 'ulp_template_db_thor_class.c') + 'ulp_rte_handler_tbl.c') + +subdir('generic_templates')
drivers/net/bnxt/tf_ulp/ulp_template_db.c deleted +0 -4622
2,967 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_db.h deleted +0 -614
614 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/ulp_template_field_db.h deleted +0 -224
224 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 58/58 net/bnxt: add Thor template support
In reply to Venkat DuvvuruFrom: Mike Baucom <[email protected]>
Template adds non-VFR based support for testpmd with:
matches to include
- DMAC, SIP, DIP, Proto, Sport, Dport
- SIP, DIP, Proto, Sport, Dport
actions:
- count, drop
--- .../generic_templates/ulp_template_db_enum.h | 71 +- .../generic_templates/ulp_template_db_tbl.c | 278 +- .../ulp_template_db_thor_act.c | 48 +- .../ulp_template_db_thor_class.c | 31252 ++-------------- .../ulp_template_db_wh_plus_act.c | 156 +- .../ulp_template_db_wh_plus_class.c | 458 +- 6 files changed, 4697 insertions(+), 27566 deletions(-)
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h +40 -31
@@ -3,7 +3,7 @@* All rights reserved. */ -/* date: Wed Apr 14 09:56:27 2021 */ +/* date: Thu May 13 18:15:56 2021 */ #ifndef ULP_TEMPLATE_DB_H_ #define ULP_TEMPLATE_DB_H_
@@ -26,10 +26,10 @@#define BNXT_ULP_ACT_HID_SHFTR 27#define BNXT_ULP_ACT_HID_SHFTL 26#define BNXT_ULP_ACT_HID_MASK 2047 -#define BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ 4 -#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33 -#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 38 -#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 205 +#define BNXT_ULP_APP_RESOURCE_RESV_LIST_MAX_SZ 8 +#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 43 +#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 50 +#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 204#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 6#define BNXT_ULP_COND_GOTO_REJECT 1023#define BNXT_ULP_COND_GOTO_RF 0x10000
@@ -44,11 +44,11 @@#define ULP_WH_PLUS_CLASS_RESULT_FIELD_LIST_SIZE 546#define ULP_WH_PLUS_CLASS_COND_LIST_SIZE 43#define ULP_THOR_CLASS_TMPL_LIST_SIZE 5 -#define ULP_THOR_CLASS_TBL_LIST_SIZE 13 -#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 0 -#define ULP_THOR_CLASS_IDENT_LIST_SIZE 0 -#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 102 -#define ULP_THOR_CLASS_COND_LIST_SIZE 1 +#define ULP_THOR_CLASS_TBL_LIST_SIZE 33 +#define ULP_THOR_CLASS_KEY_INFO_LIST_SIZE 242 +#define ULP_THOR_CLASS_IDENT_LIST_SIZE 8 +#define ULP_THOR_CLASS_RESULT_FIELD_LIST_SIZE 259 +#define ULP_THOR_CLASS_COND_LIST_SIZE 13#define ULP_WH_PLUS_ACT_TMPL_LIST_SIZE 7#define ULP_WH_PLUS_ACT_TBL_LIST_SIZE 35#define ULP_WH_PLUS_ACT_KEY_INFO_LIST_SIZE 2
@@ -56,11 +56,11 @@#define ULP_WH_PLUS_ACT_RESULT_FIELD_LIST_SIZE 512#define ULP_WH_PLUS_ACT_COND_LIST_SIZE 39#define ULP_THOR_ACT_TMPL_LIST_SIZE 7 -#define ULP_THOR_ACT_TBL_LIST_SIZE 0 +#define ULP_THOR_ACT_TBL_LIST_SIZE 2#define ULP_THOR_ACT_KEY_INFO_LIST_SIZE 0#define ULP_THOR_ACT_IDENT_LIST_SIZE 0 -#define ULP_THOR_ACT_RESULT_FIELD_LIST_SIZE 0 -#define ULP_THOR_ACT_COND_LIST_SIZE 0 +#define ULP_THOR_ACT_RESULT_FIELD_LIST_SIZE 18 +#define ULP_THOR_ACT_COND_LIST_SIZE 5enum bnxt_ulp_act_bit {BNXT_ULP_ACT_BIT_MARK =0x0000000000000001 ,
@@ -199,7 +199,8 @@ enum bnxt_ulp_cf_idx {BNXT_ULP_CF_IDX_FLOW_SIG_ID =60 ,BNXT_ULP_CF_IDX_WC_MATCH =61 ,BNXT_ULP_CF_IDX_WC_IS_HA_HIGH_REG =62 , -BNXT_ULP_CF_IDX_LAST =63 +BNXT_ULP_CF_IDX_F1_DMAC =63 , +BNXT_ULP_CF_IDX_LAST =64 }; enum bnxt_ulp_cond_list_opc {
@@ -345,23 +346,31 @@ enum bnxt_ulp_glb_rf_idx {BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID =3 ,BNXT_ULP_GLB_RF_IDX_VXLAN_PROF_FUNC_ID =4 ,BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR =5 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0 =6 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_1 =7 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_2 =8 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0 =9 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1 =10 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0 =11 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_1 =12 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0 =13 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_1 =14 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_2 =15 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0 =16 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_1 =17 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 =18 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_1 =19 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0 =20 , -BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_1 =21 , -BNXT_ULP_GLB_RF_IDX_LAST =22 +BNXT_ULP_GLB_RF_IDX_GLB_WC_PROFILE_ID_0 =6 , +BNXT_ULP_GLB_RF_IDX_GLB_WC_PROFILE_ID_1 =7 , +BNXT_ULP_GLB_RF_IDX_GLB_EM_PROFILE_ID_0 =8 , +BNXT_ULP_GLB_RF_IDX_GLB_EM_PROFILE_ID_1 =9 , +BNXT_ULP_GLB_RF_IDX_GLB_WC_KEY_ID_0 =10 , +BNXT_ULP_GLB_RF_IDX_GLB_WC_KEY_ID_1 =11 , +BNXT_ULP_GLB_RF_IDX_GLB_EM_KEY_ID_0 =12 , +BNXT_ULP_GLB_RF_IDX_GLB_EM_KEY_ID_1 =13 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0 =14 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_1 =15 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_2 =16 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0 =17 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1 =18 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0 =19 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_1 =20 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0 =21 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_1 =22 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_2 =23 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0 =24 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_1 =25 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 =26 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_1 =27 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_0 =28 , +BNXT_ULP_GLB_RF_IDX_APP_GLB_AREC_PTR_1 =29 , +BNXT_ULP_GLB_RF_IDX_LAST =30 }; enum bnxt_ulp_hdr_type {
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c +242 -36
509 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_act.c +37 -11
112 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c +4087 -27165
2,270 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_act.c +78 -78
156 lines not on this page · raw message
drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_class.c +213 -245
458 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
v2 cover enhancements to host based flow table management
In reply to Venkat DuvvuruThis patchset adds flow table management support for Thor network adapter and introduces enhancements to the existing flow table management functionality.
v1->v2:
- Rebased against latest dpdk-next-net-brcm for-next-net branch.
- Fixed typo errors in some of the patches
- Address some issues encountered while applying patches
- Changed log levels for some log messages to debug
- Cleaned up some unused code
Farah Smith (11):
net/bnxt: add base TRUFLOW support for Thor net/bnxt: update TRUFLOW resources net/bnxt: add action SRAM translation net/bnxt: add 64B SRAM record management with RM net/bnxt: modify TRUFLOW HWRM messages net/bnxt: shared TCAM region support net/bnxt: cleanup logs in session handling paths net/bnxt: add WC TCAM management support net/bnxt: add API to get shared table increments net/bnxt: cleanup WC TCAM shared pool net/bnxt: add API to clear TCAM regions
Jay Ding (9):
net/bnxt: check resource reservation in TRUFLOW net/bnxt: support L2 Context TCAM ops net/bnxt: add Thor WC TCAM support net/bnxt: change RM database type net/bnxt: add shared session support net/bnxt: update shared session functionality net/bnxt: modify resource reservation strategy net/bnxt: refactor host session failure cleanup net/bnxt: add support for WC TCAM shared session
Jeffrey Huang (1):
net/bnxt: add CFA folder to HCAPI directory
Kishore Padmanabha (23):
net/bnxt: add support for generic table processing net/bnxt: add support for mapper flow database opcodes net/bnxt: modify TCAM opcode processing net/bnxt: modify table processing
net/bnxt: add ULP priority opcode processing net/bnxt: add support to identify duplicate flows net/bnxt: add conditional goto processing net/bnxt: set shared handle for generic table net/bnxt: modify ULP template
net/bnxt: add conditional opcode and L4 port fields net/bnxt: refactor TRUFLOW processing net/bnxt: add partial header field processing net/bnxt: add support for wild card pattern match net/bnxt: enable extended exact match support net/bnxt: refactor ULP mapper
net/bnxt: add support for generic hash table net/bnxt: add support for Thor platform net/bnxt: refactor flow parser in ULP net/bnxt: add field opcodes in ULP
net/bnxt: add support for application ID in ULP matcher net/bnxt: add templates for shared sessions net/bnxt: add ICMPv6 parser to ULP
net/bnxt: add context list for timers
Mike Baucom (5):
net/bnxt: add conditional processing of templates net/bnxt: add shared session support to ULP net/bnxt: process resource lists before session open net/bnxt: add HA support in ULP
net/bnxt: add Thor template support
Peter Spreadborough (4):
net/bnxt: add mailbox selection via dev op
net/bnxt: add support for EM with FKB
net/bnxt: add hashing changes for Thor
net/bnxt: add dpool allocator for EM allocation
Shahaji Bhosle (1):
net/bnxt: cleanup ULP parser and mapper
Venkat Duvvuru (4):
net/bnxt: check FW capability to support TRUFLOW net/bnxt: modify VXLAN decap for multichannel mode net/bnxt: add support for GRE flows net/bnxt: reorganize ULP template directory structure
doc/guides/nics/bnxt.rst | 3 +-
drivers/net/bnxt/bnxt.h | 19 +-
drivers/net/bnxt/bnxt_ethdev.c | 162 +-
drivers/net/bnxt/bnxt_hwrm.c | 7 +-
drivers/net/bnxt/bnxt_util.h | 3 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h | 126 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c | 83 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h | 381 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c | 289 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.h | 185 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c | 120 +
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h | 142 +
drivers/net/bnxt/hcapi/cfa/meson.build | 12 +
drivers/net/bnxt/hcapi/cfa_p40_hw.h | 781 -
drivers/net/bnxt/hcapi/cfa_p40_tbl.h | 303 -
drivers/net/bnxt/hcapi/hcapi_cfa.h | 295 -
drivers/net/bnxt/hcapi/hcapi_cfa_defs.h | 672 -
drivers/net/bnxt/hcapi/hcapi_cfa_p4.c | 399 -
drivers/net/bnxt/hcapi/hcapi_cfa_p4.h | 467 -
drivers/net/bnxt/hsi_struct_def_dpdk.h | 250 +-
drivers/net/bnxt/meson.build | 65 +-
drivers/net/bnxt/tf_core/bitalloc.c | 10 +-
drivers/net/bnxt/tf_core/bitalloc.h | 5 +-
drivers/net/bnxt/tf_core/cfa_resource_types.h | 3 +-
drivers/net/bnxt/tf_core/dpool.c | 374 +
drivers/net/bnxt/tf_core/dpool.h | 309 +
drivers/net/bnxt/tf_core/hwrm_tf.h | 195 -
drivers/net/bnxt/tf_core/lookup3.h | 2 +-
drivers/net/bnxt/tf_core/meson.build | 36 +
drivers/net/bnxt/tf_core/tf_core.c | 326 +-
drivers/net/bnxt/tf_core/tf_core.h | 563 +-
drivers/net/bnxt/tf_core/tf_device.c | 530 +-
drivers/net/bnxt/tf_core/tf_device.h | 276 +-
drivers/net/bnxt/tf_core/tf_device_p4.c | 161 +-
drivers/net/bnxt/tf_core/tf_device_p4.h | 203 +-
drivers/net/bnxt/tf_core/tf_device_p45.h | 105 -
drivers/net/bnxt/tf_core/tf_device_p58.c | 372 +
drivers/net/bnxt/tf_core/tf_device_p58.h | 212 +
drivers/net/bnxt/tf_core/tf_em.h | 99 +-
drivers/net/bnxt/tf_core/tf_em_common.c | 332 +-
drivers/net/bnxt/tf_core/tf_em_common.h | 68 +-
.../net/bnxt/tf_core/tf_em_hash_internal.c | 215 +
drivers/net/bnxt/tf_core/tf_em_host.c | 115 +-
drivers/net/bnxt/tf_core/tf_em_internal.c | 376 +-
drivers/net/bnxt/tf_core/tf_ext_flow_handle.h | 15 +-
drivers/net/bnxt/tf_core/tf_identifier.c | 174 +-
drivers/net/bnxt/tf_core/tf_identifier.h | 26 +
drivers/net/bnxt/tf_core/tf_if_tbl.c | 20 +-
drivers/net/bnxt/tf_core/tf_msg.c | 1219 +-
drivers/net/bnxt/tf_core/tf_msg.h | 217 +-
drivers/net/bnxt/tf_core/tf_msg_common.h | 3 -
drivers/net/bnxt/tf_core/tf_rm.c | 834 +-
drivers/net/bnxt/tf_core/tf_rm.h | 143 +-
drivers/net/bnxt/tf_core/tf_session.c | 261 +-
drivers/net/bnxt/tf_core/tf_session.h | 206 +-
drivers/net/bnxt/tf_core/tf_shadow_tbl.c | 785 -
drivers/net/bnxt/tf_core/tf_shadow_tbl.h | 256 -
drivers/net/bnxt/tf_core/tf_shadow_tcam.c | 6 +-
drivers/net/bnxt/tf_core/tf_tbl.c | 656 +-
drivers/net/bnxt/tf_core/tf_tbl.h | 57 +-
drivers/net/bnxt/tf_core/tf_tcam.c | 435 +-
drivers/net/bnxt/tf_core/tf_tcam.h | 30 +
drivers/net/bnxt/tf_core/tf_tcam_shared.c | 1283 +
drivers/net/bnxt/tf_core/tf_tcam_shared.h | 183 +
drivers/net/bnxt/tf_core/tf_util.c | 62 +-
drivers/net/bnxt/tf_core/tf_util.h | 31 +-
drivers/net/bnxt/tf_core/tfp.c | 44 +-
drivers/net/bnxt/tf_core/tfp.h | 61 +-
drivers/net/bnxt/tf_ulp/bnxt_tf_common.h | 2 -
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c | 378 +
drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h | 29 +
drivers/net/bnxt/tf_ulp/bnxt_ulp.c | 943 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp.h | 85 +-
drivers/net/bnxt/tf_ulp/bnxt_ulp_flow.c | 74 +-
.../bnxt/tf_ulp/generic_templates/meson.build | 13 +
.../generic_templates/ulp_template_db_act.c | 1017 +
.../generic_templates/ulp_template_db_class.c | 13188 ++++++++++
.../generic_templates/ulp_template_db_enum.h | 1883 ++
.../generic_templates/ulp_template_db_field.h | 686 +
.../generic_templates/ulp_template_db_tbl.c | 3335 +++
.../generic_templates/ulp_template_db_tbl.h | 112 +
.../ulp_template_db_thor_act.c | 225 +
.../ulp_template_db_thor_class.c | 6107 +++++
.../ulp_template_db_wh_plus_act.c | 4974 ++++
.../ulp_template_db_wh_plus_class.c | 14270 +++++++++++
drivers/net/bnxt/tf_ulp/meson.build | 28 +
drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 91 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 171 +-
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h | 1 +
drivers/net/bnxt/tf_ulp/ulp_flow_db.c | 129 +-
drivers/net/bnxt/tf_ulp/ulp_flow_db.h | 20 +-
drivers/net/bnxt/tf_ulp/ulp_gen_hash.c | 369 +
drivers/net/bnxt/tf_ulp/ulp_gen_hash.h | 166 +
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c | 417 +
drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h | 171 +
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 637 +
drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h | 67 +
drivers/net/bnxt/tf_ulp/ulp_mapper.c | 3572 ++-
drivers/net/bnxt/tf_ulp/ulp_mapper.h | 59 +-
drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c | 10 +-
drivers/net/bnxt/tf_ulp/ulp_matcher.c | 36 +-
drivers/net/bnxt/tf_ulp/ulp_port_db.c | 140 +-
drivers/net/bnxt/tf_ulp/ulp_port_db.h | 42 +
...emplate_db_tbl.c => ulp_rte_handler_tbl.c} | 269 +-
drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 1207 +-
drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 36 +-
drivers/net/bnxt/tf_ulp/ulp_template_db.c | 4622 ----
drivers/net/bnxt/tf_ulp/ulp_template_db.h | 614 -
drivers/net/bnxt/tf_ulp/ulp_template_db_act.c | 815 -
.../net/bnxt/tf_ulp/ulp_template_db_class.c | 3985 ---
.../net/bnxt/tf_ulp/ulp_template_db_enum.h | 973 -
.../net/bnxt/tf_ulp/ulp_template_db_field.h | 1191 -
.../tf_ulp/ulp_template_db_stingray_act.c | 3305 ---
.../tf_ulp/ulp_template_db_stingray_class.c | 20566 ----------------
drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h | 48 -
.../bnxt/tf_ulp/ulp_template_db_wh_plus_act.c | 3304 ---
.../tf_ulp/ulp_template_db_wh_plus_class.c | 20566 ----------------
.../net/bnxt/tf_ulp/ulp_template_field_db.h | 224 -
drivers/net/bnxt/tf_ulp/ulp_template_struct.h | 192 +-
drivers/net/bnxt/tf_ulp/ulp_tun.c | 192 +-
drivers/net/bnxt/tf_ulp/ulp_tun.h | 33 +-
drivers/net/bnxt/tf_ulp/ulp_utils.c | 339 +-
drivers/net/bnxt/tf_ulp/ulp_utils.h | 153 +-
123 files changed, 63931 insertions(+), 68808 deletions(-)
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.h
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c
create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h
create mode 100644 drivers/net/bnxt/hcapi/cfa/meson.build
delete mode 100644 drivers/net/bnxt/hcapi/cfa_p40_hw.h
delete mode 100644 drivers/net/bnxt/hcapi/cfa_p40_tbl.h
delete mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa.h
delete mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa_defs.h
delete mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa_p4.c
delete mode 100644 drivers/net/bnxt/hcapi/hcapi_cfa_p4.h
create mode 100644 drivers/net/bnxt/tf_core/dpool.c
create mode 100644 drivers/net/bnxt/tf_core/dpool.h
delete mode 100644 drivers/net/bnxt/tf_core/hwrm_tf.h
create mode 100644 drivers/net/bnxt/tf_core/meson.build
delete mode 100644 drivers/net/bnxt/tf_core/tf_device_p45.h
create mode 100644 drivers/net/bnxt/tf_core/tf_device_p58.c
create mode 100644 drivers/net/bnxt/tf_core/tf_device_p58.h
create mode 100644 drivers/net/bnxt/tf_core/tf_em_hash_internal.c
delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.c
delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.h
create mode 100644 drivers/net/bnxt/tf_core/tf_tcam_shared.c
create mode 100644 drivers/net/bnxt/tf_core/tf_tcam_shared.h
create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.c
create mode 100644 drivers/net/bnxt/tf_ulp/bnxt_tf_pmd_shim.h
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/meson.build
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_act.c
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_class.c
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_enum.h
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_field.h
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.c
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_tbl.h
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_act.c
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_thor_class.c
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_act.c
create mode 100644 drivers/net/bnxt/tf_ulp/generic_templates/ulp_template_db_wh_plus_class.c
create mode 100644 drivers/net/bnxt/tf_ulp/meson.build
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_gen_hash.c
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_gen_hash.h
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_gen_tbl.c
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_gen_tbl.h
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c
create mode 100644 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h
rename drivers/net/bnxt/tf_ulp/{ulp_template_db_tbl.c => ulp_rte_handler_tbl.c} (60%)
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db.h
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_act.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_class.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_field.h
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_act.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_stingray_class.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_tbl.h
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_act.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
delete mode 100644 drivers/net/bnxt/tf_ulp/ulp_template_field_db.hSignature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 1/58 net/bnxt: add CFA folder to HCAPI directory
From: Jeffrey Huang <[email protected]>
Before introducing more HCAPI components to DPDK, the CFA code needs to be organized into a dedicated folder so it is separated from other new HCAPI components
---
drivers/net/bnxt/hcapi/{ => cfa}/hcapi_cfa.h | 14 -
.../net/bnxt/hcapi/{ => cfa}/hcapi_cfa_defs.h | 8 +-
.../net/bnxt/hcapi/{ => cfa}/hcapi_cfa_p4.c | 0
.../net/bnxt/hcapi/{ => cfa}/hcapi_cfa_p4.h | 2 -
drivers/net/bnxt/hcapi/cfa/meson.build | 10 +
drivers/net/bnxt/hcapi/cfa_p40_hw.h | 781 ------------------
drivers/net/bnxt/hcapi/cfa_p40_tbl.h | 303 -------
drivers/net/bnxt/meson.build | 65 +-
drivers/net/bnxt/tf_core/meson.build | 33 +
drivers/net/bnxt/tf_core/tf_core.h | 2 +-
drivers/net/bnxt/tf_core/tf_em.h | 2 +-
drivers/net/bnxt/tf_ulp/meson.build | 28 +
12 files changed, 89 insertions(+), 1159 deletions(-)
rename drivers/net/bnxt/hcapi/{ => cfa}/hcapi_cfa.h (96%)
rename drivers/net/bnxt/hcapi/{ => cfa}/hcapi_cfa_defs.h (98%)
rename drivers/net/bnxt/hcapi/{ => cfa}/hcapi_cfa_p4.c (100%)
rename drivers/net/bnxt/hcapi/{ => cfa}/hcapi_cfa_p4.h (99%)
create mode 100644 drivers/net/bnxt/hcapi/cfa/meson.build
delete mode 100644 drivers/net/bnxt/hcapi/cfa_p40_hw.h
delete mode 100644 drivers/net/bnxt/hcapi/cfa_p40_tbl.h
create mode 100644 drivers/net/bnxt/tf_core/meson.build
create mode 100644 drivers/net/bnxt/tf_ulp/meson.builddrivers/net/bnxt/hcapi/cfa/hcapi_cfa.h renamed from drivers/net/bnxt/hcapi/hcapi_cfa.h +0 -14
@@ -14,20 +14,6 @@#include "hcapi_cfa_defs.h" -#if CHIP_CFG ==SR_A -#define SUPPORT_CFA_HW_P45 1 -#undef SUPPORT_CFA_HW_P4 -#define SUPPORT_CFA_HW_P4 0 -#elif CHIP_CFG ==CMB_A -#define SUPPORT_CFA_HW_P4 1 -#else -#error "Chip not supported" -#endif - -#if SUPPORT_CFA_HW_P4 &&SUPPORT_CFA_HW_P58 &&SUPPORT_CFA_HW_P59 -#define SUPPORT_CFA_HW_ALL 1 -#endif -/** * Index used for the sram_entries field */
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h renamed from drivers/net/bnxt/hcapi/hcapi_cfa_defs.h +1 -7
@@ -17,11 +17,6 @@#include <stdint.h> #include <stddef.h> -#define SUPPORT_CFA_HW_ALL 0 -#define SUPPORT_CFA_HW_P4 1 -#define SUPPORT_CFA_HW_P58 0 -#define SUPPORT_CFA_HW_P59 0 -#define CFA_BITS_PER_BYTE (8)#define __CFA_ALIGN_MASK (x, mask) (((x) + (mask)) & ~(mask))#define CFA_ALIGN (x, a) __CFA_ALIGN_MASK(x, (a) - 1)
@@ -49,8 +44,7 @@ enum hcapi_cfa_ver {HCAPI_CFA_P40 =0 ,/**< CFA phase 4.0 */ HCAPI_CFA_P45 =1 ,/**< CFA phase 4.5 */ HCAPI_CFA_P58 =2 ,/**< CFA phase 5.8 */ -HCAPI_CFA_P59 =3 ,/**< CFA phase 5.9 */ - HCAPI_CFA_PMAX = 4 + HCAPI_CFA_PMAX = 3 };/**
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c renamed from drivers/net/bnxt/hcapi/hcapi_cfa_p4.c +0 -0
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.h renamed from drivers/net/bnxt/hcapi/hcapi_cfa_p4.h +0 -2
@@ -6,8 +6,6 @@#ifndef _HCAPI_CFA_P4_H_#define _HCAPI_CFA_P4_H_ -#include "cfa_p40_hw.h" -/** CFA phase 4 fix formatted table(layout) ID definition * */
drivers/net/bnxt/hcapi/cfa/meson.build new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation +# Copyright(c) 2021 Broadcom + +#Include the folder for headers +includes += include_directories('.') + +#Add the source files +sources += files( + 'hcapi_cfa_p4.c')
drivers/net/bnxt/hcapi/cfa_p40_hw.h deleted +0 -781
781 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa_p40_tbl.h deleted +0 -303
303 lines not on this page · raw message
drivers/net/bnxt/meson.build +15 -50
81 lines not on this page · raw message
drivers/net/bnxt/tf_core/meson.build new file +33 -0
@@ -0,0 +1,33 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation +# Copyright(c) 2021 Broadcom + +#Include the folder for headers +includes += include_directories('.') + +#Add the source files +sources += files( + 'tf_core.c', + 'bitalloc.c', + 'tf_msg.c', + 'rand.c', + 'stack.c', + 'tf_em_common.c', + 'tf_em_internal.c', + 'tf_rm.c', + 'tf_tbl.c', + 'tfp.c', + 'tf_session.c', + 'tf_device.c', + 'tf_device_p4.c', + 'tf_identifier.c', + 'tf_shadow_tbl.c', + 'tf_shadow_tcam.c', + 'tf_tcam.c', + 'tf_util.c', + 'tf_if_tbl.c', + 'll.c', + 'tf_global_cfg.c', + 'tf_em_host.c', + 'tf_shadow_identifier.c', + 'tf_hash.c')
drivers/net/bnxt/tf_core/tf_core.h +1 -1
@@ -10,7 +10,7 @@#include <stdlib.h> #include <stdbool.h> #include <stdio.h> -#include "hcapi/hcapi_cfa_defs.h" +#include "hcapi/cfa/hcapi_cfa_defs.h" #include "tf_project.h" /**
drivers/net/bnxt/tf_core/tf_em.h +1 -1
@@ -9,7 +9,7 @@#include "tf_core.h" #include "tf_session.h" -#include "hcapi/hcapi_cfa_defs.h" +#include "hcapi/cfa/hcapi_cfa_defs.h" #define TF_EM_MIN_ENTRIES (1 << 15)/* 32K */ #define TF_EM_MAX_ENTRIES (1 << 27)/* 128M */
drivers/net/bnxt/tf_ulp/meson.build new file +28 -0
@@ -0,0 +1,28 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 Intel Corporation +# Copyright(c) 2021 Broadcom + +#Include the folder for headers +includes += include_directories('.') + +#Add the source files +sources += files( + 'bnxt_ulp.c', + 'ulp_mark_mgr.c', + 'ulp_flow_db.c', + 'ulp_template_db_tbl.c', + 'ulp_template_db_class.c', + 'ulp_template_db_act.c', + 'ulp_utils.c', + 'ulp_mapper.c', + 'ulp_matcher.c', + 'ulp_rte_parser.c', + 'bnxt_ulp_flow.c', + 'ulp_port_db.c', + 'ulp_def_rules.c', + 'ulp_fc_mgr.c', + 'ulp_tun.c', + 'ulp_template_db_wh_plus_act.c', + 'ulp_template_db_wh_plus_class.c', + 'ulp_template_db_stingray_act.c', + 'ulp_template_db_stingray_class.c')
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 2/58 net/bnxt: add base TRUFLOW support for Thor
In reply to Ajit KhapardeFrom: Farah Smith <[email protected]>
Add infrastructure code to support TRUFLOW on Thor NICs. Also update meson.build
--- drivers/net/bnxt/tf_core/cfa_resource_types.h | 1 - drivers/net/bnxt/tf_core/meson.build | 1 + drivers/net/bnxt/tf_core/tf_core.c | 1 + drivers/net/bnxt/tf_core/tf_device.c | 207 +++++++++++++ drivers/net/bnxt/tf_core/tf_device.h | 24 ++ drivers/net/bnxt/tf_core/tf_device_p4.c | 111 ++++++- drivers/net/bnxt/tf_core/tf_device_p4.h | 3 +- drivers/net/bnxt/tf_core/tf_device_p58.c | 284 ++++++++++++++++++ drivers/net/bnxt/tf_core/tf_device_p58.h | 79 +++++ drivers/net/bnxt/tf_core/tf_em_common.c | 4 +- drivers/net/bnxt/tf_core/tf_msg.c | 33 -- drivers/net/bnxt/tf_core/tf_rm.c | 8 +- drivers/net/bnxt/tf_core/tf_shadow_tcam.c | 4 +- 13 files changed, 711 insertions(+), 49 deletions(-) create mode 100644 drivers/net/bnxt/tf_core/tf_device_p58.c create mode 100644 drivers/net/bnxt/tf_core/tf_device_p58.h
drivers/net/bnxt/tf_core/cfa_resource_types.h +0 -1
@@ -254,5 +254,4 @@#define CFA_RESOURCE_TYPE_P4_TBL_SCOPE 0x22UL#define CFA_RESOURCE_TYPE_P4_LAST CFA_RESOURCE_TYPE_P4_TBL_SCOPE -#endif /* _CFA_RESOURCE_TYPES_H_ */
drivers/net/bnxt/tf_core/meson.build +1 -0
@@ -20,6 +20,7 @@ sources += files( 'tf_session.c', 'tf_device.c', 'tf_device_p4.c', + 'tf_device_p58.c', 'tf_identifier.c', 'tf_shadow_tbl.c', 'tf_shadow_tcam.c',
drivers/net/bnxt/tf_core/tf_core.c +1 -0
@@ -35,6 +35,7 @@ tf_open_session(struct tf *tfp,* firmware open session succeeds. */ if (parms->device_type !=TF_DEVICE_TYPE_WH && + parms->device_type !=TF_DEVICE_TYPE_THOR && parms->device_type !=TF_DEVICE_TYPE_SR ) { TFP_DRV_LOG(ERR, "Unsupported device type %d\n",
drivers/net/bnxt/tf_core/tf_device.c +207 -0
237 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.h +24 -0
@@ -134,6 +134,28 @@ struct tf_dev_ops {int (*tf_dev_get_max_types)(struct tf *tfp,uint16_t *max_types); +/** +* Retrieves the string description for the CFA resource +* type +* +* [in] tfp +* Pointer to TF handle +* +* [in] resource_id +* HCAPI cfa resource type id +* +* [out] resource_str +* Pointer to a string +* +* Returns +* - (0) if successful. +* - (-EINVAL) on failure. +*/ +int (*tf_dev_get_resource_str)(struct tf *tfp, +uint16_t resource_id, +const char **resource_str); + +/** * Retrieves the WC TCAM slice information that the device * supports.
@@ -709,5 +731,7 @@ struct tf_dev_ops {*/ extern const struct tf_dev_ops tf_dev_ops_p4_init;extern const struct tf_dev_ops tf_dev_ops_p4; +extern const struct tf_dev_ops tf_dev_ops_p58_init; +extern const struct tf_dev_ops tf_dev_ops_p58;#endif /* _TF_DEVICE_H_ */
drivers/net/bnxt/tf_core/tf_device_p4.c +109 -2
148 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p4.h +1 -2
@@ -6,8 +6,7 @@#ifndef _TF_DEVICE_P4_H_#define _TF_DEVICE_P4_H_ -#include <cfa_resource_types.h> - +#include "cfa_resource_types.h" #include "tf_core.h" #include "tf_rm.h" #include "tf_if_tbl.h"
drivers/net/bnxt/tf_core/tf_device_p58.c new file +284 -0
284 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.h new file +79 -0
79 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_common.c +2 -2
@@ -1115,8 +1115,8 @@ int tf_em_ext_map_tbl_scope(struct tf *tfp, goto cleaner; } - gcfg_parms.type = - (enum tf_global_config_type )TF_GLOBAL_CFG_INTERNAL_PARIF_2_PF ; +/* Note that TF_GLOBAL_CFG_INTERNAL_PARIF_2_PF is same as below enum */ + gcfg_parms.type =TF_GLOBAL_CFG_TYPE_MAX ; gcfg_parms.offset =0 ; gcfg_parms.config = (uint8_t *)data; gcfg_parms.config_mask = (uint8_t *)mask;
drivers/net/bnxt/tf_core/tf_msg.c +0 -33
@@ -19,9 +19,6 @@#include "hwrm_tf.h" #include "tf_em.h" -/* Logging defines */ -#define TF_RM_MSG_DEBUG 0 -/* Specific msg size defines as we cannot use defines in tf.yaml. This * means we have to manually sync hwrm with these defines if the * tf.yaml changes.
@@ -361,29 +358,13 @@ tf_msg_session_resc_qcaps(struct tf *tfp, goto cleanup; } -#if (TF_RM_MSG_DEBUG ==1 ) -printf ("size: %d\n" ,tfp_le_to_cpu_32 (resp.size)); -#endif /* (TF_RM_MSG_DEBUG == 1) */ -/* Post process the response */ data = (struct tf_rm_resc_req_entry *)qcaps_buf.va_addr; -#if (TF_RM_MSG_DEBUG ==1 ) -printf ("\nQCAPS\n" ); -#endif /* (TF_RM_MSG_DEBUG == 1) */ for (i =0 ; i < size; i++) { query[i].type =tfp_le_to_cpu_32 (data[i].type); query[i].min =tfp_le_to_cpu_16 (data[i].min); query[i].max =tfp_le_to_cpu_16 (data[i].max); - -#if (TF_RM_MSG_DEBUG ==1 ) -printf ("type: %d(0x%x) %d %d\n" , - query[i].type, - query[i].type, - query[i].min, - query[i].max); -#endif /* (TF_RM_MSG_DEBUG == 1) */ - } *resv_strategy = resp.flags &
@@ -476,26 +457,12 @@ tf_msg_session_resc_alloc(struct tf *tfp, goto cleanup; } -#if (TF_RM_MSG_DEBUG ==1 ) -printf ("\nRESV\n" ); -printf ("size: %d\n" ,tfp_le_to_cpu_32 (resp.size)); -#endif /* (TF_RM_MSG_DEBUG == 1) */ -/* Post process the response */ resv_data = (struct tf_rm_resc_entry *)resv_buf.va_addr;for (i =0 ; i < size; i++) { resv[i].type =tfp_le_to_cpu_32 (resv_data[i].type); resv[i].start =tfp_le_to_cpu_16 (resv_data[i].start); resv[i].stride =tfp_le_to_cpu_16 (resv_data[i].stride); - -#if (TF_RM_MSG_DEBUG ==1 ) -printf ("%d type: %d(0x%x) %d %d\n" , - i, - resv[i].type, - resv[i].type, - resv[i].start, - resv[i].stride); -#endif /* (TF_RM_MSG_DEBUG == 1) */ } cleanup:
drivers/net/bnxt/tf_core/tf_rm.c +1 -7
@@ -6,6 +6,7 @@#include <string.h> #include <rte_common.h> +#include <rte_debug.h> #include <cfa_resource_types.h>
@@ -596,13 +597,6 @@ tf_rm_create_db(struct tf *tfp, rm_db->type = parms->type; *parms->rm_db = (void *)rm_db; -#if (TF_RM_DEBUG ==1 ) -printf ("%s: type:%d num_entries:%d\n" , -tf_dir_2_str (parms->dir), - parms->type, - i); -#endif /* (TF_RM_DEBUG == 1) */ -tfp_free ((void *)req);tfp_free ((void *)resv);
drivers/net/bnxt/tf_core/tf_shadow_tcam.c +2 -2
@@ -6,6 +6,7 @@#include "tf_common.h" #include "tf_util.h" #include "tfp.h" +#include "tf_tcam.h" #include "tf_shadow_tcam.h" #include "tf_hash.h"
@@ -634,8 +635,7 @@ tf_shadow_tcam_search(struct tf_shadow_tcam_search_parms *parms)* requested allocation and return the info */ if (sparms->alloc) - ctxt->shadow_ctxt.sh_res_tbl[shtbl_key].refcnt = - ctxt->shadow_ctxt.sh_res_tbl[shtbl_key].refcnt +1 ; + ctxt->shadow_ctxt.sh_res_tbl[shtbl_key].refcnt++; sparms->hit =1 ; sparms->search_status =HIT ;
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 3/58 net/bnxt: add mailbox selection via dev op
In reply to Ajit KhapardeFrom: Peter Spreadborough <[email protected]>
Add get mailbox dev op so that mailbox offset is based on device instead of a hard coded value.
--- drivers/net/bnxt/tf_core/tf_device.c | 21 ++ drivers/net/bnxt/tf_core/tf_device.h | 12 + drivers/net/bnxt/tf_core/tf_device_p4.c | 8 + drivers/net/bnxt/tf_core/tf_device_p58.c | 7 + drivers/net/bnxt/tf_core/tf_msg.c | 410 +++++++++++++++++++++-- drivers/net/bnxt/tf_core/tf_msg.h | 12 +- drivers/net/bnxt/tf_core/tf_rm.c | 2 + drivers/net/bnxt/tf_core/tf_session.c | 22 +- drivers/net/bnxt/tf_core/tf_tcam.c | 4 +- 9 files changed, 463 insertions(+), 35 deletions(-)
drivers/net/bnxt/tf_core/tf_device.c +21 -0
@@ -461,6 +461,27 @@ tf_dev_bind(struct tf *tfp __rte_unused, } } +int +tf_dev_bind_ops (enum tf_device_type type, +struct tf_dev_info *dev_handle) +{ +switch (type) { +case TF_DEVICE_TYPE_WH : +case TF_DEVICE_TYPE_SR : + dev_handle->ops = &tf_dev_ops_p4; +break ; +case TF_DEVICE_TYPE_THOR : + dev_handle->ops = &tf_dev_ops_p58; +break ; +default : +TFP_DRV_LOG (ERR , +"No such device\n" ); +return -ENODEV ; + } + +return 0 ; +} +int tf_dev_unbind (struct tf *tfp,struct tf_dev_info *dev_handle)
drivers/net/bnxt/tf_core/tf_device.h +12 -0
@@ -108,6 +108,10 @@ int tf_dev_bind(struct tf *tfp,int tf_dev_unbind (struct tf *tfp,struct tf_dev_info *dev_handle); +int +tf_dev_bind_ops (enum tf_device_type type, +struct tf_dev_info *dev_handle); +/** * Truflow device specific function hooks structure *
@@ -724,6 +728,14 @@ struct tf_dev_ops {*/ int (*tf_dev_get_global_cfg)(struct tf *tfp,struct tf_global_cfg_parms *parms); + +/** +* Get mailbox +* +* returns: +* mailbox +*/ +int (*tf_dev_get_mailbox)(void ); };/**
drivers/net/bnxt/tf_core/tf_device_p4.c +8 -0
@@ -13,6 +13,7 @@#include "tf_em.h" #include "tf_if_tbl.h" #include "tfp.h" +#include "tf_msg_common.h" #define TF_DEV_P4_PARIF_MAX 16#define TF_DEV_P4_PF_MASK 0xfUL
@@ -241,6 +242,11 @@ tf_dev_p4_map_parif(struct tf *tfp __rte_unused,return 0 ; } +static int tf_dev_p4_get_mailbox (void ) +{ +return TF_KONG_MB ; +} +/** * Truflow P4 device specific functions
@@ -278,6 +284,7 @@ const struct tf_dev_ops tf_dev_ops_p4_init = { .tf_dev_get_if_tbl = NULL, .tf_dev_set_global_cfg = NULL, .tf_dev_get_global_cfg = NULL, + .tf_dev_get_mailbox = tf_dev_p4_get_mailbox, };/**
@@ -316,4 +323,5 @@ const struct tf_dev_ops tf_dev_ops_p4 = { .tf_dev_get_if_tbl = tf_if_tbl_get, .tf_dev_set_global_cfg = tf_global_cfg_set, .tf_dev_get_global_cfg = tf_global_cfg_get, + .tf_dev_get_mailbox = tf_dev_p4_get_mailbox, };
drivers/net/bnxt/tf_core/tf_device_p58.c +7 -0
@@ -13,6 +13,7 @@#include "tf_em.h" #include "tf_if_tbl.h" #include "tfp.h" +#include "tf_msg_common.h" #define TF_DEV_P58_PARIF_MAX 16#define TF_DEV_P58_PF_MASK 0xfUL
@@ -206,6 +207,10 @@ tf_dev_p58_map_parif(struct tf *tfp __rte_unused,return 0 ; } +static int tf_dev_p58_get_mailbox (void ) +{ +return TF_CHIMP_MB ; +}/** * Truflow P58 device specific functions
@@ -243,6 +248,7 @@ const struct tf_dev_ops tf_dev_ops_p58_init = { .tf_dev_get_if_tbl = NULL, .tf_dev_set_global_cfg = NULL, .tf_dev_get_global_cfg = NULL, + .tf_dev_get_mailbox = tf_dev_p58_get_mailbox, };/**
@@ -281,4 +287,5 @@ const struct tf_dev_ops tf_dev_ops_p58 = { .tf_dev_get_if_tbl = tf_if_tbl_get, .tf_dev_set_global_cfg = tf_global_cfg_set, .tf_dev_get_global_cfg = tf_global_cfg_get, + .tf_dev_get_mailbox = tf_dev_p58_get_mailbox, };
drivers/net/bnxt/tf_core/tf_msg.c +383 -27
737 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg.h +10 -2
@@ -36,7 +36,8 @@ struct tf;int tf_msg_session_open (struct tf *tfp,char *ctrl_chan_name,uint8_t *fw_session_id, -uint8_t *fw_session_client_id); +uint8_t *fw_session_client_id, +struct tf_dev_info *dev);/** * Sends session close request to Firmware
@@ -75,6 +76,7 @@ int tf_msg_session_attach(struct tf *tfp,* 0 on Success else internal Truflow error */ int tf_msg_session_client_register (struct tf *tfp, +struct tf_session *tfs,char *ctrl_channel_name,uint8_t *fw_session_client_id);
@@ -92,6 +94,7 @@ int tf_msg_session_client_register(struct tf *tfp,* 0 on Success else internal Truflow error */ int tf_msg_session_client_unregister (struct tf *tfp, +struct tf_session *tfs,uint8_t fw_session_client_id);/**
@@ -103,7 +106,8 @@ int tf_msg_session_client_unregister(struct tf *tfp,* Returns: * 0 on Success else internal Truflow error */ -int tf_msg_session_close (struct tf *tfp); +int tf_msg_session_close (struct tf *tfp, +struct tf_session *tfs);/** * Sends session query config request to TF Firmware
@@ -139,6 +143,7 @@ int tf_msg_session_qcfg(struct tf *tfp);* 0 on Success else internal Truflow error */ int tf_msg_session_resc_qcaps(struct tf *tfp, + struct tf_dev_info *dev, enum tf_dir dir, uint16_t size, struct tf_rm_resc_req_entry *query,
@@ -166,6 +171,7 @@ int tf_msg_session_resc_qcaps(struct tf *tfp,* 0 on Success else internal Truflow error */ int tf_msg_session_resc_alloc(struct tf *tfp, + struct tf_dev_info *dev, enum tf_dir dir, uint16_t size, struct tf_rm_resc_req_entry *request,
@@ -368,6 +374,7 @@ int tf_msg_em_op(struct tf *tfp,* 0 on Success else internal Truflow error */ int tf_msg_tcam_entry_set (struct tf *tfp, +struct tf_dev_info *dev,struct tf_tcam_set_parms *parms);/**
@@ -383,6 +390,7 @@ int tf_msg_tcam_entry_set(struct tf *tfp,* 0 on Success else internal Truflow error */ int tf_msg_tcam_entry_free (struct tf *tfp, +struct tf_dev_info *dev,struct tf_tcam_free_parms *parms);/**
drivers/net/bnxt/tf_core/tf_rm.c +2 -0
@@ -415,6 +415,7 @@ tf_rm_create_db(struct tf *tfp,/* Get Firmware Capabilities */ rc = tf_msg_session_resc_qcaps(tfp, + dev, parms->dir, max_types, query,
@@ -499,6 +500,7 @@ tf_rm_create_db(struct tf *tfp, } rc = tf_msg_session_resc_alloc(tfp, + dev, parms->dir, hcapi_items, req,
drivers/net/bnxt/tf_core/tf_session.c +18 -4
@@ -56,14 +56,19 @@ tf_session_create(struct tf *tfp,uint8_t fw_session_id;uint8_t fw_session_client_id;union tf_session_id *session_id; +struct tf_dev_info dev;TF_CHECK_PARMS2 (tfp, parms); +tf_dev_bind_ops (parms->open_cfg->device_type, + &dev); +/* Open FW session and get a new session_id */ rc =tf_msg_session_open (tfp, parms->open_cfg->ctrl_chan_name, &fw_session_id, - &fw_session_client_id); + &fw_session_client_id, + &dev);if (rc) {/* Log error */ if (rc == -EEXIST )
@@ -177,6 +182,13 @@ tf_session_create(struct tf *tfp,if (rc)return rc; +if (session->dev.ops->tf_dev_get_mailbox ==NULL ) { +/* Log error */ +TFP_DRV_LOG (ERR , +"No tf_dev_get_mailbox() defined for device\n" ); + goto cleanup; + } + session->dev_init = true;return 0 ;
@@ -234,8 +246,9 @@ tf_session_client_create(struct tf *tfp, rc =tf_msg_session_client_register (tfp, - parms->ctrl_chan_name, - &session_client_id.internal.fw_session_client_id); + session, + parms->ctrl_chan_name, + &session_client_id.internal.fw_session_client_id);if (rc) { TFP_DRV_LOG(ERR, "Failed to create client on session, rc:%s\n",
@@ -346,6 +359,7 @@ tf_session_client_destroy(struct tf *tfp, rc =tf_msg_session_client_unregister (tfp, + tfs, parms->session_client_id.internal.fw_session_client_id);/* Log error, but continue. If FW fails we do not really have
@@ -534,7 +548,7 @@ tf_session_close_session(struct tf *tfp, strerror(-rc)); } - rc =tf_msg_session_close (tfp); + rc =tf_msg_session_close (tfp, tfs);if (rc) {/* Log error */ TFP_DRV_LOG(ERR,
drivers/net/bnxt/tf_core/tf_tcam.c +2 -2
@@ -428,7 +428,7 @@ tf_tcam_free(struct tf *tfp,if (rc)return rc; - rc =tf_msg_tcam_entry_free (tfp, parms); + rc =tf_msg_tcam_entry_free (tfp, dev, parms);if (rc) {/* Log error */ TFP_DRV_LOG(ERR,
@@ -652,7 +652,7 @@ tf_tcam_set(struct tf *tfp __rte_unused,if (rc)return rc; - rc =tf_msg_tcam_entry_set (tfp, parms); + rc =tf_msg_tcam_entry_set (tfp, dev, parms);if (rc) {/* Log error */ TFP_DRV_LOG(ERR,
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 4/58 net/bnxt: check resource reservation in TRUFLOW
In reply to Ajit KhapardeFrom: Jay Ding <[email protected]>
- Allow tf_open to continue if no resource is allocated for some table type.
- Close the session if binding fails for any table.
- Close the session if no resource is allocated for all tables.
--- drivers/net/bnxt/tf_core/tf_device.c | 284 +++++++++++++++++++------- drivers/net/bnxt/tf_core/tf_session.c | 2 +- 2 files changed, 207 insertions(+), 79 deletions(-)
drivers/net/bnxt/tf_core/tf_device.c +206 -78
@@ -15,6 +15,44 @@ struct tf;static int tf_dev_unbind_p4 (struct tf *tfp);static int tf_dev_unbind_p58 (struct tf *tfp); +/** +* Resource Reservation Check function +* +* [in] tfp +* Pointer to TF handle +* +* [in] cfg +* Pointer to rm element config +* +* [in] reservations +* Pointer to resource reservation array +* +* Returns +* - (n) number of tables that have non-zero reservation count. +*/ +static int +tf_dev_reservation_check(struct tf *tfp __rte_unused, +uint16_t count, +struct tf_rm_element_cfg *cfg, +uint16_t *reservations) +{ +uint16_t cnt =0 ; +uint16_t *rm_num; +int i, j; + +for (i =0 ; i <TF_DIR_MAX ; i++) { + rm_num = (uint16_t *)reservations + i * count; +for (j =0 ; j < count; j++) { +if ((cfg[j].cfg_type ==TF_RM_ELEM_CFG_HCAPI || + cfg[j].cfg_type ==TF_RM_ELEM_CFG_HCAPI_BA ) && + rm_num[j] >0 ) + cnt++; + } + } + +return cnt; +} +/** * Device specific bind function, WH+ *
@@ -42,6 +80,8 @@ tf_dev_bind_p4(struct tf *tfp, {int rc;int frc; +int rsv_cnt; +bool no_rsv_flag = true;struct tf_ident_cfg_parms ident_cfg;struct tf_tbl_cfg_parms tbl_cfg;struct tf_tcam_cfg_parms tcam_cfg;
@@ -54,69 +94,117 @@ tf_dev_bind_p4(struct tf *tfp,/* Initialize the modules */ - ident_cfg.num_elements =TF_IDENT_TYPE_MAX ; - ident_cfg.cfg = tf_ident_p4; - ident_cfg.shadow_copy = shadow_copy; - ident_cfg.resources = resources; - rc =tf_ident_bind (tfp, &ident_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"Identifier initialization failure\n" ); - goto fail; + rsv_cnt =tf_dev_reservation_check (tfp, +TF_IDENT_TYPE_MAX , + tf_ident_p4, + (uint16_t *)resources->ident_cnt); +if (rsv_cnt) { + ident_cfg.num_elements =TF_IDENT_TYPE_MAX ; + ident_cfg.cfg = tf_ident_p4; + ident_cfg.shadow_copy = shadow_copy; + ident_cfg.resources = resources; + rc =tf_ident_bind (tfp, &ident_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"Identifier initialization failure\n" ); + goto fail; + } + + no_rsv_flag = false; } - tbl_cfg.num_elements =TF_TBL_TYPE_MAX ; - tbl_cfg.cfg = tf_tbl_p4; - tbl_cfg.shadow_copy = shadow_copy; - tbl_cfg.resources = resources; - rc =tf_tbl_bind (tfp, &tbl_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"Table initialization failure\n" ); - goto fail; + rsv_cnt =tf_dev_reservation_check (tfp, +TF_TBL_TYPE_MAX , + tf_tbl_p4, + (uint16_t *)resources->tbl_cnt); +if (rsv_cnt) { + tbl_cfg.num_elements =TF_TBL_TYPE_MAX ; + tbl_cfg.cfg = tf_tbl_p4; + tbl_cfg.shadow_copy = shadow_copy; + tbl_cfg.resources = resources; + rc =tf_tbl_bind (tfp, &tbl_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"Table initialization failure\n" ); + goto fail; + } + + no_rsv_flag = false; } - tcam_cfg.num_elements =TF_TCAM_TBL_TYPE_MAX ; - tcam_cfg.cfg = tf_tcam_p4; - tcam_cfg.shadow_copy = shadow_copy; - tcam_cfg.resources = resources; - rc =tf_tcam_bind (tfp, &tcam_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"TCAM initialization failure\n" ); - goto fail; + rsv_cnt =tf_dev_reservation_check (tfp, +TF_TCAM_TBL_TYPE_MAX , + tf_tcam_p4, + (uint16_t *)resources->tcam_cnt); +if (rsv_cnt) { + tcam_cfg.num_elements =TF_TCAM_TBL_TYPE_MAX ; + tcam_cfg.cfg = tf_tcam_p4; + tcam_cfg.shadow_copy = shadow_copy; + tcam_cfg.resources = resources; + rc =tf_tcam_bind (tfp, &tcam_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"TCAM initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; }/* * EEM */ - em_cfg.num_elements =TF_EM_TBL_TYPE_MAX ;if (dev_handle->type ==TF_DEVICE_TYPE_WH ) em_cfg.cfg = tf_em_ext_p4;else em_cfg.cfg = tf_em_ext_p45; - em_cfg.resources = resources; - em_cfg.mem_type =TF_EEM_MEM_TYPE_HOST ; - rc =tf_em_ext_common_bind (tfp, &em_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"EEM initialization failure\n" ); - goto fail; + + rsv_cnt =tf_dev_reservation_check (tfp, +TF_EM_TBL_TYPE_MAX , + em_cfg.cfg, + (uint16_t *)resources->em_cnt); +if (rsv_cnt) { + em_cfg.num_elements =TF_EM_TBL_TYPE_MAX ; + em_cfg.resources = resources; + em_cfg.mem_type =TF_EEM_MEM_TYPE_HOST ; + rc =tf_em_ext_common_bind (tfp, &em_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"EEM initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; }/* * EM */ - em_cfg.num_elements =TF_EM_TBL_TYPE_MAX ; - em_cfg.cfg = tf_em_int_p4; - em_cfg.resources = resources; - em_cfg.mem_type =0 ;/* Not used by EM */ + rsv_cnt =tf_dev_reservation_check (tfp, +TF_EM_TBL_TYPE_MAX , + tf_em_int_p4, + (uint16_t *)resources->em_cnt); +if (rsv_cnt) { + em_cfg.num_elements =TF_EM_TBL_TYPE_MAX ; + em_cfg.cfg = tf_em_int_p4; + em_cfg.resources = resources; + em_cfg.mem_type =0 ;/* Not used by EM */ + + rc =tf_em_int_bind (tfp, &em_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"EM initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; + } - rc =tf_em_int_bind (tfp, &em_cfg); -if (rc) { +/* +* There is no rm reserved for any tables +* +*/ +if (no_rsv_flag) {TFP_DRV_LOG (ERR , -"EM initialization failure\n" ); - goto fail; +"No rm reserved for any tables\n" ); +return -ENOMEM ; }/*
@@ -263,6 +351,8 @@ tf_dev_bind_p58(struct tf *tfp, {int rc;int frc; +int rsv_cnt; +bool no_rsv_flag = true;struct tf_ident_cfg_parms ident_cfg;struct tf_tbl_cfg_parms tbl_cfg;struct tf_tcam_cfg_parms tcam_cfg;
@@ -275,52 +365,90 @@ tf_dev_bind_p58(struct tf *tfp,/* Initialize the modules */ - ident_cfg.num_elements =TF_IDENT_TYPE_MAX ; - ident_cfg.cfg = tf_ident_p58; - ident_cfg.shadow_copy = shadow_copy; - ident_cfg.resources = resources; - rc =tf_ident_bind (tfp, &ident_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"Identifier initialization failure\n" ); - goto fail; + rsv_cnt =tf_dev_reservation_check (tfp, +TF_IDENT_TYPE_MAX , + tf_ident_p58, + (uint16_t *)resources->ident_cnt); +if (rsv_cnt) { + ident_cfg.num_elements =TF_IDENT_TYPE_MAX ; + ident_cfg.cfg = tf_ident_p58; + ident_cfg.shadow_copy = shadow_copy; + ident_cfg.resources = resources; + rc =tf_ident_bind (tfp, &ident_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"Identifier initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; } - tbl_cfg.num_elements =TF_TBL_TYPE_MAX ; - tbl_cfg.cfg = tf_tbl_p58; - tbl_cfg.shadow_copy = shadow_copy; - tbl_cfg.resources = resources; - rc =tf_tbl_bind (tfp, &tbl_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"Table initialization failure\n" ); - goto fail; + rsv_cnt =tf_dev_reservation_check (tfp, +TF_TBL_TYPE_MAX , + tf_tbl_p58, + (uint16_t *)resources->tbl_cnt); +if (rsv_cnt) { + tbl_cfg.num_elements =TF_TBL_TYPE_MAX ; + tbl_cfg.cfg = tf_tbl_p58; + tbl_cfg.shadow_copy = shadow_copy; + tbl_cfg.resources = resources; + rc =tf_tbl_bind (tfp, &tbl_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"Table initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; } - tcam_cfg.num_elements =TF_TCAM_TBL_TYPE_MAX ; - tcam_cfg.cfg = tf_tcam_p58; - tcam_cfg.shadow_copy = shadow_copy; - tcam_cfg.resources = resources; - rc =tf_tcam_bind (tfp, &tcam_cfg); -if (rc) { -TFP_DRV_LOG (ERR , -"TCAM initialization failure\n" ); - goto fail; + rsv_cnt =tf_dev_reservation_check (tfp, +TF_TCAM_TBL_TYPE_MAX , + tf_tcam_p58, + (uint16_t *)resources->tcam_cnt); +if (rsv_cnt) { + tcam_cfg.num_elements =TF_TCAM_TBL_TYPE_MAX ; + tcam_cfg.cfg = tf_tcam_p58; + tcam_cfg.shadow_copy = shadow_copy; + tcam_cfg.resources = resources; + rc =tf_tcam_bind (tfp, &tcam_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"TCAM initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; }/* * EM */ - em_cfg.num_elements =TF_EM_TBL_TYPE_MAX ; - em_cfg.cfg = tf_em_int_p58; - em_cfg.resources = resources; - em_cfg.mem_type =0 ;/* Not used by EM */ + rsv_cnt =tf_dev_reservation_check (tfp, +TF_EM_TBL_TYPE_MAX , + tf_em_int_p58, + (uint16_t *)resources->em_cnt); +if (rsv_cnt) { + em_cfg.num_elements =TF_EM_TBL_TYPE_MAX ; + em_cfg.cfg = tf_em_int_p58; + em_cfg.resources = resources; + em_cfg.mem_type =0 ;/* Not used by EM */ + + rc =tf_em_int_bind (tfp, &em_cfg); +if (rc) { +TFP_DRV_LOG (ERR , +"EM initialization failure\n" ); + goto fail; + } + no_rsv_flag = false; + } - rc =tf_em_int_bind (tfp, &em_cfg); -if (rc) { +/* +* There is no rm reserved for any tables +* +*/ +if (no_rsv_flag) {TFP_DRV_LOG (ERR , -"EM initialization failure\n" ); - goto fail; +"No rm reserved for any tables\n" ); +return -ENOMEM ; }/*
drivers/net/bnxt/tf_core/tf_session.c +1 -1
@@ -180,7 +180,7 @@ tf_session_create(struct tf *tfp, &session->dev);/* Logging handled by dev_bind */ if (rc) -return rc; + goto cleanup;if (session->dev.ops->tf_dev_get_mailbox ==NULL ) {/* Log error */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 5/58 net/bnxt: update TRUFLOW resources
In reply to Ajit KhapardeFrom: Farah Smith <[email protected]>
- Remove unused tables from tf_tbl_type
- Encode flow type into flow handle (internal or external)
- Clean up Whitney resource tables
- Clean up Truflow CLI open tables and update Thor resources
- Add Thor SRAM and external pool types to core API
- Remove unneeded Stingray table reference
--- drivers/net/bnxt/tf_core/tf_core.c | 9 +- drivers/net/bnxt/tf_core/tf_core.h | 83 +++++---- drivers/net/bnxt/tf_core/tf_device.c | 5 +- drivers/net/bnxt/tf_core/tf_device_p4.c | 105 ++++------- drivers/net/bnxt/tf_core/tf_device_p4.h | 175 ++++++++++-------- drivers/net/bnxt/tf_core/tf_device_p45.h | 105 ----------- drivers/net/bnxt/tf_core/tf_device_p58.c | 61 +++--- drivers/net/bnxt/tf_core/tf_device_p58.h | 6 + drivers/net/bnxt/tf_core/tf_em_common.c | 2 +- drivers/net/bnxt/tf_core/tf_em_internal.c | 2 +- drivers/net/bnxt/tf_core/tf_ext_flow_handle.h | 15 +- drivers/net/bnxt/tf_core/tf_msg.c | 3 +- drivers/net/bnxt/tf_core/tf_rm.c | 14 +- drivers/net/bnxt/tf_core/tf_shadow_tbl.c | 2 - drivers/net/bnxt/tf_core/tf_util.c | 8 +- 15 files changed, 246 insertions(+), 349 deletions(-) delete mode 100644 drivers/net/bnxt/tf_core/tf_device_p45.h
drivers/net/bnxt/tf_core/tf_core.c +5 -4
@@ -19,6 +19,7 @@#include "rand.h" #include "tf_common.h" #include "hwrm_tf.h" +#include "tf_ext_flow_handle.h" int tf_open_session(struct tf *tfp,
@@ -251,6 +252,7 @@ int tf_delete_em_entry(struct tf *tfp,struct tf_session *tfs;struct tf_dev_info *dev;int rc; +unsigned int flag =0 ;TF_CHECK_PARMS2 (tfp, parms);
@@ -274,12 +276,11 @@ int tf_delete_em_entry(struct tf *tfp,return rc; } -if (parms->mem ==TF_MEM_EXTERNAL ) - rc = dev->ops->tf_dev_delete_ext_em_entry (tfp, parms); -else if (parms->mem ==TF_MEM_INTERNAL ) +TF_GET_FLAG_FROM_FLOW_HANDLE (parms->flow_handle, flag); +if ((flag &TF_FLAGS_FLOW_HANDLE_INTERNAL )) rc = dev->ops->tf_dev_delete_int_em_entry (tfp, parms);else -return -EINVAL ; + rc = dev->ops->tf_dev_delete_ext_em_entry (tfp, parms);if (rc) { TFP_DRV_LOG(ERR,
drivers/net/bnxt/tf_core/tf_core.h +51 -32
161 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.c +1 -4
@@ -153,11 +153,8 @@ tf_dev_bind_p4(struct tf *tfp,/* * EEM */ -if (dev_handle->type ==TF_DEVICE_TYPE_WH ) - em_cfg.cfg = tf_em_ext_p4; -else - em_cfg.cfg = tf_em_ext_p45; + em_cfg.cfg = tf_em_ext_p4; rsv_cnt = tf_dev_reservation_check(tfp, TF_EM_TBL_TYPE_MAX, em_cfg.cfg,
drivers/net/bnxt/tf_core/tf_device_p4.c +35 -70
111 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p4.h +100 -75
198 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p45.h deleted +0 -105
105 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.c +21 -40
68 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.h +6 -0
@@ -49,6 +49,12 @@ struct tf_rm_element_cfg tf_tcam_p58[TF_TCAM_TBL_TYPE_MAX] = { };struct tf_rm_element_cfg tf_tbl_p58[TF_TBL_TYPE_MAX ] = { + [TF_TBL_TYPE_EM_FKB ] = { +TF_RM_ELEM_CFG_HCAPI_BA ,CFA_RESOURCE_TYPE_P58_EM_FKB + }, + [TF_TBL_TYPE_WC_FKB ] = { +TF_RM_ELEM_CFG_HCAPI_BA ,CFA_RESOURCE_TYPE_P58_WC_FKB + }, [TF_TBL_TYPE_METER_PROF ] = {TF_RM_ELEM_CFG_HCAPI_BA ,CFA_RESOURCE_TYPE_P58_METER_PROF },
drivers/net/bnxt/tf_core/tf_em_common.c +1 -1
@@ -777,7 +777,7 @@ tf_insert_eem_entry(struct tf_tbl_scope_cb *tbl_scope_cb,TF_SET_FIELDS_IN_FLOW_HANDLE (parms->flow_handle,0 ,0 , -0 , +TF_FLAGS_FLOW_HANDLE_EXTERNAL , index,0 , table_type);
drivers/net/bnxt/tf_core/tf_em_internal.c +1 -1
@@ -203,7 +203,7 @@ tf_em_insert_int_entry(struct tf *tfp,TF_SET_FIELDS_IN_FLOW_HANDLE (parms->flow_handle, (uint32_t )num_of_entries,0 , -0 , +TF_FLAGS_FLOW_HANDLE_INTERNAL , rptr_index, rptr_entry,0 );
drivers/net/bnxt/tf_core/tf_ext_flow_handle.h +13 -2
@@ -19,6 +19,9 @@#define TF_HASH_TYPE_FLOW_HANDLE_MASK 0x0000000100000000ULL#define TF_HASH_TYPE_FLOW_HANDLE_SFT 32 +#define TF_FLAGS_FLOW_HANDLE_INTERNAL 0x2 +#define TF_FLAGS_FLOW_HANDLE_EXTERNAL 0x0 +#define TF_FLOW_HANDLE_MASK (TF_NUM_KEY_ENTRIES_FLOW_HANDLE_MASK | \ TF_FLOW_TYPE_FLOW_HANDLE_MASK | \ TF_FLAGS_FLOW_HANDLE_MASK | \
@@ -92,15 +95,23 @@ do { \#define TF_GET_NUM_KEY_ENTRIES_FROM_FLOW_HANDLE (flow_handle, \ num_key_entries) \ +do { \ (num_key_entries = \ (((flow_handle) & TF_NUM_KEY_ENTRIES_FLOW_HANDLE_MASK) >> \ - TF_NUM_KEY_ENTRIES_FLOW_HANDLE_SFT)) \ + TF_NUM_KEY_ENTRIES_FLOW_HANDLE_SFT)); \ +} while (0)#define TF_GET_ENTRY_NUM_FROM_FLOW_HANDLE (flow_handle, \ entry_num) \ +do { \ (entry_num = \ (((flow_handle) & TF_ENTRY_NUM_FLOW_HANDLE_MASK) >> \ - TF_ENTRY_NUM_FLOW_HANDLE_SFT)) \ + TF_ENTRY_NUM_FLOW_HANDLE_SFT)); \ +} while (0) + +#define TF_GET_FLAG_FROM_FLOW_HANDLE (flow_handle, flag) \ + (flag = (((flow_handle) & TF_FLAGS_FLOW_HANDLE_MASK) >>\ + TF_FLAGS_FLOW_HANDLE_SFT))/* * 32 bit Flow ID handlers
drivers/net/bnxt/tf_core/tf_msg.c +1 -2
@@ -415,7 +415,6 @@ tf_msg_session_resc_qcaps(struct tf *tfp,/* Post process the response */ data = (struct tf_rm_resc_req_entry *)qcaps_buf.va_addr; -for (i =0 ; i < size; i++) { query[i].type =tfp_le_to_cpu_32 (data[i].type); query[i].min =tfp_le_to_cpu_16 (data[i].min);
@@ -1462,7 +1461,7 @@ tf_msg_set_global_cfg(struct tf *tfp,/* Only set mask if pointer is provided */ if (params->config_mask) { -tfp_memcpy (req.data + params->config_sz_in_bytes, +tfp_memcpy (req.mask, params->config_mask, params->config_sz_in_bytes); }
drivers/net/bnxt/tf_core/tf_rm.c +10 -4
@@ -486,14 +486,20 @@ tf_rm_create_db(struct tf *tfp, req[j].max = parms->alloc_cnt[i]; j++; }else { +const char *type_str; +uint16_t hcapi_type = parms->cfg[i].hcapi_type; + + dev->ops->tf_dev_get_resource_str (tfp, + hcapi_type, + &type_str);TFP_DRV_LOG (ERR , -"%s: Resource failure, type:%d\n" , -tf_dir_2_str (parms->dir), - parms->cfg[i].hcapi_type); +"%s: Resource failure, type:%d:%s\n" , +tf_dir_2_str (parms->dir), + hcapi_type, type_str);TFP_DRV_LOG (ERR ,"req:%d, avail:%d\n" , parms->alloc_cnt[i], - query[parms->cfg[i].hcapi_type].max); + query[hcapi_type].max);return -EINVAL ; } }
drivers/net/bnxt/tf_core/tf_shadow_tbl.c +0 -2
@@ -177,8 +177,6 @@ static int tf_shadow_tbl_is_searchable(enum tf_tbl_type type)case TF_TBL_TYPE_ACT_SP_SMAC_IPV4 :case TF_TBL_TYPE_ACT_SP_SMAC_IPV6 :case TF_TBL_TYPE_ACT_MODIFY_IPV4 : -case TF_TBL_TYPE_ACT_MODIFY_SPORT : -case TF_TBL_TYPE_ACT_MODIFY_DPORT : rc =1 ;break ;default :
drivers/net/bnxt/tf_core/tf_util.c +1 -7
@@ -88,12 +88,8 @@ tf_tbl_type_2_str(enum tf_tbl_type tbl_type)return "Source Properties SMAC IPv6" ;case TF_TBL_TYPE_ACT_STATS_64 :return "Stats 64B" ; -case TF_TBL_TYPE_ACT_MODIFY_SPORT : -return "NAT Source Port" ; -case TF_TBL_TYPE_ACT_MODIFY_DPORT : -return "NAT Destination Port" ;case TF_TBL_TYPE_ACT_MODIFY_IPV4 : -return "NAT IPv4" ; +return "Modify IPv4" ;case TF_TBL_TYPE_METER_PROF :return "Meter Profile" ;case TF_TBL_TYPE_METER_INST :
@@ -116,8 +112,6 @@ tf_tbl_type_2_str(enum tf_tbl_type tbl_type)return "Range" ;case TF_TBL_TYPE_LAG :return "Link Aggregation" ; -case TF_TBL_TYPE_VNIC_SVIF : -return "VNIC SVIF" ;case TF_TBL_TYPE_EM_FKB :return "EM Flexible Key Builder" ;case TF_TBL_TYPE_WC_FKB :
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 6/58 net/bnxt: add support for EM with FKB
In reply to Ajit KhapardeFrom: Peter Spreadborough <[email protected]>
Main TF changes to support EM insert with FKB. Flexible Key builder is required to create Wild Card and Exact Match keys for TCAM lookups.
--- drivers/net/bnxt/tf_core/meson.build | 1 + drivers/net/bnxt/tf_core/tf_device_p58.c | 14 +- drivers/net/bnxt/tf_core/tf_em.h | 32 +++++ .../net/bnxt/tf_core/tf_em_hash_internal.c | 123 ++++++++++++++++++ drivers/net/bnxt/tf_core/tf_em_internal.c | 3 +- drivers/net/bnxt/tf_core/tf_msg.c | 96 ++++++++++++++ drivers/net/bnxt/tf_core/tf_msg.h | 35 +++++ 7 files changed, 295 insertions(+), 9 deletions(-) create mode 100644 drivers/net/bnxt/tf_core/tf_em_hash_internal.c
drivers/net/bnxt/tf_core/meson.build +1 -0
@@ -30,5 +30,6 @@ sources += files( 'll.c', 'tf_global_cfg.c', 'tf_em_host.c', + 'tf_em_hash_internal.c', 'tf_shadow_identifier.c', 'tf_hash.c')
drivers/net/bnxt/tf_core/tf_device_p58.c +7 -7
@@ -256,14 +256,14 @@ const struct tf_dev_ops tf_dev_ops_p58 = { .tf_dev_alloc_search_tcam = tf_tcam_alloc_search, .tf_dev_set_tcam = tf_tcam_set, .tf_dev_get_tcam = NULL, - .tf_dev_insert_int_em_entry = tf_em_insert_int_entry, - .tf_dev_delete_int_em_entry = tf_em_delete_int_entry, - .tf_dev_insert_ext_em_entry = tf_em_insert_ext_entry, - .tf_dev_delete_ext_em_entry = tf_em_delete_ext_entry, - .tf_dev_alloc_tbl_scope = tf_em_ext_common_alloc, - .tf_dev_map_tbl_scope = tf_em_ext_map_tbl_scope, + .tf_dev_insert_int_em_entry = tf_em_hash_insert_int_entry, + .tf_dev_delete_int_em_entry = tf_em_hash_delete_int_entry, + .tf_dev_insert_ext_em_entry = NULL, + .tf_dev_delete_ext_em_entry = NULL, + .tf_dev_alloc_tbl_scope = NULL, + .tf_dev_map_tbl_scope = NULL, .tf_dev_map_parif = tf_dev_p58_map_parif, - .tf_dev_free_tbl_scope = tf_em_ext_common_free, + .tf_dev_free_tbl_scope = NULL, .tf_dev_set_if_tbl = tf_if_tbl_set, .tf_dev_get_if_tbl = tf_if_tbl_get, .tf_dev_set_global_cfg = tf_global_cfg_set,
drivers/net/bnxt/tf_core/tf_em.h +32 -0
@@ -197,6 +197,38 @@ int tf_em_insert_int_entry(struct tf *tfp,int tf_em_delete_int_entry (struct tf *tfp,struct tf_delete_em_entry_parms *parms); +/** +* Insert record in to internal EM table +* +* [in] tfp +* Pointer to TruFlow handle +* +* [in] parms +* Pointer to input parameters +* +* Returns: +* 0 - Success +* -EINVAL - Parameter error +*/ +int tf_em_hash_insert_int_entry (struct tf *tfp, +struct tf_insert_em_entry_parms *parms); + +/** +* Delete record from internal EM table +* +* [in] tfp +* Pointer to TruFlow handle +* +* [in] parms +* Pointer to input parameters +* +* Returns: +* 0 - Success +* -EINVAL - Parameter error +*/ +int tf_em_hash_delete_int_entry (struct tf *tfp, +struct tf_delete_em_entry_parms *parms); +/** * Insert record in to external EEM table *
drivers/net/bnxt/tf_core/tf_em_hash_internal.c new file +123 -0
123 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_internal.c +1 -2
@@ -30,11 +30,10 @@ static void *em_db[TF_DIR_MAX];*/ static uint8_t init; -/** * EM Pool */ -static struct stack em_pool[TF_DIR_MAX ]; +struct stack em_pool[TF_DIR_MAX ];/** * Create EM Tbl pool of memory indexes.
drivers/net/bnxt/tf_core/tf_msg.c +96 -0
108 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg.h +35 -0
@@ -225,6 +225,41 @@ int tf_msg_insert_em_internal_entry(struct tf *tfp,uint16_t *rptr_index, uint8_t *rptr_entry, uint8_t *num_of_entries); +/** +* Sends EM hash internal insert request to Firmware +* +* [in] tfp +* Pointer to TF handle +* +* [in] params +* Pointer to em insert parameter list +* +* [in] key0_hash +* CRC32 hash of key +* +* [in] key1_hash +* Lookup3 hash of key +* +* [in] rptr_index +* Record ptr index +* +* [in] rptr_entry +* Record ptr entry +* +* [in] num_of_entries +* Number of entries to insert +* +* Returns: +* 0 on Success else internal Truflow error +*/ +int +tf_msg_hash_insert_em_internal_entry (struct tf *tfp, +struct tf_insert_em_entry_parms *em_parms, +uint32_t key0_hash, +uint32_t key1_hash, +uint16_t *rptr_index, +uint8_t *rptr_entry, +uint8_t *num_of_entries);/** * Sends EM internal delete request to Firmware *
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 7/58 net/bnxt: support L2 Context TCAM ops
In reply to Ajit KhapardeFrom: Jay Ding <[email protected]>
- Implement TCAM get in host
- Add Thor support for TCAM set/free
--- drivers/net/bnxt/tf_core/hwrm_tf.h | 1 + drivers/net/bnxt/tf_core/tf_core.c | 65 +++++++++++++++-- drivers/net/bnxt/tf_core/tf_device.h | 12 ++++ drivers/net/bnxt/tf_core/tf_device_p4.c | 6 ++ drivers/net/bnxt/tf_core/tf_device_p58.c | 9 ++- drivers/net/bnxt/tf_core/tf_msg.c | 52 ++++++++++++++ drivers/net/bnxt/tf_core/tf_msg.h | 16 +++++ drivers/net/bnxt/tf_core/tf_tcam.c | 89 +++++++++++++++++++++++- drivers/net/bnxt/tf_core/tf_tcam.h | 4 ++ 9 files changed, 248 insertions(+), 6 deletions(-)
drivers/net/bnxt/tf_core/hwrm_tf.h +1 -0
@@ -65,6 +65,7 @@ typedef enum tf_subtype {#define TF_BITS2BYTES (x) (((x) + 7) >> 3)#define TF_BITS2BYTES_WORD_ALIGN (x) ((((x) + 31) >> 5) * 4) +#define TF_BITS2BYTES_64B_WORD_ALIGN (x) ((((x) + 63) >> 6) * 8)struct tf_set_global_cfg_input ;struct tf_get_global_cfg_input ;
drivers/net/bnxt/tf_core/tf_core.c +61 -4
85 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.h +12 -0
@@ -736,6 +736,18 @@ struct tf_dev_ops {* mailbox */ int (*tf_dev_get_mailbox)(void ); + +/** +* Convert length in bit to length in byte and align to word. +* The word length depends on device type. +* +* [in] size +* Size in bit +* +* Returns +* Size in byte +*/ +int (*tf_dev_word_align)(uint16_t size); };/**
drivers/net/bnxt/tf_core/tf_device_p4.c +6 -0
@@ -212,6 +212,10 @@ static int tf_dev_p4_get_mailbox(void)return TF_KONG_MB ; } +static int tf_dev_p4_word_align (uint16_t size) +{ +return ((((size) +31 ) >>5 ) *4 ); +}/** * Truflow P4 device specific functions
@@ -250,6 +254,7 @@ const struct tf_dev_ops tf_dev_ops_p4_init = { .tf_dev_set_global_cfg = NULL, .tf_dev_get_global_cfg = NULL, .tf_dev_get_mailbox = tf_dev_p4_get_mailbox, + .tf_dev_word_align = NULL, };/**
@@ -289,4 +294,5 @@ const struct tf_dev_ops tf_dev_ops_p4 = { .tf_dev_set_global_cfg = tf_global_cfg_set, .tf_dev_get_global_cfg = tf_global_cfg_get, .tf_dev_get_mailbox = tf_dev_p4_get_mailbox, + .tf_dev_word_align = tf_dev_p4_word_align, };
drivers/net/bnxt/tf_core/tf_device_p58.c +8 -1
@@ -193,6 +193,11 @@ static int tf_dev_p58_get_mailbox(void)return TF_CHIMP_MB ; } +static int tf_dev_p58_word_align (uint16_t size) +{ +return ((((size) +63 ) >>6 ) *8 ); +} +/** * Truflow P58 device specific functions */
@@ -230,6 +235,7 @@ const struct tf_dev_ops tf_dev_ops_p58_init = { .tf_dev_set_global_cfg = NULL, .tf_dev_get_global_cfg = NULL, .tf_dev_get_mailbox = tf_dev_p58_get_mailbox, + .tf_dev_word_align = NULL, };/**
@@ -255,7 +261,7 @@ const struct tf_dev_ops tf_dev_ops_p58 = { .tf_dev_free_tcam = tf_tcam_free, .tf_dev_alloc_search_tcam = tf_tcam_alloc_search, .tf_dev_set_tcam = tf_tcam_set, - .tf_dev_get_tcam = NULL, + .tf_dev_get_tcam = tf_tcam_get, .tf_dev_insert_int_em_entry = tf_em_hash_insert_int_entry, .tf_dev_delete_int_em_entry = tf_em_hash_delete_int_entry, .tf_dev_insert_ext_em_entry = NULL,
@@ -269,4 +275,5 @@ const struct tf_dev_ops tf_dev_ops_p58 = { .tf_dev_set_global_cfg = tf_global_cfg_set, .tf_dev_get_global_cfg = tf_global_cfg_get, .tf_dev_get_mailbox = tf_dev_p58_get_mailbox, + .tf_dev_word_align = tf_dev_p58_word_align, };
drivers/net/bnxt/tf_core/tf_msg.c +52 -0
58 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg.h +16 -0
@@ -412,6 +412,22 @@ int tf_msg_tcam_entry_set(struct tf *tfp,struct tf_dev_info *dev, struct tf_tcam_set_parms *parms); +/** +* Sends tcam entry 'get' to the Firmware. +* +* [in] tfp +* Pointer to session handle +* +* [in] parms +* Pointer to get parameters +* +* Returns: +* 0 on Success else internal Truflow error +*/ +int tf_msg_tcam_entry_get (struct tf *tfp, +struct tf_dev_info *dev, +struct tf_tcam_get_parms *parms); +/** * Sends tcam entry 'free' to the Firmware. *
drivers/net/bnxt/tf_core/tf_tcam.c +88 -1
95 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam.h +4 -0
@@ -207,6 +207,10 @@ struct tf_tcam_get_parms {* [in] Type of object to get */ enum tf_tcam_tbl_type type; +/** +* [in] Type of HCAPI +*/ +uint16_t hcapi_type;/** * [in] Entry index to read */
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 8/58 net/bnxt: add action SRAM translation
In reply to Ajit KhapardeFrom: Farah Smith <[email protected]>
- Translate Truflow action types for Thor to HCAPI RM resource defined SRAM banks.
- move module type enum definitions to tf_core API
- Switch to subtype concept for RM.
- alloc/free working for Thor SRAM table type for full AR.
--- drivers/net/bnxt/bnxt_util.h | 3 + drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h | 339 +++------ drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h | 387 +--------- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h | 411 ++++++++++ drivers/net/bnxt/tf_core/meson.build | 1 - drivers/net/bnxt/tf_core/tf_core.h | 24 + drivers/net/bnxt/tf_core/tf_device.c | 43 +- drivers/net/bnxt/tf_core/tf_device.h | 23 - drivers/net/bnxt/tf_core/tf_device_p4.c | 21 +- drivers/net/bnxt/tf_core/tf_device_p58.c | 53 +- drivers/net/bnxt/tf_core/tf_device_p58.h | 110 ++- drivers/net/bnxt/tf_core/tf_em_common.c | 4 +- drivers/net/bnxt/tf_core/tf_em_host.c | 6 +- drivers/net/bnxt/tf_core/tf_em_internal.c | 4 +- drivers/net/bnxt/tf_core/tf_identifier.c | 10 +- drivers/net/bnxt/tf_core/tf_if_tbl.c | 2 +- drivers/net/bnxt/tf_core/tf_rm.c | 508 ++++++++----- drivers/net/bnxt/tf_core/tf_rm.h | 109 ++- drivers/net/bnxt/tf_core/tf_shadow_tbl.c | 783 -------------------- drivers/net/bnxt/tf_core/tf_shadow_tbl.h | 256 ------- drivers/net/bnxt/tf_core/tf_tbl.c | 238 +----- drivers/net/bnxt/tf_core/tf_tcam.c | 20 +- drivers/net/bnxt/tf_core/tf_util.c | 36 +- drivers/net/bnxt/tf_core/tf_util.h | 26 +- 24 files changed, 1130 insertions(+), 2287 deletions(-) create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.c delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.h
drivers/net/bnxt/bnxt_util.h +3 -0
@@ -9,6 +9,9 @@#ifndef BIT #define BIT (n) (1UL << (n))#endif /* BIT */ +#ifndef BIT_MASK +#define BIT_MASK (len) (BIT(len) - 1) +#endif /* BIT_MASK */ #define PCI_SUBSYSTEM_ID_OFFSET 0x2e
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +92 -247
373 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h +3 -384
406 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h new file +411 -0
411 lines not on this page · raw message
drivers/net/bnxt/tf_core/meson.build +0 -1
@@ -22,7 +22,6 @@ sources += files( 'tf_device_p4.c', 'tf_device_p58.c', 'tf_identifier.c', - 'tf_shadow_tbl.c', 'tf_shadow_tcam.c', 'tf_tcam.c', 'tf_util.c',
drivers/net/bnxt/tf_core/tf_core.h +24 -0
@@ -153,6 +153,30 @@ enum tf_device_type { TF_DEVICE_TYPE_MAX /**< Maximum */ }; +/** +* Module types +*/ +enum tf_module_type { +/** +* Identifier module +*/ +TF_MODULE_TYPE_IDENTIFIER , +/** +* Table type module +*/ +TF_MODULE_TYPE_TABLE , +/** +* TCAM module +*/ +TF_MODULE_TYPE_TCAM , +/** +* EM module +*/ +TF_MODULE_TYPE_EM , +TF_MODULE_TYPE_MAX +}; + +/** * Identifier resource types */
drivers/net/bnxt/tf_core/tf_device.c +16 -27
125 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.h +0 -23
@@ -16,29 +16,6 @@struct tf ;struct tf_session ; -/** -* Device module types -*/ -enum tf_device_module_type { -/** -* Identifier module -*/ -TF_DEVICE_MODULE_TYPE_IDENTIFIER , -/** -* Table type module -*/ -TF_DEVICE_MODULE_TYPE_TABLE , -/** -* TCAM module -*/ -TF_DEVICE_MODULE_TYPE_TCAM , -/** -* EM module -*/ -TF_DEVICE_MODULE_TYPE_EM , -TF_DEVICE_MODULE_TYPE_MAX -}; -/** * The Device module provides a general device template. A supported * device type should implement one or more of the listed function
drivers/net/bnxt/tf_core/tf_device_p4.c +1 -20
@@ -74,29 +74,10 @@ static int tf_dev_p4_get_max_types(struct tf *tfp, uint16_t *max_types) { - struct tf_session *tfs; -struct tf_dev_info *dev; -int rc; -if (max_types ==NULL || tfp ==NULL )return -EINVAL ; -/* Retrieve the session information */ - rc =tf_session_get_session (tfp, &tfs); -if (rc) -return rc; - -/* Retrieve the device information */ - rc =tf_session_get_device (tfs, &dev); -if (rc) -return rc; - -if (dev->type ==TF_DEVICE_TYPE_WH ) - *max_types =CFA_RESOURCE_TYPE_P4_LAST +1 ; -else if (dev->type ==TF_DEVICE_TYPE_SR ) - *max_types =CFA_RESOURCE_TYPE_P45_LAST +1 ; -else -return -ENODEV ; + *max_types =CFA_RESOURCE_TYPE_P4_LAST +1 ;return 0 ; }
drivers/net/bnxt/tf_core/tf_device_p58.c +2 -51
75 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.h +109 -1
122 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_common.c +2 -2
@@ -54,7 +54,7 @@ tbl_scope_cb_find(uint32_t tbl_scope_id)/* Check that id is valid */ parms.rm_db = eem_db[TF_DIR_RX ]; - parms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + parms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; parms.index = tbl_scope_id; parms.allocated = &allocated;
@@ -895,7 +895,7 @@ tf_em_ext_common_bind(struct tf *tfp,return -EINVAL ; } - db_cfg.type =TF_DEVICE_MODULE_TYPE_EM ; + db_cfg.module =TF_MODULE_TYPE_EM ; db_cfg.num_elements = parms->num_elements; db_cfg.cfg = parms->cfg;
drivers/net/bnxt/tf_core/tf_em_host.c +3 -3
@@ -379,7 +379,7 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms)/* Get Table Scope control block from the session pool */ aparms.rm_db = eem_db[TF_DIR_RX ]; - aparms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + aparms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; aparms.index = (uint32_t *)&parms->tbl_scope_id; rc =tf_rm_allocate (&aparms);if (rc) {
@@ -488,7 +488,7 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms) cleanup:/* Free Table control block */ fparms.rm_db = eem_db[TF_DIR_RX ]; - fparms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + fparms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; fparms.index = parms->tbl_scope_id;tf_rm_free (&fparms);return -EINVAL ;
@@ -512,7 +512,7 @@ tf_em_ext_free(struct tf *tfp,/* Free Table control block */ aparms.rm_db = eem_db[TF_DIR_RX ]; - aparms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + aparms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; aparms.index = parms->tbl_scope_id; rc =tf_rm_free (&aparms);if (rc) {
drivers/net/bnxt/tf_core/tf_em_internal.c +2 -2
@@ -251,7 +251,7 @@ tf_em_int_bind(struct tf *tfp,return -EINVAL ; } - db_cfg.type =TF_DEVICE_MODULE_TYPE_EM ; + db_cfg.module =TF_MODULE_TYPE_EM ; db_cfg.num_elements = parms->num_elements; db_cfg.cfg = parms->cfg;
@@ -294,7 +294,7 @@ tf_em_int_bind(struct tf *tfp,for (i =0 ; i <TF_DIR_MAX ; i++) { iparms.rm_db = em_db[i]; - iparms.db_index =TF_EM_DB_EM_REC ; + iparms.subtype =TF_EM_DB_EM_REC ; iparms.info = &info; rc =tf_rm_get_info (&iparms);
drivers/net/bnxt/tf_core/tf_identifier.c +5 -5
@@ -52,7 +52,7 @@ tf_ident_bind(struct tf *tfp,return -EINVAL ; } - db_cfg.type =TF_DEVICE_MODULE_TYPE_IDENTIFIER ; + db_cfg.module =TF_MODULE_TYPE_IDENTIFIER ; db_cfg.num_elements = parms->num_elements; db_cfg.cfg = parms->cfg;
@@ -161,7 +161,7 @@ tf_ident_alloc(struct tf *tfp __rte_unused,/* Allocate requested element */ aparms.rm_db = ident_db[parms->dir]; - aparms.db_index = parms->type; + aparms.subtype = parms->type; aparms.index = &id; aparms.base_index = &base_id; rc =tf_rm_allocate (&aparms);
@@ -215,7 +215,7 @@ tf_ident_free(struct tf *tfp __rte_unused,/* Check if element is in use */ aparms.rm_db = ident_db[parms->dir]; - aparms.db_index = parms->type; + aparms.subtype = parms->type; aparms.index = parms->id; aparms.base_index = &base_id; aparms.allocated = &allocated;
@@ -255,7 +255,7 @@ tf_ident_free(struct tf *tfp __rte_unused,/* Free requested element */ fparms.rm_db = ident_db[parms->dir]; - fparms.db_index = parms->type; + fparms.subtype = parms->type; fparms.index = parms->id; rc =tf_rm_free (&fparms);if (rc) {
@@ -298,7 +298,7 @@ tf_ident_search(struct tf *tfp __rte_unused,/* Check if element is in use */ aparms.rm_db = ident_db[parms->dir]; - aparms.db_index = parms->type; + aparms.subtype = parms->type; aparms.index = parms->search_id; aparms.base_index = &base_id; aparms.allocated = &allocated;
drivers/net/bnxt/tf_core/tf_if_tbl.c +1 -1
@@ -144,7 +144,7 @@ int tf_if_tbl_get(struct tf *tfp, struct tf_if_tbl_get_parms *parms) { - int rc; + int rc = 0;struct tf_if_tbl_get_hcapi_parms hparms;TF_CHECK_PARMS3 (tfp, parms, parms->data);
drivers/net/bnxt/tf_core/tf_rm.c +331 -177
866 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_rm.h +74 -35
204 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_tbl.c deleted +0 -783
209 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_tbl.h deleted +0 -256
256 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tbl.c +12 -226
238 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH v2 08/58] net/bnxt: add action SRAM translation
13/06/2021 02:06, Ajit Khaparde:
Quoted 8 lines
From: Farah Smith <[email protected]>
- Translate Truflow action types for Thor to HCAPI RM resource defined SRAM banks.
- move module type enum definitions totf_coreAPI
- Switch to subtype concept for RM.
- alloc/free working for Thor SRAM table type for full AR.
Quoted 5 lines
Signed-off-by Farah Smith <[email protected]>Signed-off-by Randy Schacher <[email protected]>Signed-off-by Venkat Duvvuru <[email protected]>Reviewed-by Peter Spreadborough <[email protected]>Reviewed-by Ajit Khaparde <[email protected]>
[...]
I see 2 issues in the beginning of this patch:
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h line 4
Quoted 10 lines
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +3
-3@@ -1,281 +1,126 @@ -/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom -* All rights reserved. +/* +* Copyright(c) Broadcom Limited. +* All rights reserved. */
SPDX copyright is removed.
Quoted 5 lines
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +4
-0+/*! +* \file +* \brief Exported functions for CFA HW programming +*/
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h line 19
Quoted 10 lines
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +2
-0#ifndef _HCAPI_CFA_H_#define _HCAPI_CFA_H_#include <stdio.h> +#include <stddef.h> #include <string.h> #include <stdbool.h> #include <stdint.h> #include <stddef.h> +#include <errno.h>
stddef.h is included twice.
Please fix in next-net-brcm, thanks.
PATCH v3 1/1 net/bnxt: add action SRAM translation
From: Farah Smith <[email protected]>
- Translate Truflow action types for Thor to HCAPI RM resource defined SRAM banks.
- move module type enum definitions to tf_core API
- Switch to subtype concept for RM.
- alloc/free working for Thor SRAM table type for full AR.
---v1->v2: rebased to latest code changes.v2->v3: addressed review comments.
--- drivers/net/bnxt/bnxt_util.h | 3 + drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h | 328 +++----- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h | 387 +--------- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h | 411 ++++++++++ drivers/net/bnxt/tf_core/meson.build | 1 - drivers/net/bnxt/tf_core/tf_core.h | 24 + drivers/net/bnxt/tf_core/tf_device.c | 43 +- drivers/net/bnxt/tf_core/tf_device.h | 23 - drivers/net/bnxt/tf_core/tf_device_p4.c | 21 +- drivers/net/bnxt/tf_core/tf_device_p58.c | 53 +- drivers/net/bnxt/tf_core/tf_device_p58.h | 110 ++- drivers/net/bnxt/tf_core/tf_em_common.c | 4 +- drivers/net/bnxt/tf_core/tf_em_host.c | 6 +- drivers/net/bnxt/tf_core/tf_em_internal.c | 4 +- drivers/net/bnxt/tf_core/tf_identifier.c | 10 +- drivers/net/bnxt/tf_core/tf_if_tbl.c | 2 +- drivers/net/bnxt/tf_core/tf_rm.c | 508 ++++++++----- drivers/net/bnxt/tf_core/tf_rm.h | 109 ++- drivers/net/bnxt/tf_core/tf_shadow_tbl.c | 783 -------------------- drivers/net/bnxt/tf_core/tf_shadow_tbl.h | 256 ------- drivers/net/bnxt/tf_core/tf_tbl.c | 238 +----- drivers/net/bnxt/tf_core/tf_tcam.c | 20 +- drivers/net/bnxt/tf_core/tf_util.c | 36 +- drivers/net/bnxt/tf_core/tf_util.h | 26 +- 24 files changed, 1122 insertions(+), 2284 deletions(-) create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.c delete mode 100644 drivers/net/bnxt/tf_core/tf_shadow_tbl.h
drivers/net/bnxt/bnxt_util.h +3 -0
@@ -9,6 +9,9 @@#ifndef BIT #define BIT (n) (1UL << (n))#endif /* BIT */ +#ifndef BIT_MASK +#define BIT_MASK (len) (BIT(len) - 1) +#endif /* BIT_MASK */ #define PCI_SUBSYSTEM_ID_OFFSET 0x2e
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +84 -244
355 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h +3 -384
406 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h new file +411 -0
411 lines not on this page · raw message
drivers/net/bnxt/tf_core/meson.build +0 -1
@@ -22,7 +22,6 @@ sources += files( 'tf_device_p4.c', 'tf_device_p58.c', 'tf_identifier.c', - 'tf_shadow_tbl.c', 'tf_shadow_tcam.c', 'tf_tcam.c', 'tf_util.c',
drivers/net/bnxt/tf_core/tf_core.h +24 -0
@@ -153,6 +153,30 @@ enum tf_device_type { TF_DEVICE_TYPE_MAX /**< Maximum */ }; +/** +* Module types +*/ +enum tf_module_type { +/** +* Identifier module +*/ +TF_MODULE_TYPE_IDENTIFIER , +/** +* Table type module +*/ +TF_MODULE_TYPE_TABLE , +/** +* TCAM module +*/ +TF_MODULE_TYPE_TCAM , +/** +* EM module +*/ +TF_MODULE_TYPE_EM , +TF_MODULE_TYPE_MAX +}; + +/** * Identifier resource types */
drivers/net/bnxt/tf_core/tf_device.c +16 -27
125 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.h +0 -23
@@ -16,29 +16,6 @@struct tf ;struct tf_session ; -/** -* Device module types -*/ -enum tf_device_module_type { -/** -* Identifier module -*/ -TF_DEVICE_MODULE_TYPE_IDENTIFIER , -/** -* Table type module -*/ -TF_DEVICE_MODULE_TYPE_TABLE , -/** -* TCAM module -*/ -TF_DEVICE_MODULE_TYPE_TCAM , -/** -* EM module -*/ -TF_DEVICE_MODULE_TYPE_EM , -TF_DEVICE_MODULE_TYPE_MAX -}; -/** * The Device module provides a general device template. A supported * device type should implement one or more of the listed function
drivers/net/bnxt/tf_core/tf_device_p4.c +1 -20
@@ -74,29 +74,10 @@ static int tf_dev_p4_get_max_types(struct tf *tfp, uint16_t *max_types) { - struct tf_session *tfs; -struct tf_dev_info *dev; -int rc; -if (max_types ==NULL || tfp ==NULL )return -EINVAL ; -/* Retrieve the session information */ - rc =tf_session_get_session (tfp, &tfs); -if (rc) -return rc; - -/* Retrieve the device information */ - rc =tf_session_get_device (tfs, &dev); -if (rc) -return rc; - -if (dev->type ==TF_DEVICE_TYPE_WH ) - *max_types =CFA_RESOURCE_TYPE_P4_LAST +1 ; -else if (dev->type ==TF_DEVICE_TYPE_SR ) - *max_types =CFA_RESOURCE_TYPE_P45_LAST +1 ; -else -return -ENODEV ; + *max_types =CFA_RESOURCE_TYPE_P4_LAST +1 ;return 0 ; }
drivers/net/bnxt/tf_core/tf_device_p58.c +2 -51
75 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.h +109 -1
122 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_common.c +2 -2
@@ -54,7 +54,7 @@ tbl_scope_cb_find(uint32_t tbl_scope_id)/* Check that id is valid */ parms.rm_db = eem_db[TF_DIR_RX ]; - parms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + parms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; parms.index = tbl_scope_id; parms.allocated = &allocated;
@@ -895,7 +895,7 @@ tf_em_ext_common_bind(struct tf *tfp,return -EINVAL ; } - db_cfg.type =TF_DEVICE_MODULE_TYPE_EM ; + db_cfg.module =TF_MODULE_TYPE_EM ; db_cfg.num_elements = parms->num_elements; db_cfg.cfg = parms->cfg;
drivers/net/bnxt/tf_core/tf_em_host.c +3 -3
@@ -379,7 +379,7 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms)/* Get Table Scope control block from the session pool */ aparms.rm_db = eem_db[TF_DIR_RX ]; - aparms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + aparms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; aparms.index = (uint32_t *)&parms->tbl_scope_id; rc =tf_rm_allocate (&aparms);if (rc) {
@@ -488,7 +488,7 @@ tf_em_ext_alloc(struct tf *tfp, struct tf_alloc_tbl_scope_parms *parms) cleanup:/* Free Table control block */ fparms.rm_db = eem_db[TF_DIR_RX ]; - fparms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + fparms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; fparms.index = parms->tbl_scope_id;tf_rm_free (&fparms);return -EINVAL ;
@@ -512,7 +512,7 @@ tf_em_ext_free(struct tf *tfp,/* Free Table control block */ aparms.rm_db = eem_db[TF_DIR_RX ]; - aparms.db_index =TF_EM_TBL_TYPE_TBL_SCOPE ; + aparms.subtype =TF_EM_TBL_TYPE_TBL_SCOPE ; aparms.index = parms->tbl_scope_id; rc =tf_rm_free (&aparms);if (rc) {
drivers/net/bnxt/tf_core/tf_em_internal.c +2 -2
@@ -251,7 +251,7 @@ tf_em_int_bind(struct tf *tfp,return -EINVAL ; } - db_cfg.type =TF_DEVICE_MODULE_TYPE_EM ; + db_cfg.module =TF_MODULE_TYPE_EM ; db_cfg.num_elements = parms->num_elements; db_cfg.cfg = parms->cfg;
@@ -294,7 +294,7 @@ tf_em_int_bind(struct tf *tfp,for (i =0 ; i <TF_DIR_MAX ; i++) { iparms.rm_db = em_db[i]; - iparms.db_index =TF_EM_DB_EM_REC ; + iparms.subtype =TF_EM_DB_EM_REC ; iparms.info = &info; rc =tf_rm_get_info (&iparms);
drivers/net/bnxt/tf_core/tf_identifier.c +5 -5
@@ -52,7 +52,7 @@ tf_ident_bind(struct tf *tfp,return -EINVAL ; } - db_cfg.type =TF_DEVICE_MODULE_TYPE_IDENTIFIER ; + db_cfg.module =TF_MODULE_TYPE_IDENTIFIER ; db_cfg.num_elements = parms->num_elements; db_cfg.cfg = parms->cfg;
@@ -161,7 +161,7 @@ tf_ident_alloc(struct tf *tfp __rte_unused,/* Allocate requested element */ aparms.rm_db = ident_db[parms->dir]; - aparms.db_index = parms->type; + aparms.subtype = parms->type; aparms.index = &id; aparms.base_index = &base_id; rc =tf_rm_allocate (&aparms);
@@ -215,7 +215,7 @@ tf_ident_free(struct tf *tfp __rte_unused,/* Check if element is in use */ aparms.rm_db = ident_db[parms->dir]; - aparms.db_index = parms->type; + aparms.subtype = parms->type; aparms.index = parms->id; aparms.base_index = &base_id; aparms.allocated = &allocated;
@@ -255,7 +255,7 @@ tf_ident_free(struct tf *tfp __rte_unused,/* Free requested element */ fparms.rm_db = ident_db[parms->dir]; - fparms.db_index = parms->type; + fparms.subtype = parms->type; fparms.index = parms->id; rc =tf_rm_free (&fparms);if (rc) {
@@ -298,7 +298,7 @@ tf_ident_search(struct tf *tfp __rte_unused,/* Check if element is in use */ aparms.rm_db = ident_db[parms->dir]; - aparms.db_index = parms->type; + aparms.subtype = parms->type; aparms.index = parms->search_id; aparms.base_index = &base_id; aparms.allocated = &allocated;
drivers/net/bnxt/tf_core/tf_if_tbl.c +1 -1
@@ -144,7 +144,7 @@ int tf_if_tbl_get(struct tf *tfp, struct tf_if_tbl_get_parms *parms) { - int rc; + int rc = 0;struct tf_if_tbl_get_hcapi_parms hparms;TF_CHECK_PARMS3 (tfp, parms, parms->data);
drivers/net/bnxt/tf_core/tf_rm.c +331 -177
866 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_rm.h +74 -35
204 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_tbl.c deleted +0 -783
227 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_shadow_tbl.h deleted +0 -256
256 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tbl.c +12 -226
238 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH v2 08/58] net/bnxt: add action SRAM translation
In reply to Thomas MonjalonQuoted 49 lines · Thomas Monjalon
13/06/2021 02:06, Ajit Khaparde:
Quoted 8 lines
From: Farah Smith <[email protected]>
- Translate Truflow action types for Thor to HCAPI RM resource defined SRAM banks.
- move module type enum definitions totf_coreAPI
- Switch to subtype concept for RM.
- alloc/free working for Thor SRAM table type for full AR.Quoted 5 lines
Signed-off-by Farah Smith <[email protected]>Signed-off-by Randy Schacher <[email protected]>Signed-off-by Venkat Duvvuru <[email protected]>Reviewed-by Peter Spreadborough <[email protected]>Reviewed-by Ajit Khaparde <[email protected]>[...]
I see 2 issues in the beginning of this patch:
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h line 4
Quoted 10 lines
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +3
-3@@ -1,281 +1,126 @@ -/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2019-2021 Broadcom -* All rights reserved. +/* +* Copyright(c) Broadcom Limited. +* All rights reserved. */ SPDX copyright is removed.
Quoted 5 lines
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +4
-0+/*! +* \file +* \brief Exported functions for CFA HW programming +*/ drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h line 19
Quoted 10 lines
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +2
-0#ifndef _HCAPI_CFA_H_#define _HCAPI_CFA_H_#include <stdio.h> +#include <stddef.h> #include <string.h> #include <stdbool.h> #include <stdint.h> #include <stddef.h> +#include <errno.h>
stddef.his included twice.
Quoted 2 lines
Please fix in next-net-brcm, thanks.
Done.
Updated patch merged in dpdk-next-net-brcm. Thanks
PATCH v2 9/58 net/bnxt: add Thor WC TCAM support
In reply to Ajit KhapardeFrom: Jay Ding <[email protected]>
1. Add set/get/free/alloc for WC TCAM
2. Rework the key size in slice management.
3. Add 3 FKB WC keys for WC TCAM set cli cmd
4. Add transform key function for WC TCAM FKB key
5. Add checking for key buffer length for get_tcam
--- drivers/net/bnxt/tf_core/tf_core.c | 2 + drivers/net/bnxt/tf_core/tf_core.h | 5 +- drivers/net/bnxt/tf_core/tf_device_p4.c | 2 - drivers/net/bnxt/tf_core/tf_device_p58.c | 7 +- drivers/net/bnxt/tf_core/tf_device_p58.h | 3 + drivers/net/bnxt/tf_core/tf_msg.c | 31 ++-- drivers/net/bnxt/tf_core/tf_tcam.c | 192 ++++++++++++----------- 7 files changed, 132 insertions(+), 110 deletions(-)
drivers/net/bnxt/tf_core/tf_core.c +2 -0
@@ -842,8 +842,10 @@ tf_get_tcam_entry(struct tf *tfp __rte_unused, gparms.type = parms->tcam_tbl_type; gparms.idx = parms->idx; gparms.key = parms->key; + gparms.key_size = dev->ops->tf_dev_word_align (parms->key_sz_in_bits); gparms.mask = parms->mask; gparms.result = parms->result; + gparms.result_size =TF_BITS2BYTES_WORD_ALIGN (parms->result_sz_in_bits); rc = dev->ops->tf_dev_get_tcam (tfp, &gparms);if (rc) {
drivers/net/bnxt/tf_core/tf_core.h +3 -2
@@ -1286,7 +1286,7 @@ struct tf_get_tcam_entry_parms {*/ uint8_t *mask;/** -* [out] key size in bits +* [in/out] key size in bits */ uint16_t key_sz_in_bits;/**
@@ -1294,7 +1294,7 @@ struct tf_get_tcam_entry_parms {*/ uint8_t *result;/** -* [out] struct containing result size in bits +* [in/out] struct containing result size in bits */ uint16_t result_sz_in_bits; };
@@ -1961,6 +1961,7 @@ enum tf_tunnel_encap_offsets {enum tf_global_config_type {TF_TUNNEL_ENCAP ,/**< Tunnel Encap Config(TECT) */ TF_ACTION_BLOCK ,/**< Action Block Config(ABCR) */ +TF_COUNTER_CFG ,/**< Counter Configuration (CNTRS_CTRL) */ TF_GLOBAL_CFG_TYPE_MAX };
drivers/net/bnxt/tf_core/tf_device_p4.c +0 -2
@@ -144,8 +144,6 @@ tf_dev_p4_get_tcam_slice_info(struct tf *tfp __rte_unused, *num_slices_per_row =CFA_P4_WC_TCAM_SLICES_PER_ROW ;if (key_sz > *num_slices_per_row *CFA_P4_WC_TCAM_SLICE_SIZE )return -ENOTSUP ; - - *num_slices_per_row =1 ; }else {/* for other type of tcam */ *num_slices_per_row =1 ; }
drivers/net/bnxt/tf_core/tf_device_p58.c +3 -4
@@ -123,15 +123,14 @@ tf_dev_p58_get_tcam_slice_info(struct tf *tfp __rte_unused,uint16_t key_sz, uint16_t *num_slices_per_row) { -#define CFA_P58_WC_TCAM_SLICES_PER_ROW 2 -#define CFA_P58_WC_TCAM_SLICE_SIZE 12 +#define CFA_P58_WC_TCAM_SLICES_PER_ROW 1 +#define CFA_P58_WC_TCAM_SLICE_SIZE 24 if (type == TF_TCAM_TBL_TYPE_WC_TCAM) { +/* only support single slice key size now */ *num_slices_per_row =CFA_P58_WC_TCAM_SLICES_PER_ROW ;if (key_sz > *num_slices_per_row *CFA_P58_WC_TCAM_SLICE_SIZE )return -ENOTSUP ; - - *num_slices_per_row =1 ; } else { /* for other type of tcam */ *num_slices_per_row =1 ; }
drivers/net/bnxt/tf_core/tf_device_p58.h +3 -0
@@ -189,5 +189,8 @@ struct tf_global_cfg_cfg tf_global_cfg_p58[TF_GLOBAL_CFG_TYPE_MAX] = { [TF_ACTION_BLOCK] = {TF_GLOBAL_CFG_CFG_HCAPI ,TF_ACTION_BLOCK }, + [TF_COUNTER_CFG] = { +TF_GLOBAL_CFG_CFG_HCAPI ,TF_COUNTER_CFG + }, };#endif /* _TF_DEVICE_P58_H_ */
drivers/net/bnxt/tf_core/tf_msg.c +20 -11
@@ -39,19 +39,8 @@* array size (define above) should be checked and compared. */ #define TF_MSG_SIZE_HWRM_TF_GLOBAL_CFG_SET 56 -static_assert (sizeof (struct hwrm_tf_global_cfg_set_input ) == -TF_MSG_SIZE_HWRM_TF_GLOBAL_CFG_SET , -"HWRM message size changed: hwrm_tf_global_cfg_set_input" ); -#define TF_MSG_SIZE_HWRM_TF_EM_INSERT 104 -static_assert (sizeof (struct hwrm_tf_em_insert_input ) == -TF_MSG_SIZE_HWRM_TF_EM_INSERT , -"HWRM message size changed: hwrm_tf_em_insert_input" ); -#define TF_MSG_SIZE_HWRM_TF_TBL_TYPE_SET 128 -static_assert (sizeof (struct hwrm_tf_tbl_type_set_input ) == -TF_MSG_SIZE_HWRM_TF_TBL_TYPE_SET , -"HWRM message size changed: hwrm_tf_tbl_type_set_input" );/** * This is the MAX data we can transport across regular HWRM
@@ -630,6 +619,9 @@ tf_msg_insert_em_internal_entry(struct tf *tfp,struct tf_dev_info *dev;struct tf_session *tfs; +RTE_BUILD_BUG_ON (sizeof (struct hwrm_tf_em_insert_input ) != +TF_MSG_SIZE_HWRM_TF_EM_INSERT ); +/* Retrieve the session information */ rc =tf_session_get_session_internal (tfp, &tfs);if (rc) {
@@ -1255,6 +1247,17 @@ tf_msg_tcam_entry_get(struct tf *tfp,if (mparms.tf_resp_code !=0 )return tfp_le_to_cpu_32 (mparms.tf_resp_code); +if (parms->key_size < resp.key_size || + parms->result_size < resp.result_size) { + rc = -EINVAL ; +TFP_DRV_LOG (ERR , +"%s: Key buffer(%d) is smaller than the key(%d), rc:%s\n" , +tf_dir_2_str (parms->dir), + parms->key_size, + resp.key_size, +strerror (-rc)); +return rc; + } parms->key_size = resp.key_size; parms->result_size = resp.result_size;tfp_memcpy (parms->key, resp.dev_data, resp.key_size);
@@ -1320,6 +1323,9 @@ tf_msg_set_tbl_entry(struct tf *tfp,struct tf_dev_info *dev;struct tf_session *tfs; +RTE_BUILD_BUG_ON (sizeof (struct hwrm_tf_tbl_type_set_input ) != +TF_MSG_SIZE_HWRM_TF_TBL_TYPE_SET ); +/* Retrieve the session information */ rc =tf_session_get_session_internal (tfp, &tfs);if (rc) {
@@ -1554,6 +1560,9 @@ tf_msg_set_global_cfg(struct tf *tfp,struct tf_dev_info *dev;struct tf_session *tfs; +RTE_BUILD_BUG_ON (sizeof (struct hwrm_tf_global_cfg_set_input ) != +TF_MSG_SIZE_HWRM_TF_GLOBAL_CFG_SET ); +/* Retrieve the session information */ rc =tf_session_get_session_internal (tfp, &tfs);if (rc) {
drivers/net/bnxt/tf_core/tf_tcam.c +101 -91
307 lines not on this page · raw message
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 10/58 net/bnxt: add 64B SRAM record management with RM
In reply to Ajit KhapardeFrom: Farah Smith <[email protected]>
HCAPI RM now manages 64Byte records instead of 8Byte. Truflow core RM will manage the same. The tf_tbl core APIs now return 8B pointer addresses. These can be used directly as SRAM pointers in Action Records. When communicating with the firmware 8 byte addresses will be used.
--- drivers/net/bnxt/tf_core/tf_device.h | 29 ++++- drivers/net/bnxt/tf_core/tf_device_p4.c | 2 + drivers/net/bnxt/tf_core/tf_device_p58.c | 71 ++++++++++ drivers/net/bnxt/tf_core/tf_device_p58.h | 24 ++-- drivers/net/bnxt/tf_core/tf_rm.h | 2 +- drivers/net/bnxt/tf_core/tf_tbl.c | 158 ++++++++++++++++++++++- 6 files changed, 267 insertions(+), 19 deletions(-)
drivers/net/bnxt/tf_core/tf_device.h +28 -1
@@ -220,9 +220,36 @@ struct tf_dev_ops {*/ int (*tf_dev_search_ident)(struct tf *tfp,struct tf_ident_search_parms *parms); +/** +* Get SRAM table information. +* +* Converts an internal RM allocated element offset to +* a user address and vice versa. +* +* [in] tfp +* Pointer to TF handle +* +* [in] type +* Truflow index table type, e.g. TF_TYPE_FULL_ACT_RECORD +* +* [in/out] base +* Pointer to the base address of the associated table type. +* +* [in/out] shift +* Pointer to any shift required for the associated table type. +* +* Returns +* - (0) if successful. +* - (-EINVAL) on failure. +*/ +int (*tf_dev_get_tbl_info)(struct tf *tfp, +void *tbl_db, +enum tf_tbl_type type, +uint16_t *base, +uint16_t *shift);/** -* Allocation of a table type element. +* Allocation of an index table type element. * * This API allocates the specified table type element from a * device specific table type DB. The allocated element is
drivers/net/bnxt/tf_core/tf_device_p4.c +2 -0
@@ -206,6 +206,7 @@ const struct tf_dev_ops tf_dev_ops_p4_init = { .tf_dev_alloc_ident = NULL, .tf_dev_free_ident = NULL, .tf_dev_search_ident = NULL, + .tf_dev_get_tbl_info = NULL, .tf_dev_alloc_ext_tbl = NULL, .tf_dev_alloc_tbl = NULL, .tf_dev_free_ext_tbl = NULL,
@@ -246,6 +247,7 @@ const struct tf_dev_ops tf_dev_ops_p4 = { .tf_dev_alloc_ident = tf_ident_alloc, .tf_dev_free_ident = tf_ident_free, .tf_dev_search_ident = tf_ident_search, + .tf_dev_get_tbl_info = NULL, .tf_dev_alloc_tbl = tf_tbl_alloc, .tf_dev_alloc_ext_tbl = tf_tbl_ext_alloc, .tf_dev_free_tbl = tf_tbl_free,
drivers/net/bnxt/tf_core/tf_device_p58.c +71 -0
89 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.h +12 -12
@@ -68,35 +68,35 @@ struct tf_rm_element_cfg tf_tbl_p58[TF_TBL_TYPE_MAX] = { [TF_TBL_TYPE_FULL_ACT_RECORD] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_1, - .slices = 4, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_COMPACT_ACT_RECORD] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD, .parent_subtype = TF_TBL_TYPE_FULL_ACT_RECORD, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_1, - .slices = 8, + .slices = 1, .divider = 8, },/* Policy - Encaps in bank 2 */ [TF_TBL_TYPE_ACT_ENCAP_8B] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_PARENT, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2, - .slices = 8, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_ACT_ENCAP_16B] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD, .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2, - .slices = 4, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_ACT_ENCAP_32B] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD, .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2, - .slices = 2, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_ACT_ENCAP_64B] = {
@@ -111,21 +111,21 @@ struct tf_rm_element_cfg tf_tbl_p58[TF_TBL_TYPE_MAX] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD, .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2, - .slices = 8, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_ACT_MODIFY_16B] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD, .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2, - .slices = 4, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_ACT_MODIFY_32B] = { .cfg_type = TF_RM_ELEM_CFG_HCAPI_BA_CHILD, .parent_subtype = TF_TBL_TYPE_ACT_ENCAP_8B, .hcapi_type = CFA_RESOURCE_TYPE_P58_SRAM_BANK_2, - .slices = 2, + .slices = 1, .divider = 8, }, [TF_TBL_TYPE_ACT_MODIFY_64B] = {
@@ -139,28 +139,28 @@ struct tf_rm_element_cfg tf_tbl_p58[TF_TBL_TYPE_MAX] = { [TF_TBL_TYPE_ACT_SP_SMAC ] = { .cfg_type =TF_RM_ELEM_CFG_HCAPI_BA_PARENT , .hcapi_type =CFA_RESOURCE_TYPE_P58_SRAM_BANK_0 , - .slices =8 , + .slices =1 , .divider =8 , }, [TF_TBL_TYPE_ACT_SP_SMAC_IPV4 ] = { .cfg_type =TF_RM_ELEM_CFG_HCAPI_BA_CHILD , .parent_subtype =TF_TBL_TYPE_ACT_SP_SMAC , .hcapi_type =CFA_RESOURCE_TYPE_P58_SRAM_BANK_0 , - .slices =4 , + .slices =1 , .divider =8 , }, [TF_TBL_TYPE_ACT_SP_SMAC_IPV6 ] = { .cfg_type =TF_RM_ELEM_CFG_HCAPI_BA_CHILD , .parent_subtype =TF_TBL_TYPE_ACT_SP_SMAC , .hcapi_type =CFA_RESOURCE_TYPE_P58_SRAM_BANK_0 , - .slices =2 , + .slices =1 , .divider =8 , }, /* Policy - Stats in bank 3 */ [TF_TBL_TYPE_ACT_STATS_64 ] = { .cfg_type =TF_RM_ELEM_CFG_HCAPI_BA_PARENT , .hcapi_type =CFA_RESOURCE_TYPE_P58_SRAM_BANK_3 , - .slices =8 , + .slices =1 , .divider =8 , }, };
drivers/net/bnxt/tf_core/tf_rm.h +1 -1
@@ -138,6 +138,7 @@ struct tf_rm_element_cfg {* resource pool chunk size. */ uint8_t slices; +/** * Pool element divider count * If 0 or 1, there is 1:1 correspondence between the RM
@@ -146,7 +147,6 @@ struct tf_rm_element_cfg {* correspondence to the HCAPI RM firmware resource. */ uint8_t divider; - };/**
drivers/net/bnxt/tf_core/tf_tbl.c +153 -5
249 lines not on this page · raw message
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 11/58 net/bnxt: add hashing changes for Thor
In reply to Ajit KhapardeFrom: Peter Spreadborough <[email protected]>
- Move HCAPI hashing code to common file and add Thor support.
- Change DPDK EM insert for FKB to use limited size Type 3 key.
- Update FKB builder to be able to tell between EM and WC keys during transform.
FKB is the Flexible Key Builder in Thor used while inserting flows.
--- drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h | 72 ++++++++++- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c | 85 +++++++++++++ drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h | 15 +++ drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c | 107 +--------------- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c | 120 ++++++++++++++++++ drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h | 6 + drivers/net/bnxt/hcapi/cfa/meson.build | 4 +- drivers/net/bnxt/tf_core/tf_device.h | 15 +++ drivers/net/bnxt/tf_core/tf_device_p4.c | 1 + drivers/net/bnxt/tf_core/tf_device_p58.c | 1 + drivers/net/bnxt/tf_core/tf_em.h | 8 +- drivers/net/bnxt/tf_core/tf_em_common.c | 42 ++++-- .../net/bnxt/tf_core/tf_em_hash_internal.c | 22 +++- 13 files changed, 373 insertions(+), 125 deletions(-) create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c create mode 100644 drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +68 -4
@@ -63,10 +63,74 @@ struct hcapi_cfa_devops {*/ uint64_t (*hcapi_cfa_key_hash)(uint64_t *key_data,uint16_t bitlen); -/** hardware operation on the CFA EM key -* -* This API provides the functionality to program the exact match and -* key data to exact match record memory. +int hcapi_cfa_action_hw_op (struct hcapi_cfa_hwop *op, +uint8_t *act_tbl, +struct hcapi_cfa_data *act_obj); +int hcapi_cfa_dev_hw_op (struct hcapi_cfa_hwop *op,uint16_t tbl_id, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_rm_register_client (hcapi_cfa_rm_data_t *data, +const char *client_name, +int *client_id); +int hcapi_cfa_rm_unregister_client (hcapi_cfa_rm_data_t *data, +int client_id); +int hcapi_cfa_rm_query_resources (hcapi_cfa_rm_data_t *data, +int client_id, +uint16_t chnl_id, +struct hcapi_cfa_resc_req_db *req_db); +int hcapi_cfa_rm_query_resources_one (hcapi_cfa_rm_data_t *data, +int clien_id, +struct hcapi_cfa_resc_db *resc_db); +int hcapi_cfa_rm_reserve_resources (hcapi_cfa_rm_data_t *data, +int client_id, +struct hcapi_cfa_resc_req_db *resc_req, +struct hcapi_cfa_resc_db *resc_db); +int hcapi_cfa_rm_release_resources (hcapi_cfa_rm_data_t *data, +int client_id, +struct hcapi_cfa_resc_req_db *resc_req, +struct hcapi_cfa_resc_db *resc_db); +int hcapi_cfa_rm_initialize (hcapi_cfa_rm_data_t *data); + +#if SUPPORT_CFA_HW_P4 + +int hcapi_cfa_p4_dev_hw_op (struct hcapi_cfa_hwop *op,uint16_t tbl_id, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_prof_l2ctxt_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_prof_l2ctxtrmp_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_prof_tcam_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_prof_tcamrmp_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_wc_tcam_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_wc_tcam_rec_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *obj_data); +int hcapi_cfa_p4_mirror_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *mirror); +int hcapi_cfa_p4_global_cfg_hwop (struct hcapi_cfa_hwop *op, +uint32_t type, +struct hcapi_cfa_data *config); +/* SUPPORT_CFA_HW_P4 */ +#elif SUPPORT_CFA_HW_P45 +int hcapi_cfa_p45_mirror_hwop (struct hcapi_cfa_hwop *op, +struct hcapi_cfa_data *mirror); +int hcapi_cfa_p45_global_cfg_hwop (struct hcapi_cfa_hwop *op, +uint32_t type, +struct hcapi_cfa_data *config); +/* SUPPORT_CFA_HW_P45 */ +#endif + +/** +* HCAPI CFA device HW operation function callback definition +* This is standardized function callback hook to install different +* CFA HW table programming function callback. +*/ + +struct hcapi_cfa_tbl_cb { +/** +* This function callback provides the functionality to read/write +* HW table entry from a HW table. * * @param[in] op * A pointer to the Hardware operation parameter
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c new file +85 -0
85 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h +15 -0
@@ -54,6 +54,16 @@ enum hcapi_cfa_dir { HCAPI_CFA_DIR_MAX = 2 }; +/* +* Hashing defines +*/ +#define HCAPI_CFA_LKUP_SEED_MEM_SIZE 512 + +/* CRC32i support for Key0 hash */ +#define ucrc32 (ch, crc) (crc32tbl[((crc) ^ (ch)) & 0xff] ^ ((crc) >> 8)) +#define crc32 (x, y) crc32i(~0, x, y) + +/** * CFA HW OPCODE definition */
@@ -282,4 +292,9 @@ int hcapi_cfa_key_hw_op(struct hcapi_cfa_hwop *op,uint64_t hcapi_get_table_page (struct hcapi_cfa_em_table *mem,uint32_t page); +uint32_t hcapi_cfa_crc32i (uint32_t crc,const uint8_t *buf,size_t len); +uint64_t hcapi_cfa_p4_key_hash (uint64_t *key_data, +uint16_t bitlen); +uint64_t hcapi_cfa_p58_key_hash (uint64_t *key_data, +uint16_t bitlen);#endif /* HCAPI_CFA_DEFS_H_ */
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c +5 -102
125 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c new file +120 -0
120 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h +6 -0
@@ -6,6 +6,12 @@#ifndef _HCAPI_CFA_P58_H_#define _HCAPI_CFA_P58_H_ +/** +* EEM Key entry sizes +*/ +#define CFA_P58_EEM_KEY_MAX_SIZE 80 +#define CFA_P58_EEM_KEY_RECORD_SIZE 80 +/** CFA phase 5.8 fix formatted table(layout) ID definition * */
drivers/net/bnxt/hcapi/cfa/meson.build +3 -1
@@ -7,4 +7,6 @@ includes += include_directories('.') #Add the source files sources += files( - 'hcapi_cfa_p4.c') + 'hcapi_cfa_p4.c', + 'hcapi_cfa_p58.c', + 'hcapi_cfa_common.c')
drivers/net/bnxt/tf_core/tf_device.h +15 -0
@@ -752,6 +752,21 @@ struct tf_dev_ops {* Size in byte */ int (*tf_dev_word_align)(uint16_t size); + +/** +* Hash key using crc32 and lookup3 +* +* [in] key_data +* Pointer to key +* +* [in] bitlen +* Number of key bits +* +* Returns +* Hashes +*/ +uint64_t (*tf_dev_cfa_key_hash)(uint64_t *key_data, +uint16_t bitlen); };/**
drivers/net/bnxt/tf_core/tf_device_p4.c +1 -0
@@ -276,4 +276,5 @@ const struct tf_dev_ops tf_dev_ops_p4 = { .tf_dev_get_global_cfg = tf_global_cfg_get, .tf_dev_get_mailbox = tf_dev_p4_get_mailbox, .tf_dev_word_align = tf_dev_p4_word_align, + .tf_dev_cfa_key_hash = hcapi_cfa_p4_key_hash };
drivers/net/bnxt/tf_core/tf_device_p58.c +1 -0
@@ -297,4 +297,5 @@ const struct tf_dev_ops tf_dev_ops_p58 = { .tf_dev_get_global_cfg = tf_global_cfg_get, .tf_dev_get_mailbox = tf_dev_p58_get_mailbox, .tf_dev_word_align = tf_dev_p58_word_align, + .tf_dev_cfa_key_hash = hcapi_cfa_p58_key_hash };
drivers/net/bnxt/tf_core/tf_em.h +5 -3
@@ -14,8 +14,10 @@#define TF_EM_MIN_ENTRIES (1 << 15)/* 32K */ #define TF_EM_MAX_ENTRIES (1 << 27)/* 128M */ -#define TF_HW_EM_KEY_MAX_SIZE 52 -#define TF_EM_KEY_RECORD_SIZE 64 +#define TF_P4_HW_EM_KEY_MAX_SIZE 52 +#define TF_P4_EM_KEY_RECORD_SIZE 64 + +#define TF_P58_HW_EM_KEY_MAX_SIZE 80#define TF_EM_MAX_MASK 0x7FFF#define TF_EM_MAX_ENTRY (128 * 1024 * 1024)
@@ -95,7 +97,7 @@ struct tf_em_64b_entry {/** Header is 8 bytes long */ struct cfa_p4_eem_entry_hdr hdr;/** Key is 448 bits - 56 bytes */ -uint8_t key[TF_EM_KEY_RECORD_SIZE -sizeof (struct cfa_p4_eem_entry_hdr )]; +uint8_t key[TF_P4_EM_KEY_RECORD_SIZE -sizeof (struct cfa_p4_eem_entry_hdr )]; };/** EEM Memory Type
drivers/net/bnxt/tf_core/tf_em_common.c +30 -12
96 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_hash_internal.c +19 -3
@@ -15,6 +15,7 @@#include "tf_msg.h" #include "tfp.h" #include "tf_ext_flow_handle.h" +#include "tf_device.h" #include "bnxt.h"
@@ -43,6 +44,18 @@ tf_em_hash_insert_int_entry(struct tf *tfp,uint32_t key0_hash;uint32_t key1_hash;uint64_t big_hash; +struct tf_dev_info *dev; +struct tf_session *tfs; + +/* Retrieve the session information */ + rc =tf_session_get_session_internal (tfp, &tfs); +if (rc) +return rc; + +/* Retrieve the device information */ + rc =tf_session_get_device (tfs, &dev); +if (rc) +return rc; rc =stack_pop (pool, &index);if (rc) {
@@ -52,8 +65,11 @@ tf_em_hash_insert_int_entry(struct tf *tfp,return rc; } - big_hash =hcapi_cfa_key_hash ((uint64_t *)parms->key, - (TF_HW_EM_KEY_MAX_SIZE +4 ) *8 ); +if (dev->ops->tf_dev_cfa_key_hash ==NULL ) +return -EINVAL ; + + big_hash = dev->ops->tf_dev_cfa_key_hash ((uint64_t *)parms->key, +TF_P58_HW_EM_KEY_MAX_SIZE *8 ); key0_hash = (uint32_t )(big_hash >>32 ); key1_hash = (uint32_t )(big_hash &0xFFFFFFFF );
@@ -93,7 +109,7 @@ tf_em_hash_insert_int_entry(struct tf *tfp,TF_SET_FIELDS_IN_FLOW_HANDLE (parms->flow_handle, (uint32_t )num_of_entries,0 , -0 , +TF_FLAGS_FLOW_HANDLE_INTERNAL , rptr_index, rptr_entry,0 );
Signature · 1 line
2.21.1 (Apple Git-122.3)
PATCH v2 12/58 net/bnxt: modify TRUFLOW HWRM messages
In reply to Ajit KhapardeFrom: Farah Smith <[email protected]>
- Move Bulk get to a direct HWRM message
- Deprecate code based on HCAPI changes
--- drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h | 72 +---- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c | 4 +- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h | 193 ++++++++---- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c | 113 +++---- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.h | 282 +---------------- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c | 2 +- drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h | 287 +----------------- drivers/net/bnxt/tf_core/hwrm_tf.h | 196 ------------ drivers/net/bnxt/tf_core/lookup3.h | 2 +- drivers/net/bnxt/tf_core/tf_core.c | 1 - drivers/net/bnxt/tf_core/tf_core.h | 127 ++++---- drivers/net/bnxt/tf_core/tf_device.c | 2 +- drivers/net/bnxt/tf_core/tf_device_p4.h | 75 +++-- drivers/net/bnxt/tf_core/tf_device_p58.h | 48 ++- drivers/net/bnxt/tf_core/tf_em.h | 4 +- drivers/net/bnxt/tf_core/tf_em_common.c | 250 ++++++++++----- drivers/net/bnxt/tf_core/tf_em_common.h | 68 ++++- drivers/net/bnxt/tf_core/tf_em_host.c | 109 +++++-- drivers/net/bnxt/tf_core/tf_msg.c | 263 ++++++++++++++-- drivers/net/bnxt/tf_core/tf_msg.h | 87 ++++++ drivers/net/bnxt/tf_core/tf_msg_common.h | 3 - drivers/net/bnxt/tf_core/tf_session.c | 115 +++++++ drivers/net/bnxt/tf_core/tf_session.h | 90 ++++++ drivers/net/bnxt/tf_core/tf_tbl.h | 30 -- drivers/net/bnxt/tf_core/tf_util.c | 12 - drivers/net/bnxt/tf_core/tf_util.h | 4 + drivers/net/bnxt/tf_core/tfp.c | 34 --- drivers/net/bnxt/tf_core/tfp.h | 52 ---- 28 files changed, 1198 insertions(+), 1327 deletions(-) delete mode 100644 drivers/net/bnxt/tf_core/hwrm_tf.h
drivers/net/bnxt/hcapi/cfa/hcapi_cfa.h +4 -68
@@ -63,74 +63,10 @@ struct hcapi_cfa_devops {*/ uint64_t (*hcapi_cfa_key_hash)(uint64_t *key_data,uint16_t bitlen); -int hcapi_cfa_action_hw_op (struct hcapi_cfa_hwop *op, -uint8_t *act_tbl, -struct hcapi_cfa_data *act_obj); -int hcapi_cfa_dev_hw_op (struct hcapi_cfa_hwop *op,uint16_t tbl_id, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_rm_register_client (hcapi_cfa_rm_data_t *data, -const char *client_name, -int *client_id); -int hcapi_cfa_rm_unregister_client (hcapi_cfa_rm_data_t *data, -int client_id); -int hcapi_cfa_rm_query_resources (hcapi_cfa_rm_data_t *data, -int client_id, -uint16_t chnl_id, -struct hcapi_cfa_resc_req_db *req_db); -int hcapi_cfa_rm_query_resources_one (hcapi_cfa_rm_data_t *data, -int clien_id, -struct hcapi_cfa_resc_db *resc_db); -int hcapi_cfa_rm_reserve_resources (hcapi_cfa_rm_data_t *data, -int client_id, -struct hcapi_cfa_resc_req_db *resc_req, -struct hcapi_cfa_resc_db *resc_db); -int hcapi_cfa_rm_release_resources (hcapi_cfa_rm_data_t *data, -int client_id, -struct hcapi_cfa_resc_req_db *resc_req, -struct hcapi_cfa_resc_db *resc_db); -int hcapi_cfa_rm_initialize (hcapi_cfa_rm_data_t *data); - -#if SUPPORT_CFA_HW_P4 - -int hcapi_cfa_p4_dev_hw_op (struct hcapi_cfa_hwop *op,uint16_t tbl_id, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_prof_l2ctxt_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_prof_l2ctxtrmp_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_prof_tcam_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_prof_tcamrmp_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_wc_tcam_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_wc_tcam_rec_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *obj_data); -int hcapi_cfa_p4_mirror_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *mirror); -int hcapi_cfa_p4_global_cfg_hwop (struct hcapi_cfa_hwop *op, -uint32_t type, -struct hcapi_cfa_data *config); -/* SUPPORT_CFA_HW_P4 */ -#elif SUPPORT_CFA_HW_P45 -int hcapi_cfa_p45_mirror_hwop (struct hcapi_cfa_hwop *op, -struct hcapi_cfa_data *mirror); -int hcapi_cfa_p45_global_cfg_hwop (struct hcapi_cfa_hwop *op, -uint32_t type, -struct hcapi_cfa_data *config); -/* SUPPORT_CFA_HW_P45 */ -#endif - -/** -* HCAPI CFA device HW operation function callback definition -* This is standardized function callback hook to install different -* CFA HW table programming function callback. -*/ - -struct hcapi_cfa_tbl_cb { -/** -* This function callback provides the functionality to read/write -* HW table entry from a HW table. +/** hardware operation on the CFA EM key +* +* This API provides the functionality to program the exact match and +* key data to exact match record memory. * * @param[in] op * A pointer to the Hardware operation parameter
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_common.c +1 -3
@@ -3,9 +3,7 @@* All rights reserved. */ -#include "hcapi_cfa_defs.h" -#include <errno.h> -#include "assert.h" +#include "hcapi_cfa.h" const uint32_t crc32tbl[] = {/* CRC polynomial 0xedb88320 */ 0x00000000 ,0x77073096 ,0xee0e612c ,0x990951ba ,
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_defs.h +137 -56
296 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.c +50 -63
253 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p4.h +1 -281
292 lines not on this page · raw message
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.c +1 -1
@@ -86,7 +86,7 @@ static uint32_t hcapi_cfa_lookup3_hash(uint8_t *in_key) {uint32_t val1; - val1 =hashword (((uint32_t *)in_key) +1 , + val1 =hashword (((uint32_t *)in_key),CFA_P58_EEM_KEY_MAX_SIZE / (sizeof (uint32_t )), hcapi_cfa_lkup_lkup3_init_cfg);
drivers/net/bnxt/hcapi/cfa/hcapi_cfa_p58.h +6 -281
305 lines not on this page · raw message
drivers/net/bnxt/tf_core/hwrm_tf.h deleted +0 -196
196 lines not on this page · raw message
drivers/net/bnxt/tf_core/lookup3.h +1 -1
@@ -122,7 +122,7 @@ static inline uint32_t hashword(const uint32_t *k,size_t length, uint32_t initval) { uint32_t a, b, c; -int index =12 ; +int index = length -1 ;/* Set up the internal state */ a =0xdeadbeef + (((uint32_t )length) <<2 ) + initval;
drivers/net/bnxt/tf_core/tf_core.c +0 -1
@@ -18,7 +18,6 @@#include "bnxt.h" #include "rand.h" #include "tf_common.h" -#include "hwrm_tf.h" #include "tf_ext_flow_handle.h" int
drivers/net/bnxt/tf_core/tf_core.h +62 -65
277 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device.c +1 -1
@@ -487,7 +487,7 @@ tf_dev_bind_p58(struct tf *tfp,* - (-EINVAL) on failure. */ static int -tf_dev_unbind_p58 (struct tf *tfp) +tf_dev_unbind_p58 (struct tf *tfp) {int rc =0 ;bool fail = false;
drivers/net/bnxt/tf_core/tf_device_p4.h +50 -25
142 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_device_p58.h +32 -16
94 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em.h +3 -1
@@ -9,7 +9,9 @@#include "tf_core.h" #include "tf_session.h" -#include "hcapi/cfa/hcapi_cfa_defs.h" +#include "tf_em_common.h" + +#include "hcapi_cfa_defs.h" #define TF_EM_MIN_ENTRIES (1 << 15)/* 32K */ #define TF_EM_MAX_ENTRIES (1 << 27)/* 128M */
drivers/net/bnxt/tf_core/tf_em_common.c +168 -82
413 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_common.h +67 -1
84 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_em_host.c +84 -25
197 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg.c +234 -29
322 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg.h +87 -0
87 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_msg_common.h +0 -3
Lines of this file are not shown. View the raw message.
drivers/net/bnxt/tf_core/tf_session.c +115 -0
115 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_session.h +90 -0
90 lines not on this page · raw message
drivers/net/bnxt/tf_core/tfp.h +0 -52
52 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.21.1 (Apple Git-122.3)
Part of the diff is not shown here. View the raw message.
PATCH v2 13/58 net/bnxt: change RM database type
In reply to Ajit KhapardeFrom: Jay Ding <[email protected]>
RM databases are statically defined in each module. New static database needs to be defined in the code when multiple sessions are added. Add dynamic alloc database and associate it to each session.
--- drivers/net/bnxt/tf_core/tf_em.h | 10 ++ drivers/net/bnxt/tf_core/tf_em_internal.c | 44 +++++-- drivers/net/bnxt/tf_core/tf_identifier.c | 82 ++++++++++-- drivers/net/bnxt/tf_core/tf_identifier.h | 10 ++ drivers/net/bnxt/tf_core/tf_tbl.c | 151 +++++++++++++++++----- drivers/net/bnxt/tf_core/tf_tbl.h | 10 ++ drivers/net/bnxt/tf_core/tf_tcam.c | 107 ++++++++++++--- drivers/net/bnxt/tf_core/tf_tcam.h | 10 ++ 8 files changed, 351 insertions(+), 73 deletions(-)
drivers/net/bnxt/tf_core/tf_em.h +10 -0
@@ -133,6 +133,16 @@ struct tf_em_cfg_parms {enum tf_mem_type mem_type; }; +/** +* EM database +* +* EM rm database +* +*/ +struct em_rm_db { +struct rm_db *em_db[TF_DIR_MAX ]; +}; +/** * @page em EM *
drivers/net/bnxt/tf_core/tf_em_internal.c +34 -10
93 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_identifier.c +69 -13
174 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_identifier.h +10 -0
@@ -99,6 +99,16 @@ struct tf_ident_search_parms {uint32_t *ref_cnt; }; +/** +* Identifier database +* +* Identifier rm database +* +*/ +struct ident_rm_db { +struct rm_db *ident_db[TF_DIR_MAX ]; +}; +/** * @page ident Identity Management *
drivers/net/bnxt/tf_core/tf_tbl.c +122 -29
324 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tbl.h +10 -0
@@ -229,6 +229,16 @@ struct tf_tbl_get_bulk_parms {uint64_t physical_mem_addr; }; +/** +* Table RM database +* +* Table rm database +* +*/ +struct tbl_rm_db { +struct rm_db *tbl_db[TF_DIR_MAX ]; +}; +/** * @page tbl Table *
drivers/net/bnxt/tf_core/tf_tcam.c +86 -21
260 lines not on this page · raw message
drivers/net/bnxt/tf_core/tf_tcam.h +10 -0
@@ -237,6 +237,16 @@ struct tf_tcam_get_parms {uint16_t result_size; }; +/** +* TCAM database +* +* Tcam rm database +* +*/ +struct tcam_rm_db { +struct rm_db *tcam_db[TF_DIR_MAX ]; +}; +/** * @page tcam TCAM *
Signature · 1 line
2.21.1 (Apple Git-122.3)