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

odp-util: Extract vxlan gbp option encoding to a function.

Extract vxlan gbp option encoding to odp_encode_gbp_raw to be used in
following commits.

Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Gavin Li <gavinl@nvidia.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
This commit is contained in:
Gavin Li
2023-06-27 13:48:08 +03:00
committed by Eelco Chaudron
parent 8c3d5488da
commit 31baa7781e
2 changed files with 8 additions and 2 deletions

View File

@@ -382,6 +382,11 @@ static inline void odp_decode_gbp_raw(uint32_t gbp_raw,
*flags = (gbp_raw >> 16) & 0xFF;
}
static inline uint32_t odp_encode_gbp_raw(uint8_t flags, ovs_be16 id)
{
return (flags << 16) | ntohs(id);
}
struct attr_len_tbl {
int len;
const struct attr_len_tbl *next;