[ovs-dev] [PATCH 5/5] socket-util: Log the kernel assigned port number when asked.

Gurucharan Shetty shettyg at nicira.com
Wed May 28 16:21:27 UTC 2014


On Tue, May 27, 2014 at 5:12 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, May 19, 2014 at 12:52:26PM -0700, Gurucharan Shetty wrote:
>> So far, we log the kernel assigned port number when the port number is
>> not specified. On Windows, this happens multiple times because "unix"
>> sockets are implemented internally via TCP ports. This means that many tests,
>> specially the ovs-ofctl monitor tests, need to filter out the
>> additional messages. Doing that is not a big deal, but I think it will
>> keep manifesting in future tests added by Linux developers.
>>
>> With this commit, we simply don't print the kernel assigned TCP ports
>> on windows when done for "unix" sockets.
>>
>> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>
> new_pstream() looks like it has two callers with similar code:
>     fd = inet_open_passive(SOCK_STREAM, suffix, -1, &ss, dscp, true);
>     if (fd < 0) {
>         return -fd;
>     }
>
>     return new_pstream(fd, &ss, pstreamp);
> and
>     fd = inet_open_passive(SOCK_STREAM, suffix_new, -1, &ss, dscp, false);
>     if (fd < 0) {
>         return -fd;
>     }
>
>     error = new_pstream(fd, &ss, pstreamp);
>     if (error) {
>         goto exit;
>     }
>
> Can we move the inet_open_passive() call into new_pstream() and add a
> kernel_print_port parameter to new_pstream()?
I made the changes as you suggested and pushed the series.
Thank you!
>
> Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list