[ovs-dev] [PATCH v2 3/3] datapath: add layer 3 flow/port support
Thomas Graf
tgraf at redhat.com
Fri Apr 11 08:40:40 UTC 2014
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, ðh->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.
More information about the dev
mailing list