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

GitHub noreply at github.com
Fri Feb 20 19:36:18 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c2e3cbaf7bde655d7521a63dd57a13085125c3b4
      https://github.com/openvswitch/ovs/commit/c2e3cbaf7bde655d7521a63dd57a13085125c3b4
  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.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: afc1d536743e2d869fe90712b51a57334b57e3cc
      https://github.com/openvswitch/ovs/commit/afc1d536743e2d869fe90712b51a57334b57e3cc
  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/ee5315b9f90b...afc1d536743e


More information about the git mailing list