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)
130 struct nsim_ipsec *ipsec;
139 ipsec = &ns->ipsec;
142 netdev_err(dev, "Unsupported protocol 0x%04x for ipsec offload\n",
153 ret = nsim_ipsec_find_empty_idx(ipsec);
184 memcpy(&ipsec->sa[sa_idx], &sa, sizeof(sa));
190 ipsec->count++;
198 struct nsim_ipsec *ipsec = &ns->ipsec;
202 if (!ipsec->sa[sa_idx].used) {
208 memset(&ipsec->sa[sa_idx], 0, sizeof(struct nsim_sa));
209 ipsec->count--;
215 struct nsim_ipsec *ipsec = &ns->ipsec;
217 ipsec->ok++;
231 struct nsim_ipsec *ipsec = &ns->ipsec;
259 tsa = &ipsec->sa[sa_idx];
270 ipsec->tx++;
286 ns->ipsec.pfile = debugfs_create_file("ipsec", 0400,
293 struct nsim_ipsec *ipsec = &ns->ipsec;
295 if (ipsec->count)
297 ipsec->count);
298 debugfs_remove_recursive(ipsec->pfile);