[ovs-git] [openvswitch/ovs] 611f76: stream: Eliminate pstream_set_dscp().

GitHub noreply at github.com
Fri Feb 20 22:26:15 UTC 2015


  Branch: refs/heads/branch-2.3
  Home:   https://github.com/openvswitch/ovs
  Commit: 611f766e77b3da91db98308794c0659a197d0ed1
      https://github.com/openvswitch/ovs/commit/611f766e77b3da91db98308794c0659a197d0ed1
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2015-02-20 (Fri, 20 Feb 2015)

  Changed paths:
    M lib/jsonrpc.c
    M lib/stream-fd-unix.c
    M lib/stream-fd.h
    M lib/stream-provider.h
    M lib/stream-ssl.c
    M lib/stream-tcp.c
    M lib/stream-unix.c
    M lib/stream.c
    M lib/stream.h
    M ovsdb/jsonrpc-server.c

  Log Message:
  -----------
  stream: Eliminate pstream_set_dscp().

This function is really of marginal utility.  This commit drops it and
makes the existing callers instead open a new pstream with the desired
dscp.

The ulterior motive here is that the set_dscp() function that actually sets
the DSCP on a socket really wants to know the address family (AF_INET vs.
AF_INET6).  We could plumb that down through the stream code, and that's
one reasonable option, but I thought that simply eliminating some calls
to set_dscp() where we don't already have the address family handy was
another reasonable way to go.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Alex Wang <alexw at nicira.com>


  Commit: ba8df9af52a897d8fd663b57eb345e7c5f94b925
      https://github.com/openvswitch/ovs/commit/ba8df9af52a897d8fd663b57eb345e7c5f94b925
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2015-02-20 (Fri, 20 Feb 2015)

  Changed paths:
    M lib/socket-util.c
    M lib/socket-util.h
    M python/ovs/socket_util.py

  Log Message:
  -----------
  socket-util: Use correct address family in set_dscp(), instead of guessing.

The set_dscp() function, until now, tried to set the DSCP as IPv4 and as
IPv6. This worked OK on Linux, where an ENOPROTOOPT error made it really
clear which one was wrong, but FreeBSD uses EINVAL instead, which has
multiple meanings and which it therefore seems somewhat risky to ignore.
Instead, this commit just tries to set the correct address family's DSCP
option.

Tested by Alex Wang on FreeBSD 9.3.

Reported-by: Atanu Ghosh <atanu at acm.org>
Signed-off-by: Ben Pfaff <blp at nicira.com>
Co-authored-by: Alex Wang <alexw at nicira.com>
Signed-off-by: Alex Wang <alexw at nicira.com>
Tested-by: Alex Wang <alexw at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/a62c715408ca...ba8df9af52a8


More information about the git mailing list