Thanks for review, I pushed patches #1-3 to master. I plan to send the datapath changes to net-next this afternoon.
On 2 December 2014 at 13:48, Pravin Shelar <pshe...@nicira.com> wrote: > On Tue, Nov 25, 2014 at 5:07 PM, Joe Stringer <joestrin...@nicira.com> wrote: >> An upcoming set of patches will implement support for indexing flows by >> Unique Flow IDentifiers (UFID) rather than the traditional unmasked key. >> This patch implements the interface changes required. The implementation >> will follow. >> >> Signed-off-by: Joe Stringer <joestrin...@nicira.com> >> CC: Pravin B Shelar <pshe...@nicira.com> > > Acked-by: Pravin B Shelar <pshe...@nicira.com> >> --- >> v11: Split from "datapath: Add support for unique flow identifiers." >> --- >> datapath/README.md | 13 +++++++++++++ >> datapath/linux/compat/include/linux/openvswitch.h | 19 +++++++++++++++++++ >> 2 files changed, 32 insertions(+) >> >> diff --git a/datapath/README.md b/datapath/README.md >> index a8effa3..9c03a2b 100644 >> --- a/datapath/README.md >> +++ b/datapath/README.md >> @@ -131,6 +131,19 @@ performs best-effort detection of overlapping >> wildcarded flows and may reject >> some but not all of them. However, this behavior may change in future >> versions. >> >> >> +Unique flow identifiers >> +----------------------- >> + >> +An alternative to using the original match portion of a key as the handle >> for >> +flow identification is a unique flow identifier, or "UFID". UFIDs are >> optional >> +for both the kernel and user space program. >> + >> +User space programs that support UFID are expected to provide it during flow >> +setup in addition to the flow, then refer to the flow using the UFID for all >> +future operations. The kernel is not required to index flows by the original >> +flow key if a UFID is specified. >> + >> + >> Basic rule for evolving flow keys >> --------------------------------- >> >> diff --git a/datapath/linux/compat/include/linux/openvswitch.h >> b/datapath/linux/compat/include/linux/openvswitch.h >> index c8fa66e..67715f8 100644 >> --- a/datapath/linux/compat/include/linux/openvswitch.h >> +++ b/datapath/linux/compat/include/linux/openvswitch.h >> @@ -471,6 +471,13 @@ struct ovs_key_nd { >> * a wildcarded match. Omitting attribute is treated as wildcarding all >> * corresponding fields. Optional for all requests. If not present, >> * all flow key bits are exact match bits. >> + * @OVS_FLOW_ATTR_UFID: A unique identifier for the flow. Causes the flow to >> + * be indexed by this value rather than the %OVS_FLOW_ATTR_KEY%. Optional >> + * for all requests. Present in notifications if the flow was created with a >> + * UFID. >> + * @OVS_FLOW_ATTR_UFID_FLAGS: A 32-bit value of OR'd OVS_UFID_F_* flags that >> + * provide alternative semantics for flow installation and retrieval. >> Optional >> + * for all requests. >> * >> * These attributes follow the &struct ovs_header within the Generic Netlink >> * payload for %OVS_FLOW_* commands. >> @@ -486,12 +493,24 @@ enum ovs_flow_attr { >> OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ >> OVS_FLOW_ATTR_PROBE, /* Flow operation is a feature probe, error >> * logging should be suppressed. */ >> + OVS_FLOW_ATTR_UFID, /* Variable length unique flow identifier. >> */ >> + OVS_FLOW_ATTR_UFID_FLAGS,/* u32 of OVS_UFID_F_*. */ >> __OVS_FLOW_ATTR_MAX >> }; >> >> #define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1) >> >> /** >> + * Omit attributes for notifications. >> + * >> + * If a datapath request contains an OVS_UFID_F_OMIT_* flag, then the >> datapath >> + * may omit the corresponding 'ovs_flow_attr' from the response. >> + */ >> +#define OVS_UFID_F_OMIT_KEY (1 << 0) >> +#define OVS_UFID_F_OMIT_MASK (1 << 1) >> +#define OVS_UFID_F_OMIT_ACTIONS (1 << 2) >> + >> +/** >> * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action. >> * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with >> * @OVS_ACTION_ATTR_SAMPLE. A value of 0 samples no packets, a value of >> -- >> 1.7.10.4 >> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev