[PATCH] nvmet: allow setting ctrl to ready without iosqes/iocqes set

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Tue May 4 00:18:31 BST 2021


On 5/3/21 15:17, ran.anner at dell.com wrote:
>  
> +static inline bool nvmet_cc_en(u32 cc)
> +{
> +	return (cc >> NVME_CC_EN_SHIFT) & 0x1;
> +}
> +
> +static inline u8 nvmet_cc_css(u32 cc)
> +{
> +	return (cc >> NVME_CC_CSS_SHIFT) & 0x7;
> +}
> +
> +static inline u8 nvmet_cc_mps(u32 cc)
> +{
> +	return (cc >> NVME_CC_MPS_SHIFT) & 0xf;
> +}
> +
> +static inline u8 nvmet_cc_ams(u32 cc)
> +{
> +	return (cc >> NVME_CC_AMS_SHIFT) & 0x7;
> +}
> +
> +static inline u8 nvmet_cc_shn(u32 cc)
> +{
> +	return (cc >> NVME_CC_SHN_SHIFT) & 0x3;
> +}
> +
> +static inline u8 nvmet_cc_iosqes(u32 cc)
> +{
> +	return (cc >> NVME_CC_IOSQES_SHIFT) & 0xf;
> +}
> +
> +static inline u8 nvmet_cc_iocqes(u32 cc)
> +{
> +	return (cc >> NVME_CC_IOCQES_SHIFT) & 0xf;
> +}

Why are we bloating header file ?

If I remember the code correctly some of these functions are
only used in the target/core.c so there is no point in moving
those unless we have callers in the second file.

CC all the maintainers for NVMeOF target to get the better
response.





More information about the Linux-nvme mailing list