2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Introduce 128-bit xxregs.

These are needed to handle IPv6 addresses.

Signed-off-by: Justin Pettit <jpettit@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Justin Pettit
2015-10-31 04:45:28 -07:00
parent 847b8b027a
commit b23ada8eec
13 changed files with 184 additions and 6 deletions

View File

@@ -28,7 +28,7 @@
/* Number of Open vSwitch extension 32-bit registers. */
#define FLOW_N_REGS 16
BUILD_ASSERT_DECL(FLOW_N_REGS <= NXM_NX_MAX_REGS);
BUILD_ASSERT_DECL(FLOW_N_REGS % 2 == 0); /* Even. */
BUILD_ASSERT_DECL(FLOW_N_REGS % 4 == 0); /* Handle xxregs. */
/* Number of OpenFlow 1.5+ 64-bit registers.
*
@@ -36,6 +36,12 @@ BUILD_ASSERT_DECL(FLOW_N_REGS % 2 == 0); /* Even. */
* are half as many of them.*/
#define FLOW_N_XREGS (FLOW_N_REGS / 2)
/* Number of 128-bit registers.
*
* Each of these overlays four Open vSwitch 32-bit registers, so there
* are a quarter as many of them.*/
#define FLOW_N_XXREGS (FLOW_N_REGS / 4)
/* Used for struct flow's dl_type member for frames that have no Ethernet
* type, that is, pure 802.2 frames. */
#define FLOW_DL_TYPE_NONE 0x5ff
@@ -180,6 +186,8 @@ void flow_wildcards_set_reg_mask(struct flow_wildcards *,
int idx, uint32_t mask);
void flow_wildcards_set_xreg_mask(struct flow_wildcards *,
int idx, uint64_t mask);
void flow_wildcards_set_xxreg_mask(struct flow_wildcards *,
int idx, ovs_u128 mask);
void flow_wildcards_and(struct flow_wildcards *dst,
const struct flow_wildcards *src1,