net/ngbe: support SR-IOV
[dpdk.git] / drivers / net / ngbe / base / ngbe_mbx.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3  * Copyright(c) 2010-2017 Intel Corporation
4  */
5
6 #include "ngbe_type.h"
7
8 #include "ngbe_mbx.h"
9
10 /**
11  *  ngbe_init_mbx_params_pf - set initial values for pf mailbox
12  *  @hw: pointer to the HW structure
13  *
14  *  Initializes the hw->mbx struct to correct values for pf mailbox
15  */
16 void ngbe_init_mbx_params_pf(struct ngbe_hw *hw)
17 {
18         struct ngbe_mbx_info *mbx = &hw->mbx;
19
20         mbx->timeout = 0;
21         mbx->usec_delay = 0;
22
23         mbx->size = NGBE_P2VMBX_SIZE;
24
25         mbx->stats.msgs_tx = 0;
26         mbx->stats.msgs_rx = 0;
27         mbx->stats.reqs = 0;
28         mbx->stats.acks = 0;
29         mbx->stats.rsts = 0;
30 }