2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 21:07:47 +00:00

16 Commits

Author SHA1 Message Date
Ben Pfaff
aad29cd1a1 packets: Add more utility functions for IPv4 and IPv6 addresses.
We had these functions scattered around the source tree anyway.  packets.h
is a good place to centralize them.

I do plan to introduce some additional callers.
2011-09-13 11:46:08 -07:00
Pravin Shelar
d9065a90b6 datapath: VLAN actions should use push/pop semantics
Currently the kernel vlan actions mirror those used by OpenFlow 1.0.
i.e. MODIFY and STRIP. More flexible approach is to have an action to
push a tag and pop a tag off, so that it can handle multiple levels of vlan
tags. Plus it aligns with newer version of OpenFlow.
        As this patch replaces MODIFY with PUSH semantic, action
mapping done in userpace is fixed accordingly.
        GSO handling for multiple levels of vlan tags is also added as
Jesse suggested before.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2011-09-09 18:13:26 -07:00
Ethan Jackson
81aee5f901 lacp: Move LACP packet data to lacp header file. 2011-04-19 13:49:35 -07:00
Ben Pfaff
eda1f38d41 packets: Reserve headroom for VLAN header in eth_compose(), snap_compose().
This allows callers to add a VLAN header to the composed packet and send
it out on a VLAN without copying the whole payload.
2011-04-01 15:52:19 -07:00
Ben Pfaff
7c66b273a2 packets: New function eth_set_vlan_tci(), from dpif-netdev.
This will soon be used in the upcoming bond library.
2011-04-01 15:52:19 -07:00
Ben Pfaff
2c5f293cc8 packets: Fix potential use-after-free in compose_benign_packet().
The second call to ofpbuf_put_zeros() could cause the 'eth' pointer to
be invalidated.

It appears that this does not fix a real bug because the existing callers
all preallocate 128 bytes of tailroom, but the interface doesn't document
that requirement.
2011-04-01 15:52:19 -07:00
Ben Pfaff
5de1bb5cc9 packets: New function snap_compose(); rename compose_packet() for consistency.
The following commit will introduce the first use of snap_compose().
2011-04-01 15:52:19 -07:00
Ethan Jackson
40f78b38e7 packets: Create new compose_packet() function.
This commit generalizes compose_lacp_packet() into new
compose_packet() function.  This new function will be used to send
CCM messages in future patches.
2011-03-23 13:16:38 -07:00
Ethan Jackson
07a6cf771d packets: create new compose_lacp_pdu() function.
Creates new compose_lacp_pdu() from the old compose_lacp_packet()
function.  This will allow a LACP PDU to be created without
necessarily knowing the Ethernet Source Address required for
generating the packet.  Future patches rely on this functionality.
2011-03-17 12:49:34 -07:00
Ethan Jackson
8834f25e99 vswitchd: Tweak LACP values.
Hardware sets the default LACP partner information to 0 so this
commit follows.  The collector delay is a more interesting
case.  Hardware sets it to 32768 and Linux sets it to 0.  The
collector delay relates to a part of the LACP protocol which we
don't implement so we follow Linux in this case.
2011-02-07 11:27:51 -08:00
Ethan Jackson
c25c91fd5e vswitchd: Implement Link Aggregation Control Protocol.
This commit implements LACP, a protocol which allows directly
connected switches to automatically negotiate which links may
participate in bonds.  This commit disables LACP by default.  Once
sufficiently tested, LACP will be enabled in "active" mode on
bonded ports, and "passive" mode on all others.

Bug #4213.
2011-02-03 12:26:58 -08:00
Justin Pettit
d31f1109f1 nicira-ext: Support matching IPv6 traffic.
Provides ability to match over IPv6 traffic in the same manner as IPv4.
Currently, the matching fields include:

    - IPv6 source and destination addresses (ipv6_src and ipv6_dst)
    - Traffic Class (nw_tos)
    - Next Header (nw_proto)
    - ICMPv6 Type and Code (icmp_type and icmp_code)
    - TCP and UDP Ports over IPv6 (tp_src and tp_dst)

When defining IPv6 rules, the Nicira Extensible Match (NXM) extension to
OVS must be used.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2011-02-02 12:53:26 -08:00
Ben Pfaff
093ca5b366 Fix bug in parsing large datapath IDs.
Datapath IDs are unsigned, but dpid_from_string() was parsing them as
signed integers, which caused high values to be capped at INT64_MAX.

Also, document that datapath IDs may not be all-zero.

Reported-by: Pankaj Thakkar <thakkar@nicira.com>
Reported-by: Teemu Koponen <koponen@nicira.com>
2010-10-21 10:40:20 -07:00
Justin Pettit
b123cc3ce4 ofproto: Use 64-bit datapath id and management id (OpenFlow 0.9)
The length of a datapath was changed from 48 bits to 64 bits in OpenFlow
0.9.  For parity, we increased the management id size to match.

NOTE: This is the final commit in the OpenFlow 0.9 set.  Starting with
this commit, OVS is OpenFlow 0.9-compliant.
2010-02-20 02:22:27 -08:00
Ben Pfaff
7634353824 vswitchd: Initial conversion to database-based configuration.
This has seen very little testing, so some features are almost certainly
busted.  Port mirroring is not yet converted, so it will definitely not
work.
2009-12-03 11:28:40 -08:00
Ben Pfaff
b9e8b45a39 Factor out code for composing benign packets.
The bonding code in vswitch sends out gratuitous learning packets that
are supposed to teach switches but not cause anything else to happen on
the network.  Some upcoming code wants to synthesize packets with similar
properties, so factor this code into a new function so that it can be
used in both places.
2009-09-16 15:12:27 -07:00