Lines Matching refs:ipsec

17 	struct nsim_ipsec *ipsec = &ns->ipsec;  in nsim_dbg_netdev_ops_read()  local
26 bufsize = (ipsec->count * 4 * 60) + 60; in nsim_dbg_netdev_ops_read()
34 ipsec->count, ipsec->tx); in nsim_dbg_netdev_ops_read()
37 struct nsim_sa *sap = &ipsec->sa[i]; in nsim_dbg_netdev_ops_read()
68 static int nsim_ipsec_find_empty_idx(struct nsim_ipsec *ipsec) in nsim_ipsec_find_empty_idx() argument
72 if (ipsec->count == NSIM_IPSEC_MAX_SA_COUNT) in nsim_ipsec_find_empty_idx()
77 if (!ipsec->sa[i].used) in nsim_ipsec_find_empty_idx()
131 struct nsim_ipsec *ipsec; in nsim_ipsec_add_sa() local
140 ipsec = &ns->ipsec; in nsim_ipsec_add_sa()
158 ret = nsim_ipsec_find_empty_idx(ipsec); in nsim_ipsec_add_sa()
189 memcpy(&ipsec->sa[sa_idx], &sa, sizeof(sa)); in nsim_ipsec_add_sa()
195 ipsec->count++; in nsim_ipsec_add_sa()
203 struct nsim_ipsec *ipsec = &ns->ipsec; in nsim_ipsec_del_sa() local
207 if (!ipsec->sa[sa_idx].used) { in nsim_ipsec_del_sa()
213 memset(&ipsec->sa[sa_idx], 0, sizeof(struct nsim_sa)); in nsim_ipsec_del_sa()
214 ipsec->count--; in nsim_ipsec_del_sa()
220 struct nsim_ipsec *ipsec = &ns->ipsec; in nsim_ipsec_offload_ok() local
222 ipsec->ok++; in nsim_ipsec_offload_ok()
236 struct nsim_ipsec *ipsec = &ns->ipsec; in nsim_ipsec_tx() local
264 tsa = &ipsec->sa[sa_idx]; in nsim_ipsec_tx()
275 ipsec->tx++; in nsim_ipsec_tx()
291 ns->ipsec.pfile = debugfs_create_file("ipsec", 0400, in nsim_ipsec_init()
298 struct nsim_ipsec *ipsec = &ns->ipsec; in nsim_ipsec_teardown() local
300 if (ipsec->count) in nsim_ipsec_teardown()
302 ipsec->count); in nsim_ipsec_teardown()
303 debugfs_remove_recursive(ipsec->pfile); in nsim_ipsec_teardown()