hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
/* Copyright (C) 2019 Netronome Systems, Inc. */
 
#ifndef NFP_CRYPTO_H
#define NFP_CRYPTO_H 1
 
struct net_device;
struct nfp_net;
struct nfp_net_tls_resync_req;
 
struct nfp_net_tls_offload_ctx {
   __be32 fw_handle[2];
 
   u8 rx_end[0];
   /* Tx only fields follow - Rx side does not have enough driver state
    * to fit these
    */
 
   u32 next_seq;
};
 
#ifdef CONFIG_TLS_DEVICE
int nfp_net_tls_init(struct nfp_net *nn);
int nfp_net_tls_rx_resync_req(struct net_device *netdev,
                 struct nfp_net_tls_resync_req *req,
                 void *pkt, unsigned int pkt_len);
#else
static inline int nfp_net_tls_init(struct nfp_net *nn)
{
   return 0;
}
 
static inline int
nfp_net_tls_rx_resync_req(struct net_device *netdev,
             struct nfp_net_tls_resync_req *req,
             void *pkt, unsigned int pkt_len)
{
   return -EOPNOTSUPP;
}
#endif
 
#endif