vbdev_compress: Remove mentioning of 2MiB huge pages

We explicitly refer to 2MiB huge pages when a buffer
spans huge page boundary. That is not correct since
it may happen even with 1GiB huge pages.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reported-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ief72b677ccf3d8c1d9835bb8b74621f2b349175a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12250
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
Alexey Marchuk 2022-04-13 12:32:07 +03:00 committed by Tomasz Zawadzki
parent 619b4dba8a
commit 366e19efe8

View File

@ -66,7 +66,7 @@ static int g_mbuf_offset;
#define NUM_MAX_INFLIGHT_OPS 128
#define DEFAULT_WINDOW_SIZE 15
/* We need extra mbufs per operation to accommodate host buffers that
* span a 2MB boundary.
* span a physical page boundary.
*/
#define MAX_MBUFS_PER_OP (REDUCE_MAX_IOVECS * 2)
#define CHUNK_SIZE (1024 * 16)
@ -496,7 +496,7 @@ _setup_compress_mbuf(struct rte_mbuf **mbufs, int *mbuf_total, uint64_t *total_l
rte_pktmbuf_chain(mbufs[0], mbufs[mbuf_index]);
}
/* If we crossed 2 2MB boundary we need another mbuf for the remainder */
/* If we crossed 2 physical pages boundary we need another mbuf for the remainder */
if (remainder > 0) {
/* allocate an mbuf at the end of the array */
rc = rte_pktmbuf_alloc_bulk(g_mbuf_mp,
@ -590,7 +590,7 @@ _compress_operation(struct spdk_reduce_backing_dev *backing_dev, struct iovec *s
}
if (!comp_bdev->backing_dev.sgl_in && src_mbufs[0]->next != NULL) {
if (src_iovcnt == 1) {
SPDK_ERRLOG("Src buffer crosses 2MB boundary but driver %s doesn't support SGL input\n",
SPDK_ERRLOG("Src buffer crosses physical page boundary but driver %s doesn't support SGL input\n",
comp_bdev->drv_name);
} else {
SPDK_ERRLOG("Driver %s doesn't support SGL input\n", comp_bdev->drv_name);
@ -610,7 +610,7 @@ _compress_operation(struct spdk_reduce_backing_dev *backing_dev, struct iovec *s
}
if (!comp_bdev->backing_dev.sgl_out && dst_mbufs[0]->next != NULL) {
if (dst_iovcnt == 1) {
SPDK_ERRLOG("Dst buffer crosses 2MB boundary but driver %s doesn't support SGL output\n",
SPDK_ERRLOG("Dst buffer crosses physical page boundary but driver %s doesn't support SGL output\n",
comp_bdev->drv_name);
} else {
SPDK_ERRLOG("Driver %s doesn't support SGL output\n", comp_bdev->drv_name);