summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2009-03-25 22:21:53 +0000
committerimp <imp@FreeBSD.org>2009-03-25 22:21:53 +0000
commit43475c65b23901769f07fa6e198d08ec78100c5d (patch)
treeeb7506aba05ba9f7ed2b577c8ec598f2cfbc18a0
parent9e4f84bd6d9ad4d4cfd609dd27feea50cd0331aa (diff)
downloadFreeBSD-src-43475c65b23901769f07fa6e198d08ec78100c5d.zip
FreeBSD-src-43475c65b23901769f07fa6e198d08ec78100c5d.tar.gz
Tweak comments.
-rw-r--r--sys/dev/ed/if_ed.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index a11beda..cbfabd2 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -806,14 +806,15 @@ ed_rint(struct ed_softc *sc)
/*
* Length is a wild value. There's a good chance that
* this was caused by the NIC being old and buggy.
- * The bug is that the length low byte is duplicated in
- * the high byte. Try to recalculate the length based on
- * the pointer to the next packet.
- */
- /*
- * NOTE: sc->next_packet is pointing at the current packet.
+ * The bug is that the length low byte is duplicated
+ * in the high byte. Try to recalculate the length
+ * based on the pointer to the next packet. Also,
+ * need ot preserve offset into page.
+ *
+ * NOTE: sc->next_packet is pointing at the current
+ * packet.
*/
- len &= ED_PAGE_SIZE - 1; /* preserve offset into page */
+ len &= ED_PAGE_SIZE - 1;
if (packet_hdr.next_packet >= sc->next_packet)
len += (packet_hdr.next_packet -
sc->next_packet) * ED_PAGE_SIZE;
@@ -834,14 +835,14 @@ ed_rint(struct ed_softc *sc)
}
/*
- * Be fairly liberal about what we allow as a "reasonable" length
- * so that a [crufty] packet will make it to BPF (and can thus
- * be analyzed). Note that all that is really important is that
- * we have a length that will fit into one mbuf cluster or less;
- * the upper layer protocols can then figure out the length from
- * their own length field(s).
- * But make sure that we have at least a full ethernet header
- * or we would be unable to call ether_input() later.
+ * Be fairly liberal about what we allow as a "reasonable"
+ * length so that a [crufty] packet will make it to BPF (and
+ * can thus be analyzed). Note that all that is really
+ * important is that we have a length that will fit into one
+ * mbuf cluster or less; the upper layer protocols can then
+ * figure out the length from their own length field(s). But
+ * make sure that we have at least a full ethernet header or
+ * we would be unable to call ether_input() later.
*/
if ((len >= sizeof(struct ed_ring) + ETHER_HDR_LEN) &&
(len <= MCLBYTES) &&
OpenPOWER on IntegriCloud