1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
3 * Copyright (c) 2015-2018 Cavium Inc.
10 /* calculate the crc in the bulletin board */
11 static inline uint32_t
12 bnx2x_vf_crc(struct bnx2x_vf_bulletin *bull)
14 uint32_t crc_sz = sizeof(bull->crc), length = bull->length - crc_sz;
16 return ECORE_CRC32_LE(0, (uint8_t *)bull + crc_sz, length);
19 /* Checks are there mac/channel updates for VF
20 * returns TRUE if something was updated
23 bnx2x_check_bull(struct bnx2x_softc *sc)
25 struct bnx2x_vf_bulletin *bull;
27 uint16_t old_version = sc->old_bulletin.version;
28 uint64_t valid_bitmap;
30 bull = sc->pf2vf_bulletin;
31 if (old_version == bull->version) {
34 /* Check the crc until we get the correct data */
35 while (tries < BNX2X_VF_BULLETIN_TRIES) {
36 bull = sc->pf2vf_bulletin;
37 if (bull->crc == bnx2x_vf_crc(bull))
40 PMD_DRV_LOG(ERR, sc, "bad crc on bulletin board. contained %x computed %x",
41 bull->crc, bnx2x_vf_crc(bull));
44 if (tries == BNX2X_VF_BULLETIN_TRIES) {
45 PMD_DRV_LOG(ERR, sc, "pf to vf bulletin board crc was wrong %d consecutive times. Aborting",
51 valid_bitmap = bull->valid_bitmap;
53 /* check the mac address and VLAN and allocate memory if valid */
54 if (valid_bitmap & (1 << MAC_ADDR_VALID) && memcmp(bull->mac, sc->old_bulletin.mac, ETH_ALEN))
55 rte_memcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);
56 if (valid_bitmap & (1 << VLAN_VALID))
57 rte_memcpy(&bull->vlan, &sc->old_bulletin.vlan, VLAN_HLEN);
59 sc->old_bulletin = *bull;
64 /* place a given tlv on the tlv buffer at a given offset */
66 bnx2x_add_tlv(__rte_unused struct bnx2x_softc *sc, void *tlvs_list,
67 uint16_t offset, uint16_t type, uint16_t length)
69 struct channel_tlv *tl = (struct channel_tlv *)
70 ((unsigned long)tlvs_list + offset);
76 /* Initiliaze header of the first tlv and clear mailbox*/
78 bnx2x_vf_prep(struct bnx2x_softc *sc, struct vf_first_tlv *first_tlv,
79 uint16_t type, uint16_t length)
81 struct bnx2x_vf_mbx_msg *mbox = sc->vf2pf_mbox;
83 rte_spinlock_lock(&sc->vf2pf_lock);
85 PMD_DRV_LOG(DEBUG, sc, "Preparing %d tlv for sending", type);
87 memset(mbox, 0, sizeof(struct bnx2x_vf_mbx_msg));
89 bnx2x_add_tlv(sc, &first_tlv->tl, 0, type, length);
91 /* Initialize header of the first tlv */
92 first_tlv->reply_offset = sizeof(mbox->query);
95 /* releases the mailbox */
97 bnx2x_vf_finalize(struct bnx2x_softc *sc,
98 __rte_unused struct vf_first_tlv *first_tlv)
100 PMD_DRV_LOG(DEBUG, sc, "done sending [%d] tlv over vf pf channel",
103 rte_spinlock_unlock(&sc->vf2pf_lock);
106 #define BNX2X_VF_CMD_ADDR_LO PXP_VF_ADDR_CSDM_GLOBAL_START
107 #define BNX2X_VF_CMD_ADDR_HI BNX2X_VF_CMD_ADDR_LO + 4
108 #define BNX2X_VF_CMD_TRIGGER BNX2X_VF_CMD_ADDR_HI + 4
109 #define BNX2X_VF_CHANNEL_DELAY 100
110 #define BNX2X_VF_CHANNEL_TRIES 100
113 bnx2x_do_req4pf(struct bnx2x_softc *sc, rte_iova_t phys_addr)
115 uint8_t *status = &sc->vf2pf_mbox->resp.common_reply.status;
119 PMD_DRV_LOG(ERR, sc, "status should be zero before message"
124 bnx2x_check_bull(sc);
125 if (sc->old_bulletin.valid_bitmap & (1 << CHANNEL_DOWN)) {
126 PMD_DRV_LOG(ERR, sc, "channel is down. Aborting message sending");
130 REG_WR(sc, BNX2X_VF_CMD_ADDR_LO, U64_LO(phys_addr));
131 REG_WR(sc, BNX2X_VF_CMD_ADDR_HI, U64_HI(phys_addr));
133 /* memory barrier to ensure that FW can read phys_addr */
136 REG_WR8(sc, BNX2X_VF_CMD_TRIGGER, 1);
138 /* Do several attempts until PF completes */
139 for (i = 0; i < BNX2X_VF_CHANNEL_TRIES; i++) {
140 DELAY_MS(BNX2X_VF_CHANNEL_DELAY);
146 PMD_DRV_LOG(ERR, sc, "Response from PF timed out");
150 PMD_DRV_LOG(DEBUG, sc, "Response from PF was received");
154 static inline uint16_t bnx2x_check_me_flags(uint32_t val)
156 if (((val) & ME_REG_VF_VALID) && (!((val) & ME_REG_VF_ERR)))
157 return ME_REG_VF_VALID;
162 #define BNX2X_ME_ANSWER_DELAY 100
163 #define BNX2X_ME_ANSWER_TRIES 10
165 static inline int bnx2x_read_vf_id(struct bnx2x_softc *sc, uint32_t *vf_id)
170 while (i <= BNX2X_ME_ANSWER_TRIES) {
171 val = BNX2X_DB_READ(DOORBELL_ADDR(sc, 0));
172 if (bnx2x_check_me_flags(val)) {
173 PMD_DRV_LOG(DEBUG, sc,
174 "valid register value: 0x%08x", val);
179 DELAY_MS(BNX2X_ME_ANSWER_DELAY);
183 PMD_DRV_LOG(ERR, sc, "Invalid register value: 0x%08x", val);
188 #define BNX2X_VF_OBTAIN_MAX_TRIES 3
189 #define BNX2X_VF_OBTAIN_MAC_FILTERS 1
190 #define BNX2X_VF_OBTAIN_MC_FILTERS 10
193 int bnx2x_loop_obtain_resources(struct bnx2x_softc *sc)
195 struct vf_acquire_resp_tlv *resp = &sc->vf2pf_mbox->resp.acquire_resp,
196 *sc_resp = &sc->acquire_resp;
197 struct vf_resource_query *res_query;
198 struct vf_resc *resc;
199 int res_obtained = false;
204 PMD_DRV_LOG(DEBUG, sc, "trying to get resources");
206 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
210 memcpy(sc_resp, resp, sizeof(sc->acquire_resp));
214 /* check PF to request acceptance */
215 if (sc_resp->status == BNX2X_VF_STATUS_SUCCESS) {
216 PMD_DRV_LOG(DEBUG, sc, "resources obtained successfully");
218 } else if (sc_resp->status == BNX2X_VF_STATUS_NO_RESOURCES &&
219 tries < BNX2X_VF_OBTAIN_MAX_TRIES) {
220 PMD_DRV_LOG(DEBUG, sc,
221 "PF cannot allocate requested amount of resources");
223 res_query = &sc->vf2pf_mbox->query[0].acquire.res_query;
224 resc = &sc_resp->resc;
226 /* PF refused our request. Try to decrease request params */
227 res_query->num_txqs = min(res_query->num_txqs, resc->num_txqs);
228 res_query->num_rxqs = min(res_query->num_rxqs, resc->num_rxqs);
229 res_query->num_sbs = min(res_query->num_sbs, resc->num_sbs);
230 res_query->num_mac_filters = min(res_query->num_mac_filters, resc->num_mac_filters);
231 res_query->num_vlan_filters = min(res_query->num_vlan_filters, resc->num_vlan_filters);
232 res_query->num_mc_filters = min(res_query->num_mc_filters, resc->num_mc_filters);
234 memset(&sc->vf2pf_mbox->resp, 0, sizeof(union resp_tlvs));
236 PMD_DRV_LOG(ERR, sc, "Failed to get the requested "
237 "amount of resources: %d.",
241 } while (!res_obtained);
246 int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_count)
248 struct vf_acquire_tlv *acq = &sc->vf2pf_mbox->query[0].acquire;
253 bnx2x_vf_prep(sc, &acq->first_tlv, BNX2X_VF_TLV_ACQUIRE, sizeof(*acq));
255 if (bnx2x_read_vf_id(sc, &vf_id)) {
262 acq->res_query.num_rxqs = rx_count;
263 acq->res_query.num_txqs = tx_count;
264 acq->res_query.num_sbs = sc->igu_sb_cnt;
265 acq->res_query.num_mac_filters = BNX2X_VF_OBTAIN_MAC_FILTERS;
266 acq->res_query.num_mc_filters = BNX2X_VF_OBTAIN_MC_FILTERS;
268 acq->bulletin_addr = sc->pf2vf_bulletin_mapping.paddr;
270 /* Request physical port identifier */
271 bnx2x_add_tlv(sc, acq, acq->first_tlv.tl.length,
272 BNX2X_VF_TLV_PHYS_PORT_ID,
273 sizeof(struct channel_tlv));
275 bnx2x_add_tlv(sc, acq,
276 (acq->first_tlv.tl.length + sizeof(struct channel_tlv)),
277 BNX2X_VF_TLV_LIST_END,
278 sizeof(struct channel_list_end_tlv));
280 /* requesting the resources in loop */
281 rc = bnx2x_loop_obtain_resources(sc);
285 struct vf_acquire_resp_tlv sc_resp = sc->acquire_resp;
287 sc->devinfo.chip_id |= (sc_resp.chip_num & 0xFFFF);
288 sc->devinfo.int_block = INT_BLOCK_IGU;
289 sc->devinfo.chip_port_mode = CHIP_2_PORT_MODE;
290 sc->devinfo.mf_info.mf_ov = 0;
291 sc->devinfo.mf_info.mf_mode = 0;
292 sc->devinfo.flash_size = 0;
294 sc->igu_sb_cnt = sc_resp.resc.num_sbs;
295 sc->igu_base_sb = sc_resp.resc.hw_sbs[0] & 0xFF;
297 sc->max_tx_queues = sc_resp.resc.num_txqs;
298 sc->max_rx_queues = sc_resp.resc.num_rxqs;
300 sc->link_params.chip_id = sc->devinfo.chip_id;
301 sc->doorbell_size = sc_resp.db_size;
302 sc->flags |= BNX2X_NO_WOL_FLAG | BNX2X_NO_ISCSI_OOO_FLAG | BNX2X_NO_ISCSI_FLAG | BNX2X_NO_FCOE_FLAG;
304 PMD_DRV_LOG(DEBUG, sc, "status block count = %d, base status block = %x",
305 sc->igu_sb_cnt, sc->igu_base_sb);
306 strncpy(sc->fw_ver, sc_resp.fw_ver, sizeof(sc->fw_ver));
308 if (rte_is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
309 rte_ether_addr_copy(&sc_resp.resc.current_mac_addr,
310 (struct rte_ether_addr *)sc->link_params.mac_addr);
312 rte_eth_random_addr(sc->link_params.mac_addr);
315 bnx2x_vf_finalize(sc, &acq->first_tlv);
320 /* Ask PF to release VF's resources */
322 bnx2x_vf_close(struct bnx2x_softc *sc)
324 struct vf_release_tlv *query;
325 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
329 query = &sc->vf2pf_mbox->query[0].release;
330 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_RELEASE,
333 if (bnx2x_read_vf_id(sc, &vf_id)) {
338 query->vf_id = vf_id;
340 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
341 BNX2X_VF_TLV_LIST_END,
342 sizeof(struct channel_list_end_tlv));
344 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
345 if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
346 PMD_DRV_LOG(ERR, sc, "Failed to release VF");
349 bnx2x_vf_finalize(sc, &query->first_tlv);
352 /* Let PF know the VF status blocks phys_addrs */
354 bnx2x_vf_init(struct bnx2x_softc *sc)
356 struct vf_init_tlv *query;
357 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
360 PMD_INIT_FUNC_TRACE(sc);
362 query = &sc->vf2pf_mbox->query[0].init;
363 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_INIT,
366 FOR_EACH_QUEUE(sc, i) {
367 query->sb_addr[i] = (unsigned long)(sc->fp[i].sb_dma.paddr);
370 query->stats_step = sizeof(struct per_queue_stats);
371 query->stats_addr = sc->fw_stats_data_mapping +
372 offsetof(struct bnx2x_fw_stats_data, queue_stats);
374 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
375 BNX2X_VF_TLV_LIST_END,
376 sizeof(struct channel_list_end_tlv));
378 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
381 if (reply->status != BNX2X_VF_STATUS_SUCCESS) {
382 PMD_DRV_LOG(ERR, sc, "Failed to init VF");
387 PMD_DRV_LOG(DEBUG, sc, "VF was initialized");
389 bnx2x_vf_finalize(sc, &query->first_tlv);
394 bnx2x_vf_unload(struct bnx2x_softc *sc)
396 struct vf_close_tlv *query;
397 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
401 PMD_INIT_FUNC_TRACE(sc);
403 FOR_EACH_QUEUE(sc, i)
404 bnx2x_vf_teardown_queue(sc, i);
406 bnx2x_vf_set_mac(sc, false);
408 query = &sc->vf2pf_mbox->query[0].close;
409 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_CLOSE,
412 if (bnx2x_read_vf_id(sc, &vf_id)) {
417 query->vf_id = vf_id;
419 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
420 BNX2X_VF_TLV_LIST_END,
421 sizeof(struct channel_list_end_tlv));
423 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
424 if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
426 "Bad reply from PF for close message");
429 bnx2x_vf_finalize(sc, &query->first_tlv);
432 static inline uint16_t
433 bnx2x_vf_q_flags(uint8_t leading)
435 uint16_t flags = leading ? BNX2X_VF_Q_FLAG_LEADING_RSS : 0;
437 flags |= BNX2X_VF_Q_FLAG_CACHE_ALIGN;
438 flags |= BNX2X_VF_Q_FLAG_STATS;
439 flags |= BNX2X_VF_Q_FLAG_VLAN;
445 bnx2x_vf_rx_q_prep(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
446 struct vf_rxq_params *rxq_init, uint16_t flags)
448 struct bnx2x_rx_queue *rxq;
450 rxq = sc->rx_queues[fp->index];
452 PMD_DRV_LOG(ERR, sc, "RX queue %d is NULL", fp->index);
456 rxq_init->rcq_addr = rxq->cq_ring_phys_addr;
457 rxq_init->rcq_np_addr = rxq->cq_ring_phys_addr + BNX2X_PAGE_SIZE;
458 rxq_init->rxq_addr = rxq->rx_ring_phys_addr;
459 rxq_init->vf_sb_id = fp->index;
460 rxq_init->sb_cq_index = HC_INDEX_ETH_RX_CQ_CONS;
461 rxq_init->mtu = sc->mtu;
462 rxq_init->buf_sz = fp->rx_buf_size;
463 rxq_init->flags = flags;
464 rxq_init->stat_id = -1;
465 rxq_init->cache_line_log = BNX2X_RX_ALIGN_SHIFT;
469 bnx2x_vf_tx_q_prep(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
470 struct vf_txq_params *txq_init, uint16_t flags)
472 struct bnx2x_tx_queue *txq;
474 txq = sc->tx_queues[fp->index];
476 PMD_DRV_LOG(ERR, sc, "TX queue %d is NULL", fp->index);
480 txq_init->txq_addr = txq->tx_ring_phys_addr;
481 txq_init->sb_index = HC_INDEX_ETH_TX_CQ_CONS_COS0;
482 txq_init->flags = flags;
483 txq_init->traffic_type = LLFC_TRAFFIC_TYPE_NW;
484 txq_init->vf_sb_id = fp->index;
488 bnx2x_vf_setup_queue(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, int leading)
490 struct vf_setup_q_tlv *query;
491 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
492 uint16_t flags = bnx2x_vf_q_flags(leading);
495 query = &sc->vf2pf_mbox->query[0].setup_q;
496 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_SETUP_Q,
499 query->vf_qid = fp->index;
500 query->param_valid = VF_RXQ_VALID | VF_TXQ_VALID;
502 bnx2x_vf_rx_q_prep(sc, fp, &query->rxq, flags);
503 bnx2x_vf_tx_q_prep(sc, fp, &query->txq, flags);
505 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
506 BNX2X_VF_TLV_LIST_END,
507 sizeof(struct channel_list_end_tlv));
509 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
512 if (reply->status != BNX2X_VF_STATUS_SUCCESS) {
513 PMD_DRV_LOG(ERR, sc, "Failed to setup VF queue[%d]",
518 bnx2x_vf_finalize(sc, &query->first_tlv);
524 bnx2x_vf_teardown_queue(struct bnx2x_softc *sc, int qid)
526 struct vf_q_op_tlv *query_op;
527 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
530 query_op = &sc->vf2pf_mbox->query[0].q_op;
531 bnx2x_vf_prep(sc, &query_op->first_tlv,
532 BNX2X_VF_TLV_TEARDOWN_Q,
535 query_op->vf_qid = qid;
537 bnx2x_add_tlv(sc, query_op,
538 query_op->first_tlv.tl.length,
539 BNX2X_VF_TLV_LIST_END,
540 sizeof(struct channel_list_end_tlv));
542 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
543 if (rc || reply->status != BNX2X_VF_STATUS_SUCCESS)
545 "Bad reply for vf_q %d teardown", qid);
547 bnx2x_vf_finalize(sc, &query_op->first_tlv);
553 bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)
555 struct vf_set_q_filters_tlv *query;
556 struct vf_common_reply_tlv *reply;
559 query = &sc->vf2pf_mbox->query[0].set_q_filters;
560 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_SET_Q_FILTERS,
563 query->vf_qid = sc->fp->index;
564 query->mac_filters_cnt = 1;
565 query->flags = BNX2X_VF_MAC_VLAN_CHANGED;
567 query->filters[0].flags = (set ? BNX2X_VF_Q_FILTER_SET_MAC : 0) |
568 BNX2X_VF_Q_FILTER_DEST_MAC_VALID;
570 bnx2x_check_bull(sc);
572 rte_memcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);
574 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
575 BNX2X_VF_TLV_LIST_END,
576 sizeof(struct channel_list_end_tlv));
578 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
581 reply = &sc->vf2pf_mbox->resp.common_reply;
583 while (BNX2X_VF_STATUS_FAILURE == reply->status &&
584 bnx2x_check_bull(sc)) {
585 /* A new mac was configured by PF for us */
586 rte_memcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,
588 rte_memcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,
591 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
596 if (BNX2X_VF_STATUS_SUCCESS != reply->status) {
597 PMD_DRV_LOG(ERR, sc, "Bad reply from PF for SET MAC message: %d",
602 bnx2x_vf_finalize(sc, &query->first_tlv);
608 bnx2x_vf_config_rss(struct bnx2x_softc *sc,
609 struct ecore_config_rss_params *params)
611 struct vf_rss_tlv *query;
612 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
615 query = &sc->vf2pf_mbox->query[0].update_rss;
617 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_UPDATE_RSS,
620 /* add list termination tlv */
621 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
622 BNX2X_VF_TLV_LIST_END,
623 sizeof(struct channel_list_end_tlv));
625 rte_memcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));
626 query->rss_key_size = T_ETH_RSS_KEY;
628 rte_memcpy(query->ind_table, params->ind_table, T_ETH_INDIRECTION_TABLE_SIZE);
629 query->ind_table_size = T_ETH_INDIRECTION_TABLE_SIZE;
631 query->rss_result_mask = params->rss_result_mask;
632 query->rss_flags = params->rss_flags;
634 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
638 if (reply->status != BNX2X_VF_STATUS_SUCCESS) {
639 PMD_DRV_LOG(ERR, sc, "Failed to configure RSS");
643 bnx2x_vf_finalize(sc, &query->first_tlv);
649 bnx2x_vf_set_rx_mode(struct bnx2x_softc *sc)
651 struct vf_set_q_filters_tlv *query;
652 struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
655 query = &sc->vf2pf_mbox->query[0].set_q_filters;
656 bnx2x_vf_prep(sc, &query->first_tlv, BNX2X_VF_TLV_SET_Q_FILTERS,
660 query->flags = BNX2X_VF_RX_MASK_CHANGED;
662 switch (sc->rx_mode) {
663 case BNX2X_RX_MODE_NONE: /* no Rx */
664 query->rx_mask = VFPF_RX_MASK_ACCEPT_NONE;
666 case BNX2X_RX_MODE_NORMAL:
667 query->rx_mask = VFPF_RX_MASK_ACCEPT_MATCHED_MULTICAST;
668 query->rx_mask |= VFPF_RX_MASK_ACCEPT_MATCHED_UNICAST;
669 query->rx_mask |= VFPF_RX_MASK_ACCEPT_BROADCAST;
671 case BNX2X_RX_MODE_ALLMULTI:
672 query->rx_mask = VFPF_RX_MASK_ACCEPT_ALL_MULTICAST;
673 query->rx_mask |= VFPF_RX_MASK_ACCEPT_MATCHED_UNICAST;
674 query->rx_mask |= VFPF_RX_MASK_ACCEPT_BROADCAST;
676 case BNX2X_RX_MODE_ALLMULTI_PROMISC:
677 case BNX2X_RX_MODE_PROMISC:
678 query->rx_mask = VFPF_RX_MASK_ACCEPT_ALL_UNICAST;
679 query->rx_mask |= VFPF_RX_MASK_ACCEPT_ALL_MULTICAST;
680 query->rx_mask |= VFPF_RX_MASK_ACCEPT_BROADCAST;
683 PMD_DRV_LOG(ERR, sc, "BAD rx mode (%d)", sc->rx_mode);
688 bnx2x_add_tlv(sc, query, query->first_tlv.tl.length,
689 BNX2X_VF_TLV_LIST_END,
690 sizeof(struct channel_list_end_tlv));
692 rc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);
696 if (reply->status != BNX2X_VF_STATUS_SUCCESS) {
697 PMD_DRV_LOG(ERR, sc, "Failed to set RX mode");
702 bnx2x_vf_finalize(sc, &query->first_tlv);