summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorLin Huang <linhuang@ruijie.com.cn>2022-10-06 15:11:08 +0800
committerIlya Maximets <i.maximets@ovn.org>2022-10-11 21:10:46 +0200
commitccd26e79e5d24dd19e59d53337b51ce167966530 (patch)
tree085e4c9eda308844a3e254e924838d45f0ea77c5 /utilities
parent96b26dce1da18f00dcad2e14bc058158fffa313f (diff)
downloadopenvswitch-ccd26e79e5d24dd19e59d53337b51ce167966530.tar.gz
ovs-tcpdump: Fix bond port unable to capture jumbo frames.
Currently the ovs-tcpdump utility creates a tap port to capture the frames of a bond port. If a user want to capture the packets from the bond port which member interface's mtu is more than 1500. By default the utility creates a tap port which mtu is 1500, regardless the member interface's mtu config. So that user can't get the bond port frames which mtu is lager than 1500. This patch fix this issue by checking the member interface's mtu and set maximal mtu value to the tap port. Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Lin Huang <linhuang@ruijie.com.cn> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/ovs-tcpdump.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index 7fd26e405..e12bab889 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -225,6 +225,13 @@ class OVSDB(object):
def interface_mtu(self, intf_name):
try:
intf = self._find_row_by_name('Interface', intf_name)
+ if intf is None:
+ mtu = 1500
+ port = self._find_row_by_name('Port', intf_name)
+ for intf in port.interfaces:
+ if mtu < intf.mtu[0]:
+ mtu = intf.mtu[0]
+ return mtu
return intf.mtu[0]
except Exception:
return None