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