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

Function virtio_dev_promiscuous_disable

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

Source from the content-addressed store, hash-verified

410}
411
412static int
413virtio_dev_promiscuous_disable(struct rte_eth_dev *dev)
414{
415 struct virtio_hw *hw = dev->data->dev_private;
416 struct virtio_pmd_ctrl ctrl;
417 int dlen[1];
418 int ret;
419
420 if (!virtio_with_feature(hw, VIRTIO_NET_F_CTRL_RX)) {
421 PMD_INIT_LOG(INFO, "host does not support rx control");
422 return -ENOTSUP;
423 }
424
425 ctrl.hdr.class = VIRTIO_NET_CTRL_RX;
426 ctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;
427 ctrl.data[0] = 0;
428 dlen[0] = 1;
429
430 ret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);
431 if (ret) {
432 PMD_INIT_LOG(ERR, "Failed to disable promisc");
433 return -EAGAIN;
434 }
435
436 return 0;
437}
438
439static int
440virtio_dev_allmulticast_enable(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 2

virtio_with_featureFunction · 0.85
virtio_send_commandFunction · 0.85

Tested by

no test coverage detected