On 03/20/2014 12:37 PM, Lori Jakab wrote:
+static int push_eth(struct sk_buff *skb, const struct
ovs_action_push_eth *ethh)
+{
+       int err;
+
+       skb_push(skb, ETH_HLEN);
+       skb_reset_mac_header(skb);
+
+       err = set_eth_addr(skb, &ethh->addresses);
+       if (unlikely(err))
+               return err;
I would just do the memcpy directly here. set_eth_addr() has a bunch
of extra things that make it not very efficient for what we are trying
to do. memcpy would also remove the error path.

OK.

Nitpick:
As we have ether_addr_copy() now we should use that as it optimizes
for inefficient unaligned accesses.

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to