Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1212610

[PATCHv5 net-next 04/10] dst: Add __skb_dst_copy() variation

From Joe Stringer <joestringer@nicira.com>
Newsgroups linux.kernel
Subject [PATCHv5 net-next 04/10] dst: Add __skb_dst_copy() variation
Date 2015-08-25 02:40 +0200
Message-ID <q1aro-7k8-31@gated-at.bofh.it> (permalink)
References <q1arn-7k8-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This variation on skb_dst_copy() doesn't require two skbs.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
---
v4: Add ack.
v5: No change.
---
 include/net/dst.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/net/dst.h b/include/net/dst.h
index 0a9a723..6f282e7 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -286,13 +286,18 @@ static inline void skb_dst_drop(struct sk_buff *skb)
 	}
 }
 
-static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb)
+static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst)
 {
-	nskb->_skb_refdst = oskb->_skb_refdst;
+	nskb->_skb_refdst = refdst;
 	if (!(nskb->_skb_refdst & SKB_DST_NOREF))
 		dst_clone(skb_dst(nskb));
 }
 
+static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb)
+{
+	__skb_dst_copy(nskb, oskb->_skb_refdst);
+}
+
 /**
  * skb_dst_force - makes sure skb dst is refcounted
  * @skb: buffer
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv5 net-next 00/10] OVS conntrack support Joe Stringer <joestringer@nicira.com> - 2015-08-25 02:40 +0200
  [PATCHv5 net-next 06/10] openvswitch: Allow matching on conntrack mark Joe Stringer <joestringer@nicira.com> - 2015-08-25 02:40 +0200
    Re: [PATCHv5 net-next 06/10] openvswitch: Allow matching on conntrack mark Pravin Shelar <pshelar@nicira.com> - 2015-08-25 22:40 +0200
  [PATCHv5 net-next 02/10] openvswitch: Move MASKED* macros to datapath.h Joe Stringer <joestringer@nicira.com> - 2015-08-25 02:40 +0200
  [PATCHv5 net-next 10/10] openvswitch: Allow attaching helpers to ct action Joe Stringer <joestringer@nicira.com> - 2015-08-25 02:40 +0200
    Re: [PATCHv5 net-next 10/10] openvswitch: Allow attaching helpers to  ct action Thomas Graf <tgraf@suug.ch> - 2015-08-25 20:40 +0200
      Re: [PATCHv5 net-next 10/10] openvswitch: Allow attaching helpers to  ct action Joe Stringer <joestringer@nicira.com> - 2015-08-25 22:20 +0200
    Re: [PATCHv5 net-next 10/10] openvswitch: Allow attaching helpers to  ct action Pravin Shelar <pshelar@nicira.com> - 2015-08-25 22:50 +0200
  [PATCHv5 net-next 07/10] netfilter: Always export nf_connlabels_replace() Joe Stringer <joestringer@nicira.com> - 2015-08-25 02:40 +0200
  [PATCHv5 net-next 04/10] dst: Add __skb_dst_copy() variation Joe Stringer <joestringer@nicira.com> - 2015-08-25 02:40 +0200
  Re: [PATCHv5 net-next 05/10] openvswitch: Add conntrack action Thomas Graf <tgraf@suug.ch> - 2015-08-25 20:30 +0200
  Re: [PATCHv5 net-next 05/10] openvswitch: Add conntrack action Pravin Shelar <pshelar@nicira.com> - 2015-08-25 21:30 +0200

csiph-web