Skip to content

Commit 0846153

Browse files
damien-lemoalkeithbusch
authored andcommitted
nvmet: Introduce get/set_feature controller operations
The implementation of some features cannot always be done generically by the target core code. Arbitraion and IRQ coalescing features are examples of such features: their implementation must be provided (at least partially) by the target controller driver. Introduce the set_feature() and get_feature() controller fabrics operations (in struct nvmet_fabrics_ops) to allow supporting such features. Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Rick Wertenbroek <[email protected]> Tested-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 1ad8630 commit 0846153

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/nvme/target/nvmet.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,10 @@ struct nvmet_fabrics_ops {
416416
u16 (*create_cq)(struct nvmet_ctrl *ctrl, u16 cqid, u16 flags,
417417
u16 qsize, u64 prp1, u16 irq_vector);
418418
u16 (*delete_cq)(struct nvmet_ctrl *ctrl, u16 cqid);
419+
u16 (*set_feature)(const struct nvmet_ctrl *ctrl, u8 feat,
420+
void *feat_data);
421+
u16 (*get_feature)(const struct nvmet_ctrl *ctrl, u8 feat,
422+
void *feat_data);
419423
};
420424

421425
#define NVMET_MAX_INLINE_BIOVEC 8

0 commit comments

Comments
 (0)