git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ixgbe: fix UDP zero checksum on Arm
[dpdk.git]
/
drivers
/
net
/
bnxt
/
bnxt_cpr.h
diff --git
a/drivers/net/bnxt/bnxt_cpr.h
b/drivers/net/bnxt/bnxt_cpr.h
index
ff9697f
..
d7e0d46
100644
(file)
--- a/
drivers/net/bnxt/bnxt_cpr.h
+++ b/
drivers/net/bnxt/bnxt_cpr.h
@@
-1,5
+1,5
@@
/* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2014-20
18
Broadcom
+ * Copyright(c) 2014-20
21
Broadcom
* All rights reserved.
*/
* All rights reserved.
*/
@@
-45,7
+45,7
@@
struct bnxt_db_info;
} while (0)
#define B_CP_DB_REARM(cpr, raw_cons) \
rte_write32((DB_CP_REARM_FLAGS | \
} while (0)
#define B_CP_DB_REARM(cpr, raw_cons) \
rte_write32((DB_CP_REARM_FLAGS | \
-
RING_CMP(((cpr)->cp_ring_struct), raw_cons)),
\
+
DB_RING_IDX(&((cpr)->cp_db), raw_cons)),
\
((cpr)->cp_db.doorbell))
#define B_CP_DB_ARM(cpr) rte_write32((DB_KEY_CP), \
((cpr)->cp_db.doorbell))
#define B_CP_DB_ARM(cpr) rte_write32((DB_KEY_CP), \
@@
-65,8
+65,8
@@
struct bnxt_db_info;
} while (0)
#define B_CP_DIS_DB(cpr, raw_cons) \
rte_write32_relaxed((DB_CP_FLAGS | \
} while (0)
#define B_CP_DIS_DB(cpr, raw_cons) \
rte_write32_relaxed((DB_CP_FLAGS | \
-
RING_CMP(((cpr)->cp_ring_struct), raw_cons)),
\
-
((cpr)->cp_db.doorbell))
+
DB_RING_IDX(&((cpr)->cp_db), raw_cons)),
\
+ ((cpr)->cp_db.doorbell))
#define B_CP_DB(cpr, raw_cons, ring_mask) \
rte_write32((DB_CP_FLAGS | \
#define B_CP_DB(cpr, raw_cons, ring_mask) \
rte_write32((DB_CP_FLAGS | \
@@
-80,8
+80,16
@@
struct bnxt_db_info {
uint32_t db_key32;
};
bool db_64;
uint32_t db_key32;
};
bool db_64;
+ uint32_t db_ring_mask;
+ uint32_t db_epoch_mask;
+ uint32_t db_epoch_shift;
};
};
+#define DB_EPOCH(db, idx) (((idx) & (db)->db_epoch_mask) << \
+ ((db)->db_epoch_shift))
+#define DB_RING_IDX(db, idx) (((idx) & (db)->db_ring_mask) | \
+ DB_EPOCH(db, idx))
+
struct bnxt_ring;
struct bnxt_cp_ring_info {
uint32_t cp_raw_cons;
struct bnxt_ring;
struct bnxt_cp_ring_info {
uint32_t cp_raw_cons;
@@
-95,7
+103,6
@@
struct bnxt_cp_ring_info {
uint32_t hw_stats_ctx_id;
struct bnxt_ring *cp_ring_struct;
uint32_t hw_stats_ctx_id;
struct bnxt_ring *cp_ring_struct;
- uint16_t cp_cons;
bool valid;
};
bool valid;
};