mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ice: fix ICE_LAST_OFFSET formula
[ Upstream commit b966ad832942b5a11e002f9b5ef102b08425b84a ]
For bigger PAGE_SIZE archs, ice driver works on 3k Rx buffers.
Therefore, ICE_LAST_OFFSET should take into account ICE_RXBUF_3072, not
ICE_RXBUF_2048.
Fixes: 7237f5b0db ("ice: introduce legacy Rx flag")
Suggested-by: Luiz Capitulino <luizcap@redhat.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b2b062df81
commit
fa8fdbe4b8
@@ -812,7 +812,7 @@ ice_can_reuse_rx_page(struct ice_rx_buf *rx_buf)
|
|||||||
return false;
|
return false;
|
||||||
#if (PAGE_SIZE >= 8192)
|
#if (PAGE_SIZE >= 8192)
|
||||||
#define ICE_LAST_OFFSET \
|
#define ICE_LAST_OFFSET \
|
||||||
(SKB_WITH_OVERHEAD(PAGE_SIZE) - ICE_RXBUF_2048)
|
(SKB_WITH_OVERHEAD(PAGE_SIZE) - ICE_RXBUF_3072)
|
||||||
if (rx_buf->page_offset > ICE_LAST_OFFSET)
|
if (rx_buf->page_offset > ICE_LAST_OFFSET)
|
||||||
return false;
|
return false;
|
||||||
#endif /* PAGE_SIZE >= 8192) */
|
#endif /* PAGE_SIZE >= 8192) */
|
||||||
|
|||||||
Reference in New Issue
Block a user