| 410 | } |
| 411 | |
| 412 | static int |
| 413 | virtio_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 | |
| 439 | static int |
| 440 | virtio_dev_allmulticast_enable(struct rte_eth_dev *dev) |
nothing calls this directly
no test coverage detected