On Thu, Nov 20, 2014 at 4:06 PM, Jarno Rajahalme <jrajaha...@nicira.com> wrote:
> On Nov 20, 2014, at 12:18 PM, Jesse Gross <je...@nicira.com> wrote:
>
> On Thu, Nov 20, 2014 at 10:35 AM, Jarno Rajahalme <jrajaha...@nicira.com>
> wrote:
>
> The netlink key for flow put is serialized from struct flow, so even in the
> case of L3 the ethertype would be serialized.
>
> Even the kernel datapath is encoding the ethertype in key_extract(), even
> when it is not in the packet:
>
> + /* Link layer. */
> + if (key->phy.is_layer3) {
> + key->eth.tci = 0;
> + key->eth.type = skb->protocol;
> + } else {
>
> So I guess you are not saying that the ethertype should not be serialized,
> due to it not being in the L3 packet?
>
>
> The EtherType is stored in the flow key for efficiency but it is
> actually not part of the serialized netlink representation currently.
>
>
> OK, I see patch 2/5 skipping past the line where dl_type is serialized in
> odp-util.c.
>
> This revision of the series introduces a patch to change the
> serialization from userspace for the purposes of packet execution but
> it is not done from the kernel or at all in previous revisions. I
> think it is important that userspace, kernel, and the data contained
> in the packet line up as closely as possible.
>
>
> So by encoding the whole key the datapath can detect the presence of
> OVS_KEY_ATTR_IPV4 or OVS_KEY_ATTR_IPV6 and use those to set the
> skb->protocol?

Yes, that's right.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to