Lines Matching +full:1 +full:kb

144 				 struct ice_bst_keybuilder *kb)  in ice_imem_bst_kb_dump()  argument
149 dev_info(dev, "\tpriority = %d\n", kb->prio); in ice_imem_bst_kb_dump()
150 dev_info(dev, "\ttsr_ctrl = %d\n", kb->tsr_ctrl); in ice_imem_bst_kb_dump()
154 struct ice_np_keybuilder *kb) in ice_imem_np_kb_dump() argument
159 dev_info(dev, "\topc = %d\n", kb->opc); in ice_imem_np_kb_dump()
160 dev_info(dev, "\tstart_or_reg0 = %d\n", kb->start_reg0); in ice_imem_np_kb_dump()
161 dev_info(dev, "\tlen_or_reg1 = %d\n", kb->len_reg1); in ice_imem_np_kb_dump()
165 struct ice_pg_keybuilder *kb) in ice_imem_pg_kb_dump() argument
170 dev_info(dev, "\tflag0_ena = %d\n", kb->flag0_ena); in ice_imem_pg_kb_dump()
171 dev_info(dev, "\tflag1_ena = %d\n", kb->flag1_ena); in ice_imem_pg_kb_dump()
172 dev_info(dev, "\tflag2_ena = %d\n", kb->flag2_ena); in ice_imem_pg_kb_dump()
173 dev_info(dev, "\tflag3_ena = %d\n", kb->flag3_ena); in ice_imem_pg_kb_dump()
174 dev_info(dev, "\tflag0_idx = %d\n", kb->flag0_idx); in ice_imem_pg_kb_dump()
175 dev_info(dev, "\tflag1_idx = %d\n", kb->flag1_idx); in ice_imem_pg_kb_dump()
176 dev_info(dev, "\tflag2_idx = %d\n", kb->flag2_idx); in ice_imem_pg_kb_dump()
177 dev_info(dev, "\tflag3_idx = %d\n", kb->flag3_idx); in ice_imem_pg_kb_dump()
178 dev_info(dev, "\talu_reg_idx = %d\n", kb->alu_reg_idx); in ice_imem_pg_kb_dump()
222 ice_imem_alu_dump(hw, &item->alu1, 1); in ice_imem_dump()
227 #define ICE_IM_BM_ALU1 BIT(1)
258 #define ICE_IM_NPKB_OPC GENMASK(1, 0)
264 * @kb: pointer to the Next Protocol Key Build structure
267 static void ice_imem_npkb_init(struct ice_np_keybuilder *kb, u32 data) in ice_imem_npkb_init() argument
269 kb->opc = FIELD_GET(ICE_IM_NPKB_OPC, data); in ice_imem_npkb_init()
270 kb->start_reg0 = FIELD_GET(ICE_IM_NPKB_S_R0, data); in ice_imem_npkb_init()
271 kb->len_reg1 = FIELD_GET(ICE_IM_NPKB_L_R1, data); in ice_imem_npkb_init()
275 #define ICE_IM_PGKB_F0_IDX GENMASK_ULL(6, 1)
286 * @kb: pointer to the Parse Graph Key Build structure
289 static void ice_imem_pgkb_init(struct ice_pg_keybuilder *kb, u64 data) in ice_imem_pgkb_init() argument
291 kb->flag0_ena = FIELD_GET(ICE_IM_PGKB_F0_ENA, data); in ice_imem_pgkb_init()
292 kb->flag0_idx = FIELD_GET(ICE_IM_PGKB_F0_IDX, data); in ice_imem_pgkb_init()
293 kb->flag1_ena = FIELD_GET(ICE_IM_PGKB_F1_ENA, data); in ice_imem_pgkb_init()
294 kb->flag1_idx = FIELD_GET(ICE_IM_PGKB_F1_IDX, data); in ice_imem_pgkb_init()
295 kb->flag2_ena = FIELD_GET(ICE_IM_PGKB_F2_ENA, data); in ice_imem_pgkb_init()
296 kb->flag2_idx = FIELD_GET(ICE_IM_PGKB_F2_IDX, data); in ice_imem_pgkb_init()
297 kb->flag3_ena = FIELD_GET(ICE_IM_PGKB_F3_ENA, data); in ice_imem_pgkb_init()
298 kb->flag3_idx = FIELD_GET(ICE_IM_PGKB_F3_IDX, data); in ice_imem_pgkb_init()
299 kb->alu_reg_idx = FIELD_GET(ICE_IM_PGKB_AR_IDX, data); in ice_imem_pgkb_init()
732 #define ICE_PGNCK_NID GENMASK_ULL(11, 1)
764 #define ICE_PGCK_NID GENMASK_ULL(11, 1)
1048 /* Perform a ternary match on a 1-byte pattern (@pat) given @key and @key_inv
1051 * Key == 0 and Key_inv == 1 : Match on bit == 1
1052 * Key == 1 and Key_inv == 0 : Match on bit == 0
1053 * Key == 1 and Key_inv == 1 : Always match (Don't care)
1090 static void ice_bst_np_kb_dump(struct ice_hw *hw, struct ice_np_keybuilder *kb) in ice_bst_np_kb_dump() argument
1095 dev_info(dev, "\topc = %d\n", kb->opc); in ice_bst_np_kb_dump()
1096 dev_info(dev, "\tstart_reg0 = %d\n", kb->start_reg0); in ice_bst_np_kb_dump()
1097 dev_info(dev, "\tlen_reg1 = %d\n", kb->len_reg1); in ice_bst_np_kb_dump()
1100 static void ice_bst_pg_kb_dump(struct ice_hw *hw, struct ice_pg_keybuilder *kb) in ice_bst_pg_kb_dump() argument
1105 dev_info(dev, "\tflag0_ena = %d\n", kb->flag0_ena); in ice_bst_pg_kb_dump()
1106 dev_info(dev, "\tflag1_ena = %d\n", kb->flag1_ena); in ice_bst_pg_kb_dump()
1107 dev_info(dev, "\tflag2_ena = %d\n", kb->flag2_ena); in ice_bst_pg_kb_dump()
1108 dev_info(dev, "\tflag3_ena = %d\n", kb->flag3_ena); in ice_bst_pg_kb_dump()
1109 dev_info(dev, "\tflag0_idx = %d\n", kb->flag0_idx); in ice_bst_pg_kb_dump()
1110 dev_info(dev, "\tflag1_idx = %d\n", kb->flag1_idx); in ice_bst_pg_kb_dump()
1111 dev_info(dev, "\tflag2_idx = %d\n", kb->flag2_idx); in ice_bst_pg_kb_dump()
1112 dev_info(dev, "\tflag3_idx = %d\n", kb->flag3_idx); in ice_bst_pg_kb_dump()
1113 dev_info(dev, "\talu_reg_idx = %d\n", kb->alu_reg_idx); in ice_bst_pg_kb_dump()
1248 #define ICE_BST_PGKB_F0_IDX GENMASK_ULL(6, 1)
1259 * @kb: pointer to the Parse Graph Key Build structure
1262 static void ice_bst_pgkb_init(struct ice_pg_keybuilder *kb, u64 data) in ice_bst_pgkb_init() argument
1264 kb->flag0_ena = FIELD_GET(ICE_BST_PGKB_F0_ENA, data); in ice_bst_pgkb_init()
1265 kb->flag0_idx = FIELD_GET(ICE_BST_PGKB_F0_IDX, data); in ice_bst_pgkb_init()
1266 kb->flag1_ena = FIELD_GET(ICE_BST_PGKB_F1_ENA, data); in ice_bst_pgkb_init()
1267 kb->flag1_idx = FIELD_GET(ICE_BST_PGKB_F1_IDX, data); in ice_bst_pgkb_init()
1268 kb->flag2_ena = FIELD_GET(ICE_BST_PGKB_F2_ENA, data); in ice_bst_pgkb_init()
1269 kb->flag2_idx = FIELD_GET(ICE_BST_PGKB_F2_IDX, data); in ice_bst_pgkb_init()
1270 kb->flag3_ena = FIELD_GET(ICE_BST_PGKB_F3_ENA, data); in ice_bst_pgkb_init()
1271 kb->flag3_idx = FIELD_GET(ICE_BST_PGKB_F3_IDX, data); in ice_bst_pgkb_init()
1272 kb->alu_reg_idx = FIELD_GET(ICE_BST_PGKB_AR_IDX, data); in ice_bst_pgkb_init()
1275 #define ICE_BST_NPKB_OPC GENMASK(1, 0)
1281 * @kb: pointer to the Next Protocol Key Build structure
1284 static void ice_bst_npkb_init(struct ice_np_keybuilder *kb, u32 data) in ice_bst_npkb_init() argument
1286 kb->opc = FIELD_GET(ICE_BST_NPKB_OPC, data); in ice_bst_npkb_init()
1287 kb->start_reg0 = FIELD_GET(ICE_BST_NPKB_S_R0, data); in ice_bst_npkb_init()
1288 kb->len_reg1 = FIELD_GET(ICE_BST_NPKB_L_R1, data); in ice_bst_npkb_init()
1588 #define ICE_PO_PID GENMASK(8, 1)
1663 #define ICE_FRT_IFID GENMASK(6, 1)
1749 * @kb: key build to dump
1751 static void ice_xlt_kb_dump(struct ice_hw *hw, struct ice_xlt_kb *kb) in ice_xlt_kb_dump() argument
1756 dev_info(dev, "xlt1_pm = %d\n", kb->xlt1_pm); in ice_xlt_kb_dump()
1757 dev_info(dev, "xlt2_pm = %d\n", kb->xlt2_pm); in ice_xlt_kb_dump()
1758 dev_info(dev, "prof_id_pm = %d\n", kb->prof_id_pm); in ice_xlt_kb_dump()
1759 dev_info(dev, "flag15 lo = 0x%08x\n", (u32)kb->flag15); in ice_xlt_kb_dump()
1761 (u32)(kb->flag15 >> (sizeof(u32) * BITS_PER_BYTE))); in ice_xlt_kb_dump()
1764 ice_xlt_kb_entry_dump(hw, &kb->entries[i], i); in ice_xlt_kb_dump()
1767 #define ICE_XLT_KB_X1AS_S 32 /* offset for the 1st 64-bits field */
1857 #define ICE_XLT_KB_X2PM_OFF 1
1865 * @kb: pointer to the XLT Key Build Table structure
1868 static void ice_parse_kb_data(struct ice_hw *hw, struct ice_xlt_kb *kb, in ice_parse_kb_data() argument
1874 kb->xlt1_pm = buf[ICE_XLT_KB_X1PM_OFF]; in ice_parse_kb_data()
1875 kb->xlt2_pm = buf[ICE_XLT_KB_X2PM_OFF]; in ice_parse_kb_data()
1876 kb->prof_id_pm = buf[ICE_XLT_KB_PIPM_OFF]; in ice_parse_kb_data()
1878 kb->flag15 = *(u64 *)&buf[ICE_XLT_KB_FL15_OFF]; in ice_parse_kb_data()
1880 ice_kb_entry_init(&kb->entries[i], in ice_parse_kb_data()
1885 ice_xlt_kb_dump(hw, kb); in ice_parse_kb_data()
1892 struct ice_xlt_kb *kb; in ice_xlt_kb_get() local
1898 kb = kzalloc(sizeof(*kb), GFP_KERNEL); in ice_xlt_kb_get()
1899 if (!kb) in ice_xlt_kb_get()
1906 kfree(kb); in ice_xlt_kb_get()
1910 ice_parse_kb_data(hw, kb, data); in ice_xlt_kb_get()
1912 return kb; in ice_xlt_kb_get()
1963 * @kb: xlt key build
1968 u16 ice_xlt_kb_flag_get(struct ice_xlt_kb *kb, u64 pkt_flag) in ice_xlt_kb_flag_get() argument
1970 struct ice_xlt_kb_entry *entry = &kb->entries[0]; in ice_xlt_kb_flag_get()
1975 if (kb->flag15 & pkt_flag) in ice_xlt_kb_flag_get()
2389 for (off = 0; off < buf_len - 1; off++) { in ice_parser_profile_init()
2390 if (msk_buf[off] == 0 && msk_buf[off + 1] == 0) in ice_parser_profile_init()