Use skb_sec_path and secpath_exists helpers where possible.
This reduces noise in followup patch that removes skb->sp pointer.
v2: no changes, preseve acks from v1.
Acked-by: Shannon Nelson <shannon.lee.nelson@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
        struct ixgbe_adapter *adapter = netdev_priv(tx_ring->netdev);
        struct ixgbe_ipsec *ipsec = adapter->ipsec;
        struct xfrm_state *xs;
+       struct sec_path *sp;
        struct tx_sa *tsa;
 
-       if (unlikely(!first->skb->sp->len)) {
+       sp = skb_sec_path(first->skb);
+       if (unlikely(!sp->len)) {
                netdev_err(tx_ring->netdev, "%s: no xfrm state len = %d\n",
-                          __func__, first->skb->sp->len);
+                          __func__, sp->len);
                return 0;
        }
 
 
 #endif /* IXGBE_FCOE */
 
 #ifdef CONFIG_IXGBE_IPSEC
-       if (skb->sp && !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
+       if (secpath_exists(skb) &&
+           !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))
                goto out_drop;
 #endif
        tso = ixgbe_tso(tx_ring, first, &hdr_len, &ipsec_tx);
         */
        if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID)) {
 #ifdef CONFIG_IXGBE_IPSEC
-               if (!skb->sp)
+               if (!secpath_exists(skb))
 #endif
                        features &= ~NETIF_F_TSO;
        }
 
        struct ixgbevf_adapter *adapter = netdev_priv(tx_ring->netdev);
        struct ixgbevf_ipsec *ipsec = adapter->ipsec;
        struct xfrm_state *xs;
+       struct sec_path *sp;
        struct tx_sa *tsa;
        u16 sa_idx;
 
-       if (unlikely(!first->skb->sp->len)) {
+       sp = skb_sec_path(first->skb);
+       if (unlikely(!sp->len)) {
                netdev_err(tx_ring->netdev, "%s: no xfrm state len = %d\n",
-                          __func__, first->skb->sp->len);
+                          __func__, sp->len);
                return 0;
        }
 
 
        first->protocol = vlan_get_protocol(skb);
 
 #ifdef CONFIG_IXGBEVF_IPSEC
-       if (skb->sp && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
+       if (secpath_exists(skb) && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))
                goto out_drop;
 #endif
        tso = ixgbevf_tso(tx_ring, first, &hdr_len, &ipsec_tx);