From: Florian Westphal Date: Tue, 18 Dec 2018 16:15:23 +0000 (+0100) Subject: drivers: net: netdevsim: use skb_sec_path helper X-Git-Tag: v5.4-rc1~1957^2~42^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56d1ac3260dadfc66c81ef2689bd1a09b05731a2;p=platform%2Fkernel%2Flinux-rpi.git drivers: net: netdevsim: use skb_sec_path helper ... so this won't have to be changed when skb->sp goes away. v2: no changes, preserve ack. Acked-by: Shannon Nelson Signed-off-by: Florian Westphal Signed-off-by: David S. Miller --- diff --git a/drivers/net/netdevsim/ipsec.c b/drivers/net/netdevsim/ipsec.c index 2dcf6cc..76e11d8 100644 --- a/drivers/net/netdevsim/ipsec.c +++ b/drivers/net/netdevsim/ipsec.c @@ -227,18 +227,19 @@ static const struct xfrmdev_ops nsim_xfrmdev_ops = { bool nsim_ipsec_tx(struct netdevsim *ns, struct sk_buff *skb) { + struct sec_path *sp = skb_sec_path(skb); struct nsim_ipsec *ipsec = &ns->ipsec; struct xfrm_state *xs; struct nsim_sa *tsa; u32 sa_idx; /* do we even need to check this packet? */ - if (!skb->sp) + if (!sp) return true; - if (unlikely(!skb->sp->len)) { + if (unlikely(!sp->len)) { netdev_err(ns->netdev, "no xfrm state len = %d\n", - skb->sp->len); + sp->len); return false; }