Message ID | 8ff8206cc062f1755292b26a32421a66eeb17ce7.1575964218.git.martin.varghese@nokia.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | New openvswitch MPLS actions for layer 2 tunnelling | expand |
From: Martin Varghese <martinvarghesenokia@gmail.com> Date: Tue, 10 Dec 2019 13:45:52 +0530 > @@ -5472,12 +5472,15 @@ static void skb_mod_eth_type(struct sk_buff *skb, struct ethhdr *hdr, > } > > /** > - * skb_mpls_push() - push a new MPLS header after the mac header > + * skb_mpls_push() - push a new MPLS header after mac_len bytes from start of > + * the packet > * > * @skb: buffer > * @mpls_lse: MPLS label stack entry to push > * @mpls_proto: ethertype of the new MPLS header (expects 0x8847 or 0x8848) > * @mac_len: length of the MAC header > + * #ethernet: flag to indicate if the resulting packet after skb_mpls_push is > + * ethernet Why "#ethernet" and not "@ethernet" to refer to this argument?
Oops Typo, will fix it. thanks -----Original Message----- From: David Miller <davem@davemloft.net> Sent: Wednesday, December 11, 2019 7:14 AM To: martinvarghesenokia@gmail.com Cc: netdev@vger.kernel.org; pshelar@ovn.org; Drennan, Scott (Nokia - US/Mountain View) <scott.drennan@nokia.com>; jbenc@redhat.com; Varghese, Martin (Nokia - IN/Bangalore) <martin.varghese@nokia.com> Subject: Re: [PATCH net-next 1/3] net: skb_mpls_push() modified to allow MPLS header push at start of packet. From: Martin Varghese <martinvarghesenokia@gmail.com> Date: Tue, 10 Dec 2019 13:45:52 +0530 > @@ -5472,12 +5472,15 @@ static void skb_mod_eth_type(struct sk_buff > *skb, struct ethhdr *hdr, } > > /** > - * skb_mpls_push() - push a new MPLS header after the mac header > + * skb_mpls_push() - push a new MPLS header after mac_len bytes from start of > + * the packet > * > * @skb: buffer > * @mpls_lse: MPLS label stack entry to push > * @mpls_proto: ethertype of the new MPLS header (expects 0x8847 or 0x8848) > * @mac_len: length of the MAC header > + * #ethernet: flag to indicate if the resulting packet after skb_mpls_push is > + * ethernet Why "#ethernet" and not "@ethernet" to refer to this argument?
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 973a71f..7773176 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -5472,12 +5472,15 @@ static void skb_mod_eth_type(struct sk_buff *skb, struct ethhdr *hdr, } /** - * skb_mpls_push() - push a new MPLS header after the mac header + * skb_mpls_push() - push a new MPLS header after mac_len bytes from start of + * the packet * * @skb: buffer * @mpls_lse: MPLS label stack entry to push * @mpls_proto: ethertype of the new MPLS header (expects 0x8847 or 0x8848) * @mac_len: length of the MAC header + * #ethernet: flag to indicate if the resulting packet after skb_mpls_push is + * ethernet * * Expects skb->data at mac header. * @@ -5501,7 +5504,7 @@ int skb_mpls_push(struct sk_buff *skb, __be32 mpls_lse, __be16 mpls_proto, return err; if (!skb->inner_protocol) { - skb_set_inner_network_header(skb, mac_len); + skb_set_inner_network_header(skb, skb_network_offset(skb)); skb_set_inner_protocol(skb, skb->protocol); }