Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 815f4e57 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[IPSEC]: Make xfrm_lookup flags argument a bit-field



This patch introduces an enum for bits in the flags argument of xfrm_lookup.
This is so that we can cram more information into it later.

Since all current users use just the values 0 and 1, XFRM_LOOKUP_WAIT has
been added with the value 1 << 0 to represent the current meaning of flags.

The test in __xfrm_lookup has been changed accordingly.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f71c81a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -265,6 +265,11 @@ static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)

extern void		dst_init(void);

/* Flags for xfrm_lookup flags argument. */
enum {
	XFRM_LOOKUP_WAIT = 1 << 0,
};

struct flowi;
#ifndef CONFIG_XFRM
static inline int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
+1 −1
Original line number Diff line number Diff line
@@ -1565,7 +1565,7 @@ restart:
				xfrm_pol_put(policy);
				return -EREMOTE;
			}
			if (err == -EAGAIN && flags) {
			if (err == -EAGAIN && (flags & XFRM_LOOKUP_WAIT)) {
				DECLARE_WAITQUEUE(wait, current);

				add_wait_queue(&km_waitq, &wait);