diff options
| author | David S. Miller <davem@davemloft.net> | 2017-03-22 21:28:35 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-03-22 21:28:35 +0300 |
| commit | b2a1674aa145c1730acde73f9399539cfd987e90 (patch) | |
| tree | 2e09db106404e4406ccdca2299b7206a60b6c975 /include/uapi/linux | |
| parent | 29dd5ec094e5ec469d220ef85d4a47ada10e9b4e (diff) | |
| parent | bef7f7567a104a0b4dba5f51b8c12ce28947144b (diff) | |
| download | linux-b2a1674aa145c1730acde73f9399539cfd987e90.tar.xz | |
Merge branch 'ovs-sample-action-optimization'
Andy Zhou says:
====================
net-next sample action optimization v4
The sample action can be used for translating Openflow 'clone' action.
However its implementation has not been sufficiently optimized for this
use case. This series attempts to close the gap.
Patch 3 commit message has more details on the specific optimizations
implemented.
---
v3->v4: Enhance patch 4.
Fix two bugs pointed out by Pravin,
Remove 'is_sample' variable.
v2->v3: Enhance patch 4, Rafctor to move more common logic to clone_execute().
v1->v2: Address Pravin's comment, Refactor recirc and sample
to share more common code
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/openvswitch.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 7f41f7d0000f..66d1c3ccfd8e 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h @@ -578,10 +578,25 @@ enum ovs_sample_attr { OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */ OVS_SAMPLE_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ __OVS_SAMPLE_ATTR_MAX, + +#ifdef __KERNEL__ + OVS_SAMPLE_ATTR_ARG /* struct sample_arg */ +#endif }; #define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1) +#ifdef __KERNEL__ +struct sample_arg { + bool exec; /* When true, actions in sample will not + * change flow keys. False otherwise. + */ + u32 probability; /* Same value as + * 'OVS_SAMPLE_ATTR_PROBABILITY'. + */ +}; +#endif + /** * enum ovs_userspace_attr - Attributes for %OVS_ACTION_ATTR_USERSPACE action. * @OVS_USERSPACE_ATTR_PID: u32 Netlink PID to which the %OVS_PACKET_CMD_ACTION |
