1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2019 Broadcom
6 #ifndef _ULP_MARK_MGR_H_
7 #define _ULP_MARK_MGR_H_
11 #define ULP_MARK_INVALID (0)
12 struct bnxt_lfid_mark_info {
17 struct bnxt_gfid_mark_info {
22 struct bnxt_ulp_mark_tbl {
23 struct bnxt_lfid_mark_info *lfid_tbl;
24 struct bnxt_gfid_mark_info *gfid_tbl;
26 uint32_t gfid_type_bit;
31 * Allocate and Initialize all Mark Manager resources for this ulp context.
33 * Initialize MARK database for GFID & LFID tables
34 * GFID: Global flow id which is based on EEM hash id.
35 * LFID: Local flow id which is the CFA action pointer.
36 * GFID is used for EEM flows, LFID is used for EM flows.
38 * Flow mapper modules adds mark_id in the MARK database.
40 * BNXT PMD receive handler extracts the hardware flow id from the
41 * received completion record. Fetches mark_id from the MARK
42 * database using the flow id. Injects mark_id into the packet's mbuf.
44 * ctxt [in] The ulp context for the mark manager.
47 ulp_mark_db_init(struct bnxt_ulp_context *ctxt);
50 * Release all resources in the Mark Manager for this ulp context
52 * ctxt [in] The ulp context for the mark manager
55 ulp_mark_db_deinit(struct bnxt_ulp_context *ctxt);
58 * Adds a Mark to the Mark Manager
60 * ctxt [in] The ulp context for the mark manager
62 * is_gfid [in] The type of fid (GFID or LFID)
64 * fid [in] The flow id that is returned by HW in BD
66 * mark [in] The mark to be associated with the FID
70 ulp_mark_db_mark_add(struct bnxt_ulp_context *ctxt,
76 * Removes a Mark from the Mark Manager
78 * ctxt [in] The ulp context for the mark manager
80 * is_gfid [in] The type of fid (GFID or LFID)
82 * fid [in] The flow id that is returned by HW in BD
84 * mark [in] The mark to be associated with the FID
88 ulp_mark_db_mark_del(struct bnxt_ulp_context *ctxt,
93 #endif /* _ULP_MARK_MGR_H_ */