MCPcopy Create free account
hub / github.com/F-Stack/f-stack / virtio_dev_allmulticast_disable

Function virtio_dev_allmulticast_disable

dpdk/drivers/net/virtio/virtio_ethdev.c:466–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466static int
467virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
468{
469 struct virtio_hw *hw = dev->data->dev_private;
470 struct virtio_pmd_ctrl ctrl;
471 int dlen[1];
472 int ret;
473
474 if (!virtio_with_feature(hw, VIRTIO_NET_F_CTRL_RX)) {
475 PMD_INIT_LOG(INFO, "host does not support rx control");
476 return -ENOTSUP;
477 }
478
479 ctrl.hdr.class = VIRTIO_NET_CTRL_RX;
480 ctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;
481 ctrl.data[0] = 0;
482 dlen[0] = 1;
483
484 ret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);
485 if (ret) {
486 PMD_INIT_LOG(ERR, "Failed to disable allmulticast");
487 return -EAGAIN;
488 }
489
490 return 0;
491}
492
493uint16_t
494virtio_rx_mem_pool_buf_size(struct rte_mempool *mp)

Callers

nothing calls this directly

Calls 2

virtio_with_featureFunction · 0.85
virtio_send_commandFunction · 0.85

Tested by

no test coverage detected