[ovs-dev] [PATCHv3] Add support for LISP tunneling

Lori Jakab lojakab at cisco.com
Wed Feb 20 17:17:19 UTC 2013


On 02/20/13 18:26, Rajahalme, Jarno (NSN - FI/Espoo) wrote:
> 
> On Feb 20, 2013, at 11:00 , ext Lorand Jakab wrote:
> 
>> +static int lisp_tnl_send(struct vport *vport, struct sk_buff *skb)
>> +{
>> +	int network_offset = skb_network_offset(skb);
>> +
>> +	/* We only encapsulate IPv4 and IPv6 packets */
>> +	switch (skb->protocol) {
>> +	case htons(ETH_P_IP):
>> +	case htons(ETH_P_IPV6):
>> +		/* Pop off "inner" Ethernet header */
>> +		skb_pull(skb, network_offset);
>> +		return ovs_tnl_send(vport, skb) + network_offset;
> 
> Should return 0 if ovs_tnl_send() returns 0, like this:
> 
> 	int tnl_len = ovs_tnl_send(vport, skb);
> 
> 	/* Report the whole packet as sent, if anything was sent */
> 	return tnl_len > 0 ? tnl_len + network_offset : 0;

For some reason I thought I addressed your previous comment, but it
looks like I missed it.  Sorry about that, will fix.

-Lori

> 
>   Jarno
> 



More information about the dev mailing list