On Wed, Jan 21, 2015 at 12:25 AM, <[email protected]> wrote: > From: Balasubramanian Manoharan <[email protected]> > > Fixes the error in vlan qos calculation due to missing convertion of > odp_be_to_cpu_16() > > Signed-off-by: Balasubramanian Manoharan <[email protected]> >
Reviewed-by: Bill Fischofer <[email protected]> > --- > platform/linux-generic/odp_classification.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/platform/linux-generic/odp_classification.c > b/platform/linux-generic/odp_classification.c > index 7d09cce..f6d482d 100644 > --- a/platform/linux-generic/odp_classification.c > +++ b/platform/linux-generic/odp_classification.c > @@ -881,7 +881,6 @@ cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, uint8_t > *pkt_addr, > cos_t *match_qos_l2_cos(pmr_l2_cos_t *l2_cos, uint8_t *pkt_addr, > odp_packet_hdr_t *hdr) > { > - uint8_t qos; > cos_t *cos = NULL; > odph_ethhdr_t *eth; > odph_vlanhdr_t *vlan; > @@ -890,7 +889,8 @@ cos_t *match_qos_l2_cos(pmr_l2_cos_t *l2_cos, uint8_t > *pkt_addr, > hdr->input_flags.eth) { > eth = (odph_ethhdr_t *)(pkt_addr + hdr->l2_offset); > vlan = (odph_vlanhdr_t *)(ð->type); > - qos = ((vlan->tci >> 13) & 0xFF); > + uint16_t qos = odp_be_to_cpu_16(vlan->tci); > + qos = ((qos >> 13) & 0x07); > cos = l2_cos->cos[qos]; > } > return cos; > -- > 2.0.1.472.g6f92e5f > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
