On Mon, Mar 30, 2015 at 03:46:27PM -0700, Alex Wang wrote:
> For conducting Header Space Analysis (HSA), we convert the wildcarded
> OpenFlow flow represented by 'struct match' into an encoded byte array.
> To further save memory, we use a sparse array to represent such byte
> array in the same way as 'struct miniflow'.  So, this commit implements
> the structs and functions for conversion between sparse array and
> 'struct match'.
> 
> This commit also implements the set operations (e.g. intersect, union,
> complementation and difference) as functions.
> 
> Signed-off-by: Alex Wang <al...@nicira.com>

"sparse" gives some warnings:

../tests/test-hsa-match.c:41:23: warning: constant 0xFFFFFFFF5556595A is so big 
it is unsigned long long
../tests/test-hsa-match.c:42:23: warning: constant 0x5555555555555556 is so big 
it is long long
../tests/test-hsa-match.c:129:38: warning: constant 0xABCD000000000000 is so 
big it is unsigned long long
../tests/test-hsa-match.c:129:58: warning: constant 0xFFFF000000000000 is so 
big it is unsigned long long
../tests/test-hsa-match.c:139:23: warning: constant 0xFFFFFFFF5556595A is so 
big it is unsigned long long
../tests/test-hsa-match.c:140:23: warning: constant 0x999AA5A6FFFFFFFF is so 
big it is unsigned long long
../tests/test-hsa-match.c:141:23: warning: constant 0x5555555555555556 is so 
big it is long long
../tests/test-hsa-match.c:142:23: warning: constant 0x5555555555555555 is so 
big it is long long
../tests/test-hsa-match.c:34:37: warning: incorrect type in argument 2 
(different base types)
../tests/test-hsa-match.c:34:37:    expected restricted ovs_be64 [usertype] 
tun_id
../tests/test-hsa-match.c:34:37:    got int
../tests/test-hsa-match.c:34:45: warning: incorrect type in argument 3 
(different base types)
../tests/test-hsa-match.c:34:45:    expected restricted ovs_be64 [usertype] mask
../tests/test-hsa-match.c:34:45:    got int
../tests/test-hsa-match.c:71:46: warning: incorrect type in argument 2 
(different base types)
../tests/test-hsa-match.c:71:46:    expected restricted ovs_be64 [usertype] 
tun_id
../tests/test-hsa-match.c:71:46:    got int
../tests/test-hsa-match.c:71:54: warning: incorrect type in argument 3 
(different base types)
../tests/test-hsa-match.c:71:54:    expected restricted ovs_be64 [usertype] mask
../tests/test-hsa-match.c:71:54:    got int
../tests/test-hsa-match.c:74:44: warning: incorrect type in argument 2 
(different base types)
../tests/test-hsa-match.c:74:44:    expected restricted ovs_be64 [usertype] 
tun_id
../tests/test-hsa-match.c:74:44:    got int
../tests/test-hsa-match.c:74:52: warning: incorrect type in argument 3 
(different base types)
../tests/test-hsa-match.c:74:52:    expected restricted ovs_be64 [usertype] mask
../tests/test-hsa-match.c:74:52:    got int
../tests/test-hsa-match.c:124:38: warning: incorrect type in argument 2 
(different base types)
../tests/test-hsa-match.c:124:38:    expected restricted ovs_be64 [usertype] 
tun_id
../tests/test-hsa-match.c:124:38:    got int
../tests/test-hsa-match.c:124:46: warning: incorrect type in argument 3 
(different base types)
../tests/test-hsa-match.c:124:46:    expected restricted ovs_be64 [usertype] 
mask
../tests/test-hsa-match.c:124:46:    got int
../tests/test-hsa-match.c:129:38: warning: incorrect type in argument 2 
(different base types)
../tests/test-hsa-match.c:129:38:    expected restricted ovs_be64 [usertype] 
tun_id
../tests/test-hsa-match.c:129:38:    got unsigned long long
../tests/test-hsa-match.c:129:58: warning: incorrect type in argument 3 
(different base types)
../tests/test-hsa-match.c:129:58:    expected restricted ovs_be64 [usertype] 
mask
../tests/test-hsa-match.c:129:58:    got unsigned long long

I think that several of these new hsa-match functions could be more
efficient, but I don't know which ones are heavily used.  Do you know
which ones are important for performance?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to