> > With a glance at __ovs_nla_copy_actions(), this is also true for
> > OVS_ACTION_ATTR_PUSH_ETH.
>
> Right, sorry. I completely forgot about the special netlink handling of
> ovs.
Thank you for your comments! I'm going to remove the eth_type from struct
ovs_action_push_eth, then set eth_type of a packet based on its packet_type
when pushing ethernet header in lib/packets.c as it was suggested by Yi.
/* Push Ethernet header onto 'packet' assuming it is layer 3 */
void
push_eth(struct dp_packet *packet, const struct eth_addr *dst,
- const struct eth_addr *src, ovs_be16 type)
+ const struct eth_addr *src)
{
struct eth_header *eh;
ovs_assert(packet->packet_type != htonl(PT_ETH));
eh = dp_packet_resize_l2(packet, ETH_HEADER_LEN);
eh->eth_dst = *dst;
eh->eth_src = *src;
- eh->eth_type = type;
+ eh->eth_type = pt_ns_type_be(packet->packet_type);
packet->packet_type = htonl(PT_ETH);
}
Ben, will you continue reviewing v4 or should I send out v5 with this
correction?
Best regards,
Zoltan
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev