X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fthunderx%2Fbase%2Fnicvf_mbox.c;h=d7209c0083f9d95e2e9b75c4df2a986258733e72;hb=18da3c854bb8105818dc23c36eecf3465596052a;hp=8f83d41ddc0435ddd7a024290dd8ef73220ffc76;hpb=aaf4363e1e9e518c034c7ff9938a2faefde9854d;p=dpdk.git diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c index 8f83d41ddc..d7209c0083 100644 --- a/drivers/net/thunderx/base/nicvf_mbox.c +++ b/drivers/net/thunderx/base/nicvf_mbox.c @@ -36,7 +36,7 @@ static const char *mbox_message[NIC_MBOX_MSG_MAX] = { [NIC_MBOX_MSG_SHUTDOWN] = "NIC_MBOX_MSG_SHUTDOWN", }; -static inline const char * __attribute__((unused)) +static inline const char * __rte_unused nicvf_mbox_msg_str(int msg) { assert(msg >= 0 && msg < NIC_MBOX_MSG_MAX); @@ -413,6 +413,16 @@ nicvf_mbox_reset_stat_counters(struct nicvf *nic, uint16_t rx_stat_mask, return nicvf_mbox_send_msg_to_pf(nic, &mbx); } +int +nicvf_mbox_set_link_up_down(struct nicvf *nic, bool enable) +{ + struct nic_mbx mbx = { .msg = { 0 } }; + + mbx.lbk.msg = NIC_MBOX_MSG_SET_LINK; + mbx.lbk.vf_id = nic->vf_id; + mbx.lbk.enable = enable; + return nicvf_mbox_send_msg_to_pf(nic, &mbx); +} void nicvf_mbox_shutdown(struct nicvf *nic) {