Thread (4 messages) flat view 4 messages, 2 authors, 2014-06-19

Re: [PATCH V3 net-next] LISP: Locator/Identifier Separation Protocol

From: Christopher White <hidden>
Date: 2014-06-19 16:31:38

Hi Tom, 

Thanks again for the quick turnaround. Some responses and questions below…

On Jun 18, 2014, at 5:08 PM, Tom Herbert [off-list ref] wrote:
quoted
+       hash = skb_get_hash(skb);
+       if (!hash)
+               hash = jhash(skb->data, 2 * ETH_ALEN,
+                            (__force u32) skb->protocol);
+
This is probably okay for now, but we should really be smarter here.
Looks like another consumer of a TX hash in skbuf (Eric was looking to
add that I believe).
Ok.
quoted
check = CSUM_MANGLED_0;
+               }
+
+               skb->protocol = protocol;
+       } while ((skb = skb->next));
+out:
+       return segs;
+}
+
Please split out generic changes into their own patches.
Will do.
quoted
+int udpv4_create_encap_sock(struct net *net, __be16 port, struct socket **psock,
+                           bool csum)
+{
+       struct sock *sk;
+       struct socket *sock;
+       struct sockaddr_in lisp_addr = {
+               .sin_family             = AF_INET,
+               .sin_addr.s_addr        = htonl(INADDR_ANY),
+               .sin_port               = port,
+       };
+       int rc;
+
Still some lisp artifacts.
Sorry, that got past me, will fix.
quoted
+       }
+
+       *psock = sock;
+       /* Disable multicast loopback */
+       inet_sk(sk)->mc_loop = 0;
+
+       if (!csum)
+               sock->sk->sk_no_check_tx = 1;
+       return 0;
+}
+EXPORT_SYMBOL(udpv4_create_encap_sock)
I was actually thinking this function could be even more general. The
L2TP_ENCAPTYPE_UDP case in l2tp_tunnel_sock_create looks like
something we might be able to abstract out into a separate function--
it would include IPv6 support and the possibility of binding to other
than INADDR_ANY and connected sockets. l2tp_tunnel_cfg could be the
basis of udp_port_cfg which contains addresses, ports, and sockopts
like sk_no_check_tx…
So I’m happy to do this, but I would like to do it in a separate submission. 
For one thing, I am not super familiar with that code and I’m a bit nervous 
about making substantive changes, thus it may take me some time. 
As it is orthogonal to the LISP submission, would it be possible to do this 
separately and have LISP move forward?

Thanks!
-Chris
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help