mirror of
git://nv-tegra.nvidia.com/kernel/nvethernetrm.git
synced 2025-12-22 09:12:10 +03:00
osi: pass > mtu packets to sw without valid flag
- Pass > mtu sized packets to sw driver without setting OSI_PKT_CX_VALID flag to let driver discard the packet and realloc buffer for descriptor. Bug 4969187 Change-Id: Icd2b0a35ccb4364147b7c5b5e49410acebace228 Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3257267 (cherry picked from commit 9625067d36dffcfd2db2eb2e6fc8a0a2a67f4d17) Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/3258734 Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Aniruddha Paul <anpaul@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Krishna Thota <kthota@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
593c8fc44c
commit
75d7479131
@@ -320,15 +320,16 @@ nve32_t osi_process_rx_completions(struct osi_dma_priv_data *osi_dma,
|
||||
* than 1 Rx desc. to place the larger packet and will set the
|
||||
* LD bit in RDES3 accordingly.
|
||||
* Restrict such Rx packets (which are longer than currently
|
||||
* set MTU on DUT), and drop them in driver since HW cannot
|
||||
* drop them. Also make use of swcx flags so that OSD can skip
|
||||
* DMA buffer allocation and DMA mapping for those descriptors.
|
||||
* If data is spread across multiple descriptors, drop packet
|
||||
* set MTU on DUT), and pass them to driver as invalid packet
|
||||
* since HW cannot drop them.
|
||||
*/
|
||||
if ((((rx_desc->rdes3 & RDES3_FD) == RDES3_FD) &&
|
||||
((rx_desc->rdes3 & RDES3_LD) == RDES3_LD)) ==
|
||||
BOOLEAN_FALSE) {
|
||||
rx_swcx->flags |= OSI_RX_SWCX_REUSE;
|
||||
rx_pkt_cx->flags &= ~OSI_PKT_CX_VALID;
|
||||
rx_pkt_cx->pkt_len = rx_desc->rdes3 & RDES3_PKT_LEN;
|
||||
osi_dma->osd_ops.receive_packet(osi_dma->osd, rx_ring, chan,
|
||||
osi_dma->rx_buf_len, rx_pkt_cx, rx_swcx);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user