ofproto-dpif: Hide rule_calculate_tag().

No one uses it except ofproto-dpif.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif-xlate: Unmask mark when used for tunnels.

The tunnel lookup uses the skb_mark as part of the port find process
but it isn't unmasked along with the other fields. This adds it to
the list of significant fields.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
datapath: Introduce is_mask when serializing netlink attributes.

The intention is clearer than if we rederive it in every location.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
odp-util: Always serialize tunnel mask attributes.

A tunnel value attribute is not allowed to have an empty IP destination
address but this is legal for masks. This drops both the checks for
serializing masks and also the sanity checks on them.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
dpif-linux: Fix theoretical memory leak on error path.

If a notification is bigger than 4 kB (I doubt it one would be), then the
lack of ofpbuf_uninit() would cause a memory leak.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev-linux: Fix fd leak on error path.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev-linux: Initialize change_seq for tap devices too.

change_seq is supposed to always be nonzero but tap devices got this wrong.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev-dummy: Fix memory leak on error path in netdev_rx_dummy_recv().

This code failed to free the packet if it was too big for the caller.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev-linux: Don't assume 'struct netdev' has offset 0.

The data items returned by netdev_get_devices() are "struct netdev *"s.
The code fixed up by this commit used them as "struct netdev_linux *",
which happens to work because struct netdev happens to be at offset 0 in
each struct but it's better to do a proper cast in case someday
struct netdev gets moved to a nonzero offset.

Signed-off-by: Ben Pfaff <blp@nicira.com>
netdev: Minor formatting improvements.

Signed-off-by: Ben Pfaff <blp@nicira.com>