INSTALL.Debian: New instructions for installing on Debian.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-errors: Fix typo in comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Don't use error categories as if they were actually errors.

The OFPERR_* naming scheme is confusing, because it mixes categories with
specific errors.  Categories can't be encoded for sending to controllers,
so this is a problem.  This commit fixes up the cases where categories
were used as errors, replacing them by real errors types.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-errors: Correctly encode errors as extensions or not depending on domain.

When ofp-errors was introduced, each OFPERR_* was either an extension or
not.  However, since then, some Nicira extension error code have been
given official error codes in later OpenFlow versions, so now whether an
OFPERR_* is an extension depends on the OpenFlow versions.  This means
that certain errors were encoded incorrectly as extensions in later
OpenFlow versions.  This commit fixes the problem.

This commit also adds a test that should prevent a regression.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-errors: Remove OFPERR_* values for error categories.

The main use of OFPERR_* is to define specific errors, but OFPERR_* also
existed for each possible category of error, to enable partial decoding of
unknown specific errors within a known category.  However, in practice,
it was very easy to misuse the error categories as if they were particular
errors.  This commit removes the error category values, to make that error
impossible.

(If partial decoding of unknown specific errors turns out to have been a
valuable feature, then we can reintroduce it some other way.)

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-errors: Make every error encodable.

Until now, some values could not be encoded to send over OpenFlow, for a
few possible reasons.  This meant that, when one of these situations came
up, that a controller would not receive any notification that its request
failed.  This is not a good way to behave, so this commit changes the
error encoder so that, if a particular error cannot be encoded, it will
instead encode a fallback error code.

This commit also slightly simplifies ofconn_send_error() because it no
longer has to handle ofperr_encode_error() returning NULL.

Reported-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: Backport eth_mac_addr().

eth_mac_addr() has always been available on the kernels that we
support but the behavior has varied over time.  This provides a
backport that is equivalent to the current kernel, previous OVS
behavior, and the bridge.

Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath: Use eth_mac_addr() instead of duplicating it

bonus: if we ever are to use IFF_LIVE_ADDR_CHANGE for
anything further than to check availability in eth_mac_addr(),
Open vSwitch will be ready for that.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath: Avoid useless holes in struct vport

Having the 16bit port_no in between a set of pointers creates
an unwanted and useless hole in the struct.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Merge branch 'master' into bsd-port-threaded