Skip to content

Commit c3461e0

Browse files
aloktiwaNipaLocal
authored andcommitted
octeontx2: cn10k: fix RX flowid TCAM mask handling
The RX flowid programming initializes the TCAM mask to all ones, but then overwrites it when clearing the MAC DA mask bits. This results in losing the intended initialization and may affect other match fields. Update the code to clear the MAC DA bits using an AND operation, making the handling of mask[0] consistent with mask[1], where the field-specific bits are cleared after initializing the mask to ~0ULL. Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Signed-off-by: NipaLocal <nipa@local>
1 parent dbe6629 commit c3461e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static int cn10k_mcs_write_rx_flowid(struct otx2_nic *pfvf,
328328

329329
req->data[0] = FIELD_PREP(MCS_TCAM0_MAC_DA_MASK, mac_da);
330330
req->mask[0] = ~0ULL;
331-
req->mask[0] = ~MCS_TCAM0_MAC_DA_MASK;
331+
req->mask[0] &= ~MCS_TCAM0_MAC_DA_MASK;
332332

333333
req->data[1] = FIELD_PREP(MCS_TCAM1_ETYPE_MASK, ETH_P_MACSEC);
334334
req->mask[1] = ~0ULL;

0 commit comments

Comments
 (0)