diff options
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c index 96a4dbba25a3..39f439202235 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c @@ -506,11 +506,14 @@ int otx2_destroy_mcam_flows(struct otx2_nic *pfvf) return 0; } -static int otx2_install_rxvlan_offload_flow(struct otx2_nic *pfvf) +int otx2_install_rxvlan_offload_flow(struct otx2_nic *pfvf) { struct npc_install_flow_req *req; int err; + if (!(pfvf->flags & OTX2_FLAG_MCAM_ENTRIES_ALLOC)) + return -ENOMEM; + otx2_mbox_lock(&pfvf->mbox); req = otx2_mbox_alloc_msg_npc_install_flow(&pfvf->mbox); if (!req) { |