Lines Matching refs:sa_idx
134 u16 sa_idx; in nsim_ipsec_add_sa() local
158 sa_idx = (u16)ret; in nsim_ipsec_add_sa()
184 memcpy(&ipsec->sa[sa_idx], &sa, sizeof(sa)); in nsim_ipsec_add_sa()
189 xs->xso.offload_handle = sa_idx | NSIM_IPSEC_VALID; in nsim_ipsec_add_sa()
199 u16 sa_idx; in nsim_ipsec_del_sa() local
201 sa_idx = xs->xso.offload_handle & ~NSIM_IPSEC_VALID; in nsim_ipsec_del_sa()
202 if (!ipsec->sa[sa_idx].used) { in nsim_ipsec_del_sa()
204 sa_idx); in nsim_ipsec_del_sa()
208 memset(&ipsec->sa[sa_idx], 0, sizeof(struct nsim_sa)); in nsim_ipsec_del_sa()
234 u32 sa_idx; in nsim_ipsec_tx() local
252 sa_idx = xs->xso.offload_handle & ~NSIM_IPSEC_VALID; in nsim_ipsec_tx()
253 if (unlikely(sa_idx >= NSIM_IPSEC_MAX_SA_COUNT)) { in nsim_ipsec_tx()
255 sa_idx, NSIM_IPSEC_MAX_SA_COUNT); in nsim_ipsec_tx()
259 tsa = &ipsec->sa[sa_idx]; in nsim_ipsec_tx()
261 netdev_err(ns->netdev, "unused sa_idx=%d\n", sa_idx); in nsim_ipsec_tx()