Hi Aaron,
Pls review my patch. Thanks a lot. > -----Original Message----- > From: dev <[email protected]> On Behalf Of > [email protected] > Sent: Wednesday, October 5, 2022 8:12 PM > To: [email protected]; [email protected]; [email protected] > Cc: Lin Huang <[email protected]> > Subject: [ovs-dev] [PATCH] ovs-tcpdump: Fix bond port unable to capture > jumbo frames. > > From: Lin Huang <[email protected]> > > 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 cann't get the bond port frames which mtu is lager than 1500. > > This patch fix this issiue by checking the member interface's mtu and > set minimal mtu value to the tap port. > > Signed-off-by: Lin Huang <[email protected]> > --- > utilities/ovs-tcpdump.in | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in > index 7fd26e405..d2b86d586 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 > -- > 2.37.1.windows.1 > > _______________________________________________ > dev mailing list > [email protected] > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.o > penvswitch.org%2Fmailman%2Flistinfo%2Fovs-dev&data=05%7C01%7C% > 7C8bc01c80cf344e066f1c08daa6caf10f%7C84df9e7fe9f640afb435aaaaaaaaa > aaa%7C1%7C0%7C638005687849189038%7CUnknown%7CTWFpbGZsb3d8ey > JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D% > 7C3000%7C%7C%7C&sdata=59%2B7b05f3mx948kdeuZ46Dx7VXvy3mILC > T78XDJ7uEo%3D&reserved=0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
