Skip to content

Commit d424b6c

Browse files
sgoutham-marvelldavem330
authored andcommitted
octeontx2-pf: Enable SRIOV and added VF mbox handling
Added 'sriov_configure' to enable/disable virtual functions (VFs). Also added handling of mailbox messages from these VFs. Admin function (AF) is the only one with all priviliges to configure HW, alloc resources etc etc, PFs and it's VFs have to request AF via mbox for all their needs. But unlike PFs, their VFs cannot send a mbox request directly. A VF shares a mailbox region with it's parent PF, so VF sends a mailbox msg to PF and then PF forwards it to AF. Then AF after processing sends response to PF which it again forwards to VF. This patch adds support for this 'VF <=> PF <=> AF' mailbox communication. Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Christina Jacob <cjacob@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4e8386f commit d424b6c

2 files changed

Lines changed: 446 additions & 0 deletions

File tree

‎drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,11 @@ struct otx2_nic {
215215

216216
/* Mbox */
217217
struct mbox mbox;
218+
struct mbox *mbox_pfvf;
218219
struct workqueue_struct *mbox_wq;
220+
struct workqueue_struct *mbox_pfvf_wq;
219221

222+
u8 total_vfs;
220223
u16 pcifunc; /* RVU PF_FUNC */
221224
u16 bpid[NIX_MAX_BPID_CHAN];
222225
struct cgx_link_user_info linfo;

0 commit comments

Comments
 (0)