Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1230003 > unrolled thread
| Started by | Neil Armstrong <narmstrong@baylibre.com> |
|---|---|
| First post | 2015-09-22 11:30 +0200 |
| Last post | 2015-09-23 02:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] net: dsa: Fix Marvell Egress Trailer check Neil Armstrong <narmstrong@baylibre.com> - 2015-09-22 11:30 +0200
Re: [PATCH] net: dsa: Fix Marvell Egress Trailer check Guenter Roeck <linux@roeck-us.net> - 2015-09-22 17:20 +0200
Re: [PATCH] net: dsa: Fix Marvell Egress Trailer check David Miller <davem@davemloft.net> - 2015-09-23 02:40 +0200
| From | Neil Armstrong <narmstrong@baylibre.com> |
|---|---|
| Date | 2015-09-22 11:30 +0200 |
| Subject | [PATCH] net: dsa: Fix Marvell Egress Trailer check |
| Message-ID | <qbs3H-1ei-79@gated-at.bofh.it> |
The Marvell Egress rx trailer check must be fixed to correctly detect bad bits in the third byte of the Eggress trailer as described in the Table 28 of the 88E6060 datasheet. The current code incorrectly omits to check the third byte and checks the fourth byte twice. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- net/dsa/tag_trailer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index e268f9d..d0526a9 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c @@ -84,7 +84,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev, trailer = skb_tail_pointer(skb) - 4; if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 || - (trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00) + (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00) goto out_drop; source_port = trailer[1] & 7; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2015-09-22 17:20 +0200 |
| Message-ID | <qbxwl-DB-11@gated-at.bofh.it> |
| In reply to | #1230003 |
On 09/22/2015 02:28 AM, Neil Armstrong wrote: > The Marvell Egress rx trailer check must be fixed to > correctly detect bad bits in the third byte of the > Eggress trailer as described in the Table 28 of the > 88E6060 datasheet. > The current code incorrectly omits to check the third > byte and checks the fourth byte twice. > > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Nice catch. Acked-by: Guenter Roeck <linux@roeck-us.net> > --- > net/dsa/tag_trailer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c > index e268f9d..d0526a9 100644 > --- a/net/dsa/tag_trailer.c > +++ b/net/dsa/tag_trailer.c > @@ -84,7 +84,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev, > > trailer = skb_tail_pointer(skb) - 4; > if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 || > - (trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00) > + (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00) > goto out_drop; > > source_port = trailer[1] & 7; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-09-23 02:40 +0200 |
| Message-ID | <qbGgh-4Nq-1@gated-at.bofh.it> |
| In reply to | #1230003 |
From: Neil Armstrong <narmstrong@baylibre.com> Date: Tue, 22 Sep 2015 11:28:14 +0200 > The Marvell Egress rx trailer check must be fixed to > correctly detect bad bits in the third byte of the > Eggress trailer as described in the Table 28 of the > 88E6060 datasheet. > The current code incorrectly omits to check the third > byte and checks the fourth byte twice. > > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web