- Fixed incorrect packet length problem caused be earlier change to
support ZERO_COPY_SOCKETS. - Created #define for context initialization retry count. MFC after: 1 week
This commit is contained in:
parent
e5a34e5582
commit
8ef3f835d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191923
@ -4204,8 +4204,7 @@ bce_init_ctx(struct bce_softc *sc)
|
|||||||
|
|
||||||
if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) ||
|
if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) ||
|
||||||
(BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) {
|
(BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) {
|
||||||
/* DRC: Replace this constant value with a #define. */
|
int i, retry_cnt = CTX_INIT_RETRY_COUNT;
|
||||||
int i, retry_cnt = 10;
|
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n");
|
DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n");
|
||||||
@ -5895,6 +5894,9 @@ bce_rx_intr(struct bce_softc *sc)
|
|||||||
/* Set the total packet length. */
|
/* Set the total packet length. */
|
||||||
m0->m_pkthdr.len = m0->m_len = pkt_len;
|
m0->m_pkthdr.len = m0->m_len = pkt_len;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* Set the total packet length. */
|
||||||
|
m0->m_pkthdr.len = m0->m_len = pkt_len;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Remove the trailing Ethernet FCS. */
|
/* Remove the trailing Ethernet FCS. */
|
||||||
|
@ -6232,6 +6232,8 @@ struct l2_fhdr {
|
|||||||
|
|
||||||
#endif /* ZERO_COPY_SOCKETS */
|
#endif /* ZERO_COPY_SOCKETS */
|
||||||
|
|
||||||
|
#define CTX_INIT_RETRY_COUNT 10
|
||||||
|
|
||||||
/* Context size. */
|
/* Context size. */
|
||||||
#define CTX_SHIFT 7
|
#define CTX_SHIFT 7
|
||||||
#define CTX_SIZE (1 << CTX_SHIFT)
|
#define CTX_SIZE (1 << CTX_SHIFT)
|
||||||
|
Loading…
Reference in New Issue
Block a user