Skip to content

Commit 7320383

Browse files
Subbaraya SundeepPaolo Abeni
authored andcommitted
octeontx2-af: Add MACSEC capability flag
MACSEC block may be fused out on some silicons hence modify get_hw_cap mailbox message to set a capability flag in its response message based on MACSEC block availability. Signed-off-by: Subbaraya Sundeep <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 28fcb4b commit 7320383

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/af/mbox.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ struct get_hw_cap_rsp {
524524
u8 nix_fixed_txschq_mapping; /* Schq mapping fixed or flexible */
525525
u8 nix_shaping; /* Is shaping and coloring supported */
526526
u8 npc_hash_extract; /* Is hash extract supported */
527+
#define HW_CAP_MACSEC BIT_ULL(1)
528+
u64 hw_caps;
527529
};
528530

529531
/* CGX mbox message formats */

drivers/net/ethernet/marvell/octeontx2/af/rvu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,6 +2033,9 @@ int rvu_mbox_handler_get_hw_cap(struct rvu *rvu, struct msg_req *req,
20332033
rsp->nix_shaping = hw->cap.nix_shaping;
20342034
rsp->npc_hash_extract = hw->cap.npc_hash_extract;
20352035

2036+
if (rvu->mcs_blk_cnt)
2037+
rsp->hw_caps = HW_CAP_MACSEC;
2038+
20362039
return 0;
20372040
}
20382041

0 commit comments

Comments
 (0)