net/sfc/base: separate limitations on Tx DMA descriptors
[dpdk.git] / drivers / net / sfc / base / efx_tx.c
index 0d47390..ceb2920 100644 (file)
@@ -745,8 +745,12 @@ siena_tx_qpost(
                size_t size = ebp->eb_size;
                efsys_dma_addr_t end = start + size;
 
-               /* Fragments must not span 4k boundaries. */
-               EFSYS_ASSERT(P2ROUNDUP(start + 1, 4096) >= end);
+               /*
+                * Fragments must not span 4k boundaries.
+                * Here it is a stricter requirement than the maximum length.
+                */
+               EFSYS_ASSERT(P2ROUNDUP(start + 1,
+                   etp->et_enp->en_nic_cfg.enc_tx_dma_desc_boundary) >= end);
 
                EFX_TX_DESC(etp, start, size, ebp->eb_eop, added);
        }
@@ -1005,8 +1009,12 @@ siena_tx_qdesc_dma_create(
        __in    boolean_t eop,
        __out   efx_desc_t *edp)
 {
-       /* Fragments must not span 4k boundaries. */
-       EFSYS_ASSERT(P2ROUNDUP(addr + 1, 4096) >= addr + size);
+       /*
+        * Fragments must not span 4k boundaries.
+        * Here it is a stricter requirement than the maximum length.
+        */
+       EFSYS_ASSERT(P2ROUNDUP(addr + 1,
+           etp->et_enp->en_nic_cfg.enc_tx_dma_desc_boundary) >= addr + size);
 
        EFSYS_PROBE4(tx_desc_dma_create, unsigned int, etp->et_index,
                    efsys_dma_addr_t, addr,