Thanks for the fix!

Applied to the master with appropriate additions to the AUTHORS file,

  Jarno

On Feb 2, 2015, at 3:11 PM, Traynor, Kevin <kevin.tray...@intel.com> wrote:

> This patch is for the issue reported here 
> http://openvswitch.org/pipermail/dev/2015-January/050368.html. It's tested 
> for TCP and UDP. It would have been slightly more efficient to replace the 
> miniflow_push_words() with miniflow_push_words_32() and remove the explicit 
> igmp_group_ipv4 padding, but it would make it less readable/consistent.
> 
> Thanks,
> Kevin.
> 
>> -----Original Message-----
>> From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Kevin Traynor
>> Sent: Monday, February 2, 2015 10:48 PM
>> To: dev@openvswitch.org
>> Subject: [ovs-dev] [PATCH] miniflow: Fix miniflow push of L4 port numbers.
>> 
>> Replace a 64 bit copy of L4 src/dst ports that was also
>> including additional packet params (e.g. TCP Seq Num). This
>> was later resulting in all packets from the flow missing in
>> the EMC.
>> 
>> Signed-off-by: Kevin Traynor <kevin.tray...@intel.com>
>> Reported-by: Ciara Loftus <ciara.lof...@intel.com>
>> ---
>> lib/flow.c |    9 ++++++---
>> 1 files changed, 6 insertions(+), 3 deletions(-)
>> 
>> diff --git a/lib/flow.c b/lib/flow.c
>> index 43bb003..b0cb71d 100644
>> --- a/lib/flow.c
>> +++ b/lib/flow.c
>> @@ -672,21 +672,24 @@ miniflow_extract(struct ofpbuf *packet, const struct 
>> pkt_metadata *md,
>>                 miniflow_push_be32(mf, arp_tha[2], 0);
>>                 miniflow_push_be32(mf, tcp_flags,
>>                                    TCP_FLAGS_BE32(tcp->tcp_ctl));
>> -                miniflow_push_words(mf, tp_src, &tcp->tcp_src, 1);
>> +                miniflow_push_be16(mf, tp_src, tcp->tcp_src);
>> +                miniflow_push_be16(mf, tp_dst, tcp->tcp_dst);
>>                 miniflow_pad_to_64(mf, igmp_group_ip4);
>>             }
>>         } else if (OVS_LIKELY(nw_proto == IPPROTO_UDP)) {
>>             if (OVS_LIKELY(size >= UDP_HEADER_LEN)) {
>>                 const struct udp_header *udp = data;
>> 
>> -                miniflow_push_words(mf, tp_src, &udp->udp_src, 1);
>> +                miniflow_push_be16(mf, tp_src, udp->udp_src);
>> +                miniflow_push_be16(mf, tp_dst, udp->udp_dst);
>>                 miniflow_pad_to_64(mf, igmp_group_ip4);
>>             }
>>         } else if (OVS_LIKELY(nw_proto == IPPROTO_SCTP)) {
>>             if (OVS_LIKELY(size >= SCTP_HEADER_LEN)) {
>>                 const struct sctp_header *sctp = data;
>> 
>> -                miniflow_push_words(mf, tp_src, &sctp->sctp_src, 1);
>> +                miniflow_push_be16(mf, tp_src, sctp->sctp_src);
>> +                miniflow_push_be16(mf, tp_dst, sctp->sctp_dst);
>>                 miniflow_pad_to_64(mf, igmp_group_ip4);
>>             }
>>         } else if (OVS_LIKELY(nw_proto == IPPROTO_ICMP)) {
>> --
>> 1.7.4.1
>> 
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev

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

Reply via email to