Re: [PATCH 8/10] cxgb3 - Unmap offload packets when they are freed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik wrote:
Divy Le Ray wrote:
From: Divy Le Ray <[email protected]>

Offload packets may be DMAed long after their SGE Tx descriptors are done
so they must remain mapped until they are freed rather than until their
descriptors are freed.  Unmap such packets through an skb destructor.

Signed-off-by: Divy Le Ray <[email protected]>

this is questionable and sounds like you are working around a bug. I can't think of another driver that uses skb destructors, and I could have sworn that skb destructors were not for drivers to use anyway
It's not a bug work around. The payload of RDMA packets is DMAd lazily, potentially well after the DMA descriptors themselves have been processed and released. On plaftorms w/ IOMMUs, the packets need to remain mapped in the IOMMU until their payload is fetched, at which time the Scatter/Gather Engine may or may not still have knowledge of those packets. So the SGE maps them for the IOMMU, then sets up the destructor so they can be unmapped whenever they complete. It's true that drivers don't typically set up destructors but the lazy DMA this device does is also uncommon. Packets carrying these destructors are exchanged between the RDMA driver and the low-level driver and aren't visible to any parts of the stack that may have different expectations of destructors. Using the destructor is the simplest, most convenient way to solve this problem.

Cheers,
Divy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux