Lines Matching refs:ipsec
423 struct bond_ipsec *ipsec; in bond_ipsec_add_sa() local
447 ipsec = kmalloc(sizeof(*ipsec), GFP_ATOMIC); in bond_ipsec_add_sa()
448 if (!ipsec) { in bond_ipsec_add_sa()
456 ipsec->xs = xs; in bond_ipsec_add_sa()
457 INIT_LIST_HEAD(&ipsec->list); in bond_ipsec_add_sa()
459 list_add(&ipsec->list, &bond->ipsec_list); in bond_ipsec_add_sa()
462 kfree(ipsec); in bond_ipsec_add_sa()
471 struct bond_ipsec *ipsec; in bond_ipsec_add_sa_all() local
492 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_add_sa_all()
493 ipsec->xs->xso.real_dev = slave->dev; in bond_ipsec_add_sa_all()
494 if (slave->dev->xfrmdev_ops->xdo_dev_state_add(ipsec->xs)) { in bond_ipsec_add_sa_all()
496 ipsec->xs->xso.real_dev = NULL; in bond_ipsec_add_sa_all()
511 struct bond_ipsec *ipsec; in bond_ipsec_del_sa() local
540 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_del_sa()
541 if (ipsec->xs == xs) { in bond_ipsec_del_sa()
542 list_del(&ipsec->list); in bond_ipsec_del_sa()
543 kfree(ipsec); in bond_ipsec_del_sa()
554 struct bond_ipsec *ipsec; in bond_ipsec_del_sa_all() local
565 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_del_sa_all()
566 if (!ipsec->xs->xso.real_dev) in bond_ipsec_del_sa_all()
576 slave->dev->xfrmdev_ops->xdo_dev_state_delete(ipsec->xs); in bond_ipsec_del_sa_all()
578 ipsec->xs->xso.real_dev = NULL; in bond_ipsec_del_sa_all()