On Thu, 10 Nov 2016 11:21:19 -0800, Pravin Shelar wrote: > One additional variable is not bad but look at what has happened in > vxlan_xmit_one(). There are already more than 20 variables defined. It > is hard to read code in this case.
I agree that the function is horrible. What I was thinking about was separating the vxlan data and control plane. The vxlan data plane would perform encapsulation and decapsulation based on lwtunnel infrastructure and the rest of the "classical" vxlan would be just one of the users of that. Basically replacing vxlan_rdst by ip_tunnel_info, among other things. That would make the vxlan code much much cleaner. > anyways I can add another variable to the function. I do not feel that > strongly about this. Me neither, actually. I prefer another variable but I won't oppose the patchset just based on that if you choose differently. Thanks, Jiri