WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / ethernet / netronome / nfp / crypto / crypto.h
blobbffe58bb2f27f9e3344b4fa211e4fde053f821f8
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2 /* Copyright (C) 2019 Netronome Systems, Inc. */
4 #ifndef NFP_CRYPTO_H
5 #define NFP_CRYPTO_H 1
7 struct net_device;
8 struct nfp_net;
9 struct nfp_net_tls_resync_req;
11 struct nfp_net_tls_offload_ctx {
12 __be32 fw_handle[2];
14 u8 rx_end[0];
15 /* Tx only fields follow - Rx side does not have enough driver state
16 * to fit these
19 u32 next_seq;
22 #ifdef CONFIG_TLS_DEVICE
23 int nfp_net_tls_init(struct nfp_net *nn);
24 int nfp_net_tls_rx_resync_req(struct net_device *netdev,
25 struct nfp_net_tls_resync_req *req,
26 void *pkt, unsigned int pkt_len);
27 #else
28 static inline int nfp_net_tls_init(struct nfp_net *nn)
30 return 0;
33 static inline int
34 nfp_net_tls_rx_resync_req(struct net_device *netdev,
35 struct nfp_net_tls_resync_req *req,
36 void *pkt, unsigned int pkt_len)
38 return -EOPNOTSUPP;
40 #endif
42 #endif