Lines Matching defs:ipsec
17 struct nsim_ipsec *ipsec = &ns->ipsec;
26 bufsize = (ipsec->count * 4 * 60) + 60;
34 ipsec->count, ipsec->tx);
37 struct nsim_sa *sap = &ipsec->sa[i];
68 static int nsim_ipsec_find_empty_idx(struct nsim_ipsec *ipsec)
72 if (ipsec->count == NSIM_IPSEC_MAX_SA_COUNT)
77 if (!ipsec->sa[i].used)
131 struct nsim_ipsec *ipsec;
140 ipsec = &ns->ipsec;
143 NL_SET_ERR_MSG_MOD(extack, "Unsupported protocol for ipsec offload");
153 NL_SET_ERR_MSG_MOD(extack, "Unsupported ipsec offload type");
158 ret = nsim_ipsec_find_empty_idx(ipsec);
189 memcpy(&ipsec->sa[sa_idx], &sa, sizeof(sa));
195 ipsec->count++;
203 struct nsim_ipsec *ipsec = &ns->ipsec;
207 if (!ipsec->sa[sa_idx].used) {
213 memset(&ipsec->sa[sa_idx], 0, sizeof(struct nsim_sa));
214 ipsec->count--;
220 struct nsim_ipsec *ipsec = &ns->ipsec;
222 ipsec->ok++;
236 struct nsim_ipsec *ipsec = &ns->ipsec;
264 tsa = &ipsec->sa[sa_idx];
275 ipsec->tx++;
291 ns->ipsec.pfile = debugfs_create_file("ipsec", 0400,
298 struct nsim_ipsec *ipsec = &ns->ipsec;
300 if (ipsec->count)
302 ipsec->count);
303 debugfs_remove_recursive(ipsec->pfile);