]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.h
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 BNXT_ULP_MARK_VALID 0x1
12 #define BNXT_ULP_MARK_GLOBAL_HW_FID 0x4
13 #define BNXT_ULP_MARK_LOCAL_HW_FID 0x8
15 struct bnxt_lfid_mark_info
{
20 struct bnxt_gfid_mark_info
{
25 struct bnxt_ulp_mark_tbl
{
26 struct bnxt_lfid_mark_info
*lfid_tbl
;
27 struct bnxt_gfid_mark_info
*gfid_tbl
;
28 uint32_t lfid_num_entries
;
29 uint32_t gfid_num_entries
;
31 uint32_t gfid_type_bit
;
35 * Allocate and Initialize all Mark Manager resources for this ulp context.
37 * Initialize MARK database for GFID & LFID tables
38 * GFID: Global flow id which is based on EEM hash id.
39 * LFID: Local flow id which is the CFA action pointer.
40 * GFID is used for EEM flows, LFID is used for EM flows.
42 * Flow mapper modules adds mark_id in the MARK database.
44 * BNXT PMD receive handler extracts the hardware flow id from the
45 * received completion record. Fetches mark_id from the MARK
46 * database using the flow id. Injects mark_id into the packet's mbuf.
48 * ctxt [in] The ulp context for the mark manager.
51 ulp_mark_db_init(struct bnxt_ulp_context
*ctxt
);
54 * Release all resources in the Mark Manager for this ulp context
56 * ctxt [in] The ulp context for the mark manager
59 ulp_mark_db_deinit(struct bnxt_ulp_context
*ctxt
);
62 * Get a Mark from the Mark Manager
64 * ctxt [in] The ulp context for the mark manager
66 * is_gfid [in] The type of fid (GFID or LFID)
68 * fid [in] The flow id that is returned by HW in BD
70 * mark [out] The mark that is associated with the FID
74 ulp_mark_db_mark_get(struct bnxt_ulp_context
*ctxt
,
80 * Adds a Mark to the Mark Manager
82 * ctxt [in] The ulp context for the mark manager
84 * mark_flag [in] mark flags.
86 * fid [in] The flow id that is returned by HW in BD
88 * mark [in] The mark to be associated with the FID
92 ulp_mark_db_mark_add(struct bnxt_ulp_context
*ctxt
,
98 * Removes a Mark from the Mark Manager
100 * ctxt [in] The ulp context for the mark manager
102 * mark_flag [in] mark flags
104 * fid [in] The flow id that is returned by HW in BD
108 ulp_mark_db_mark_del(struct bnxt_ulp_context
*ctxt
,
112 #endif /* _ULP_MARK_MGR_H_ */