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

Function virtio_dev_allmulticast_enable

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

Source from the content-addressed store, hash-verified

437}
438
439static int
440virtio_dev_allmulticast_enable(struct rte_eth_dev *dev)
441{
442 struct virtio_hw *hw = dev->data->dev_private;
443 struct virtio_pmd_ctrl ctrl;
444 int dlen[1];
445 int ret;
446
447 if (!virtio_with_feature(hw, VIRTIO_NET_F_CTRL_RX)) {
448 PMD_INIT_LOG(INFO, "host does not support rx control");
449 return -ENOTSUP;
450 }
451
452 ctrl.hdr.class = VIRTIO_NET_CTRL_RX;
453 ctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;
454 ctrl.data[0] = 1;
455 dlen[0] = 1;
456
457 ret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);
458 if (ret) {
459 PMD_INIT_LOG(ERR, "Failed to enable allmulticast");
460 return -EAGAIN;
461 }
462
463 return 0;
464}
465
466static int
467virtio_dev_allmulticast_disable(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