diff options
Diffstat (limited to 'tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/vhost_substitute.sh')
-rwxr-xr-x | tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/vhost_substitute.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/vhost_substitute.sh b/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/vhost_substitute.sh new file mode 100755 index 00000000..471eecc5 --- /dev/null +++ b/tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd/vhost_substitute.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# SPDX-License-Identifier: Apache-2.0 +# Copyright(c) 2021 Red Hat, Inc. + + +# The first two commands update one of the 'if' checks to remove +# the check for 'master == VHOST_USER_SET_VRING_CALL'. +# +# Search for: " !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) &&". +# Replace with: " !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) {". +sed -i -e 's/ !(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED) &&/ !(dev->flags \& VIRTIO_DEV_VDPA_CONFIGURED)) {/g' lib/librte_vhost/vhost_user.c +# +# Search for line with: " msg.request.master == VHOST_USER_SET_VRING_CALL) {". +# Delete the line. +sed -i -e '/ msg\.request\.master == VHOST_USER_SET_VRING_CALL) {/d' lib/librte_vhost/vhost_user.c + + +# Force an RARP message to be sent out. +# +# Search for line with: " hw->started = true;". +# Append line: " virtio_notify_peers(dev);". +sed -i -e '/ hw->started = true;/a virtio_notify_peers(dev);' drivers/net/virtio/virtio_ethdev.c |