Ilya Maximets <[email protected]> writes: > On 9/9/25 5:10 PM, Aaron Conole via dev wrote: >> Eelco Chaudron <[email protected]> writes: >> >>> On 3 Sep 2025, at 16:26, Aaron Conole via dev wrote: >>> >>>> There is some confusion about which options can be passed to ovs-tcpdump >>>> when gathering data. The interpretation sometimes is that ovs-tcpdump >>>> only accepts a specific small set of options and discards other options. >>>> This leads to questions such as, "How can I use '-C' or set the snaplen >>>> with ovs-tcpdump like tcpdump allows?" To correct this, print the >>>> dump_cmd help after the ovs-tcpdump options. >>>> >>>> As part of this rework, we delay printing the usage data until after >>>> all arguments are processed, which allows setting the dumpcmd as well >>>> for the --help option. >>>> >>>> Signed-off-by: Aaron Conole <[email protected]> >>> >>> Hi Aaron, >>> >>> I think the patch in general is good, however, the output might end up >>> being more confusing. For example: >>> >>> The following are the 'tcpdump' options: >>> tcpdump version 4.99.5 >>> libpcap version 1.10.5 (with TPACKET_V3) >>> OpenSSL 3.2.4 11 Feb 2025 >>> 64-bit build, 64-bit time_t >>> Usage: tcpdump [-AbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count >>> ] [--count] >>> [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] >>> [ -i interface ] [ --immediate-mode ] [ -j tstamptype ] >>> [ -M secret ] [ --number ] [ --print ] [ -Q in|out|inout ] >>> [ -r file ] [ -s snaplen ] [ -T type ] [ --version ] >>> [ -V file ] [ -w file ] [ -W filecount ] [ -y datalinktype ] >>> [ --time-stamp-precision precision ] [ --micro ] [ --nano ] >>> [ -z postrotate-command ] [ -Z user ] [ expression ] >>> >>> >>> Here, the version info and other metadata appear before the actual >>> usage instructions. >>> Should we perhaps start dumping from “Usage” onwards? Though I’m not >>> sure this will work reliably for all tcpdump versions. > > Rabbit also points out that some tcpdump builds print help to stderr or only > support “-h”. This should be taken care of, I guess.
Sure. Although, we need to go back to 2014 for tcpdump versions that don't support --help. tcpdump change to use stdout for help in 2020, so again, sure thing but still kindof old. For example, we tell folks 2.17 is EOL, and that was released two years later than 2020. However, since it already gave the code for it I will fold in the rabbit suggestion. >> >> That doesn't seem very robust, imo. >> >>> Thoughts? >> >> I agree it can be a bit confusing, but also, right now there's confusion >> about what options can be passed to ovs-tcpdump and that leads people to >> do their own weird solutions (or even re-implement it). And though the >> documentation looks to be clear in most places, the missing details in >> '--help' creates this confusion. > > Maybe adding an example with some complex-ish arguments instead would help? I'm not so sure. Part of the confusion is that the help text is what people look at. I worry that examples also will make people believe that these are just some additional arguments that somehow are parsed by ovs-tcpdump, rather than just passed along to whatever tcpdump program was specified. I will also look at any changes in the documentation wording that might help. > Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
