mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
staging: fsl-dpaa2/eth: Check SGT final bit is present
For scatter-gather ingress frames, we expect to receive a list of fragments from the hardware, last of which is marked with a "final" bit. Add a check to make sure the Rx frame has this bit set correctly; there's not much we can do in case of a malformed frame, but at least issue a warning. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cbb3ea40fc
commit
b63baf7137
1 changed files with 2 additions and 0 deletions
|
@ -213,6 +213,8 @@ static struct sk_buff *build_frag_skb(struct dpaa2_eth_priv *priv,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WARN_ONCE(i == DPAA2_ETH_MAX_SG_ENTRIES, "Final bit not set in SGT");
|
||||||
|
|
||||||
/* Count all data buffers + SG table buffer */
|
/* Count all data buffers + SG table buffer */
|
||||||
ch->buf_count -= i + 2;
|
ch->buf_count -= i + 2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue