[PATCH 11/16] gtp: Split TID handling got GTPv0 and GTPv1

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Pablo Neira Ayuso pablo at soleta.eu
Mon Nov 16 17:53:45 UTC 2015


On Mon, Nov 16, 2015 at 04:06:52PM +0100, Andreas Schultz wrote:
> GTPv1 tunnel use a separate TEI for each direction. Add a union
> to hold TID for v0 and v1 separately.
> 
> Signed-off-by: Andreas Schultz <aschultz at tpip.net>
> ---
>  gtp.c    | 211 +++++++++++++++++++++++++++++++++++----------------------------
>  gtp_nl.h |   2 +
>  2 files changed, 118 insertions(+), 95 deletions(-)
> 
> diff --git a/gtp.c b/gtp.c
> index 2ac6431..a4be31d 100644
> --- a/gtp.c
> +++ b/gtp.c
> @@ -39,7 +39,17 @@ struct pdp_ctx {
>  	struct hlist_node hlist_tid;
>  	struct hlist_node hlist_addr;
>  
> -	u64 tid;
> +	union {
> +		uint64_t tid;
> +		struct {
> +			uint64_t tid;
> +			u16 flow;
> +		} v0 __attribute__((__packed__));

We're not sending this through network, so this packed attribute makes
no sense to me.



More information about the OpenBSC mailing list