Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
0002 /* Copyright (C) 2019 Netronome Systems, Inc. */
0003 
0004 #ifndef NFP_CRYPTO_H
0005 #define NFP_CRYPTO_H 1
0006 
0007 struct net_device;
0008 struct nfp_net;
0009 struct nfp_net_tls_resync_req;
0010 
0011 struct nfp_net_tls_offload_ctx {
0012     __be32 fw_handle[2];
0013 
0014     u8 rx_end[0];
0015     /* Tx only fields follow - Rx side does not have enough driver state
0016      * to fit these
0017      */
0018 
0019     u32 next_seq;
0020 };
0021 
0022 #ifdef CONFIG_TLS_DEVICE
0023 int nfp_net_tls_init(struct nfp_net *nn);
0024 int nfp_net_tls_rx_resync_req(struct net_device *netdev,
0025                   struct nfp_net_tls_resync_req *req,
0026                   void *pkt, unsigned int pkt_len);
0027 #else
0028 static inline int nfp_net_tls_init(struct nfp_net *nn)
0029 {
0030     return 0;
0031 }
0032 
0033 static inline int
0034 nfp_net_tls_rx_resync_req(struct net_device *netdev,
0035               struct nfp_net_tls_resync_req *req,
0036               void *pkt, unsigned int pkt_len)
0037 {
0038     return -EOPNOTSUPP;
0039 }
0040 #endif
0041 
0042 #endif