diff options
author | Vratko Polak <vrpolak@cisco.com> | 2024-09-03 16:37:49 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2024-09-03 16:37:49 +0200 |
commit | 2f76b57280e76220ed7cad244059aa4f624371f4 (patch) | |
tree | c06bcad5f4149c1d695f4f2ad692341943014ea4 /src/plugins/dev_iavf/virtchnl_funcs.h | |
parent | f0e81d247b7cd13b621262f29ed1ae6366b68b78 (diff) |
iavf: fully support off-by-one driver behavior
Previously, iavf_port_add_del_eth_addr was not using large enough buffer
and address sanitizer does not allow that.
Type: fix
Change-Id: Icd1491fb5651aed20685d15224e9c725347ef369
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'src/plugins/dev_iavf/virtchnl_funcs.h')
-rw-r--r-- | src/plugins/dev_iavf/virtchnl_funcs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/dev_iavf/virtchnl_funcs.h b/src/plugins/dev_iavf/virtchnl_funcs.h index e7f3901e0ee..0d4ab2835f4 100644 --- a/src/plugins/dev_iavf/virtchnl_funcs.h +++ b/src/plugins/dev_iavf/virtchnl_funcs.h @@ -9,6 +9,10 @@ #include <vnet/dev/dev.h> #include <dev_iavf/iavf.h> +/* The "+ 1" fakes a trailing element, but the driver requires that. + * Using this "wrong" macro is the easiest solution, as long as + * port.c uses buffer sized by the same macro as the functions here. + */ #define VIRTCHNL_MSG_SZ(s, e, n) STRUCT_OFFSET_OF (s, e[(n) + 1]) typedef struct |