Re: [PATCH v11 crypto 06/12] crypto: chtls - structure and macro for Inline TLS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-03-16, 21:07:35 +0530, Atul Gupta wrote:
[...]
> +#define SOCK_INLINE (31)
[...]

> +static inline int csk_flag(const struct sock *sk, enum csk_flags flag)
> +{
> +	struct chtls_sock *csk = rcu_dereference_sk_user_data(sk);
> +
> +	if (!sock_flag(sk, SOCK_INLINE))
> +		return 0;
> +	return test_bit(flag, &csk->flags);
> +}

Should drivers really start defining their own socket flags?


> +static inline void set_queue(struct sk_buff *skb,
> +			     unsigned int queue, const struct sock *sk)
> +{
> +	skb->queue_mapping = queue;
> +}

That's skb_set_queue_mapping(), no need to define your own.

-- 
Sabrina



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux