{
return _xlt_kb_get(hw, ICE_SID_XLT_KEY_BUILDER_RSS);
}
+
+/**
+ * ice_xlt_kb_flag_get - aggregate 64 bits packet flag into 16 bits xlt flag
+ * @kb: xlt key build
+ * @pkt_flag: 64 bits packet flag
+ */
+u16 ice_xlt_kb_flag_get(struct ice_xlt_kb *kb, u64 pkt_flag)
+{
+ struct ice_xlt_kb_entry *entry = &kb->entries[0];
+ u16 flg = 0;
+ int i;
+
+ /* check flag 15 */
+ if (kb->flag15 & pkt_flag)
+ flg = (u16)(1u << 15);
+
+ /* check flag 0 - 14 */
+ for (i = 0; i < 15; i++) {
+ /* only check first entry */
+ u16 idx = (u16)(entry->flg0_14_sel[i] & 0x3f);
+
+ if (pkt_flag & (1ul << idx))
+ flg |= (u16)(1u << i);
+ }
+
+ return flg;
+}
struct ice_xlt_kb *ice_xlt_kb_get_acl(struct ice_hw *hw);
struct ice_xlt_kb *ice_xlt_kb_get_fd(struct ice_hw *hw);
struct ice_xlt_kb *ice_xlt_kb_get_rss(struct ice_hw *hw);
+u16 ice_xlt_kb_flag_get(struct ice_xlt_kb *kb, u64 pkt_flag);
#endif /* _ICE_XLT_KB_H */