aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_io.h
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-02-23 23:35:52 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-02-23 23:35:52 +0000
commit62e802cf3a9e627a641b5086888d963d689ca003 (patch)
tree74029eeb3f0844715aa49076e47f735a7e3ee922 /sys/cam/ctl/ctl_io.h
parent221e5d2dd5844c901a7b23d422207b737742f566 (diff)
downloadsrc-62e802cf3a9e627a641b5086888d963d689ca003.tar.gz
src-62e802cf3a9e627a641b5086888d963d689ca003.zip
Free some space in struct ctl_io_hdr for better use.
- Collapse original_sc and serializing_sc fields into one, since they are never used simultanously, we have only one local I/O and one remote. - Move remote_sglist and local_sglist fields into CTL_PRIV_BACKEND, since they are used only on Originating SC in XFER mode, where requests don't ever reach backends, so we can reuse backend's private storage. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
Notes
Notes: svn path=/head/; revision=344489
Diffstat (limited to 'sys/cam/ctl/ctl_io.h')
-rw-r--r--sys/cam/ctl/ctl_io.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h
index bc7a64d69a84..7dfa45da0f70 100644
--- a/sys/cam/ctl/ctl_io.h
+++ b/sys/cam/ctl/ctl_io.h
@@ -167,6 +167,15 @@ union ctl_priv {
#define CTL_PORT(io) (((struct ctl_softc *)CTL_SOFTC(io))-> \
ctl_ports[(io)->io_hdr.nexus.targ_port])
+/*
+ * These are used only on Originating SC in XFER mode, where requests don't
+ * ever reach backends, so we can reuse backend's private storage.
+ */
+#define CTL_RSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[0])
+#define CTL_LSGL(io) ((io)->io_hdr.ctl_private[CTL_PRIV_BACKEND].ptrs[1])
+#define CTL_RSGLT(io) ((struct ctl_sg_entry *)CTL_RSGL(io))
+#define CTL_LSGLT(io) ((struct ctl_sg_entry *)CTL_LSGL(io))
+
#define CTL_INVALID_PORTNAME 0xFF
#define CTL_UNMAPPED_IID 0xFF
@@ -229,12 +238,12 @@ struct ctl_io_hdr {
struct bintime dma_bt; /* DMA total ticks */
#endif /* CTL_TIME_IO */
uint32_t num_dmas; /* Number of DMAs */
- union ctl_io *original_sc;
- union ctl_io *serializing_sc;
+ union ctl_io *remote_io; /* I/O counterpart on remote HA side */
+ void *pad1;
void *pool; /* I/O pool */
union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */
- struct ctl_sg_entry *remote_sglist;
- struct ctl_sg_entry *local_sglist;
+ void *pad2;
+ void *pad3;
STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */
TAILQ_ENTRY(ctl_io_hdr) ooa_links;
TAILQ_ENTRY(ctl_io_hdr) blocked_links;