git: a2b046620c54 - main - mpi3mr: Remove unused fields in struct mpi3mr_cmd
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Nov 2023 01:55:31 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=a2b046620c54db977196128b3c53da2704b9fd20
commit a2b046620c54db977196128b3c53da2704b9fd20
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-11-29 01:49:01 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-11-29 01:49:01 +0000
mpi3mr: Remove unused fields in struct mpi3mr_cmd
All of these fields are either unused, or just initialized. Remove
them. This saves about 1MB of memory for the cards that I have which can
do 8k transactions at once.
Sponsored by: Netflix
Reviewed by: mav, jhb
Differential Revision: https://reviews.freebsd.org/D42538
---
sys/dev/mpi3mr/mpi3mr.c | 3 ---
sys/dev/mpi3mr/mpi3mr.h | 6 ------
2 files changed, 9 deletions(-)
diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c
index 478b0944defa..9a052c98d13e 100644
--- a/sys/dev/mpi3mr/mpi3mr.c
+++ b/sys/dev/mpi3mr/mpi3mr.c
@@ -4985,12 +4985,9 @@ mpi3mr_get_command(struct mpi3mr_softc *sc)
cmd->data_dir = 0;
cmd->ccb = NULL;
cmd->targ = NULL;
- cmd->max_segs = 0;
- cmd->lun = 0;
cmd->state = MPI3MR_CMD_STATE_BUSY;
cmd->data = NULL;
cmd->length = 0;
- cmd->out_len = 0;
out:
mtx_unlock(&sc->cmd_pool_lock);
return cmd;
diff --git a/sys/dev/mpi3mr/mpi3mr.h b/sys/dev/mpi3mr/mpi3mr.h
index 479ba9c7b11b..b00d2ef562d8 100644
--- a/sys/dev/mpi3mr/mpi3mr.h
+++ b/sys/dev/mpi3mr/mpi3mr.h
@@ -456,19 +456,13 @@ struct mpi3mr_cmd {
union ccb *ccb;
void *data;
u_int length;
- u_int out_len;
- struct uio uio;
- struct iovec iovec[MPI3MR_IOVEC_COUNT];
- u_int max_segs;
struct mpi3mr_target *targ;
- u_int lun;
u_int data_dir;
u_int state;
bus_dmamap_t dmamap;
struct scsi_sense_data *sense;
struct callout callout;
bool callout_owner;
- mpi3mr_cmd_callback_t *timeout_handler;
U16 hosttag;
U8 req_qidx;
Mpi3SCSIIORequest_t io_request;