2c83eb26a5
The following patch allows VF to VF mirroring in Tap-as-a-Service Code-changes are applicable for new tap agent driver for sriov on Intel i40e nic. Vlan Mirror input parameter is part of tap-flow-create API The current TaaS SRIOV driver is based on Intel i40e NIC driver with following requirements:- hardware: Intel Ethernet Network Adapter XXV710 (25GbE) Driver: Intel i40e v4.16.0 Ref Spec: openstack/neutron-specs/specs/rocky/port-mirroring-sriov-vfs.rst Commit: https://review.openstack.org/#/c/574477/ Change-Id: Id3aa83d7e1e22ae1806cef0c93e5dd61169c6735
29 lines
1.2 KiB
Bash
29 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2018 AT&T Corporation
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
help_msg="Incorrect arguments supplied!! Aborting....\nUsage: 1. VLANs to VF mirroring: $0 <phy-device-name> <dest-vf-index> <'vlan_mirror'> <'add'|'rem'> <vlan_ranges_string>\nUsage: 2. VF to VF mirroring: $0 <phy-device-name> <src-vf-index> <'ingress_mirror'|'egress_mirror'> <'add'|'rem'> <dest-vf-index>"
|
|
|
|
(($#!=5)) && { echo -e ${help_msg} && exit 1; }
|
|
|
|
if [ -f /sys/class/net/${1}/device/sriov/${2}/${3} ]
|
|
then
|
|
echo ${4} ${5} > /sys/class/net/${1}/device/sriov/${2}/${3}
|
|
else
|
|
echo "Invalid sysfs path: /sys/class/net/${1}/device/sriov/${2}/${3}"
|
|
exit 1
|
|
fi
|