On Tue, 6 Oct 2015 11:26:31 -0700, Pravin Shelar wrote: > I do not see need to drop and reallocate dst in this operation. I just > need to set source IP address and source and dst port in the metadata > dst already set in skb.
If I'm looking at the code correctly, metadata_dst is stored in the action and each skb gets only a reference to it. Modifying it would modify the shared metadata_dst (see execute_set_action). > This fill_metadata function is not called for every packet so > ndo_start_xmit() still needs to do route lookup. Yes. I meant that in those cases where the fill_metadata function was called, we may skip the lookup. Just an optimization and not an important one. I'm not even sure it can currently happen as the skb is cloned for each action. > egress_tun_info in dp_upcall_info is required to check for failure. It > would be only set on successful fill_metadata operation. Or you can just set dst to NULL on failure. Jiri -- Jiri Benc -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html