From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate.chelsio.com ([12.32.117.8]:35404 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754579AbeCSDXB (ORCPT ); Sun, 18 Mar 2018 23:23:01 -0400 Subject: Re: [PATCH v11 crypto 06/12] crypto: chtls - structure and macro for Inline TLS To: Sabrina Dubroca Cc: davejwatson@fb.com, davem@davemloft.net, herbert@gondor.apana.org.au, sbrivio@redhat.com, linux-crypto@vger.kernel.org, netdev@vger.kernel.org, ganeshgr@chelsio.com References: <1521214582-28838-1-git-send-email-atul.gupta@chelsio.com> <1521214661-28928-6-git-send-email-atul.gupta@chelsio.com> <20180318225337.GA19891@bistromath.localdomain> From: Atul Gupta Message-ID: Date: Mon, 19 Mar 2018 08:52:45 +0530 MIME-Version: 1.0 In-Reply-To: <20180318225337.GA19891@bistromath.localdomain> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 3/19/2018 4:23 AM, Sabrina Dubroca wrote: > 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? this is for conn in Inline mode once transitioned to HW, will re-check if can avoid this. Thanks > > >> +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. Yes, can avoid re-def. Thank you. >