Jason Wang
2022-Sep-23 04:18 UTC
[PATCH v1] vdpa/ifcvf: avoid waste ioremap area of vdpa hot migration
On Fri, Sep 23, 2022 at 12:15 PM Zhu, Lingshan <lingshan.zhu at intel.com> wrote:> > > > On 9/23/2022 12:09 PM, Jason Wang wrote: > > On Fri, Sep 23, 2022 at 11:53 AM Angus Chen <angus.chen at jaguarmicro.com> wrote: > >> The array capacity should be queuepair, > > If this is true, we need a better name for the ifcvf_vring_lm_cfg structure. > Not true AFAIK. And we are re-designing this cap. > > Thanks > Zhu LingshanOk, but I think we still need to keep this for backward compatibility and need to differ the generations via some Intel specific registers. Thanks> > > > Thanks > > > >> and the queuepairs should > >> be half of IFCVF_MAX_QUEUES without control queue, > >> or should be (IFCVF_MAX_QUEUES+1)/2 with the control queue. > >> So the definition of ifcvf_lm_cfg waste some memory, > >> and it will waste some ioremap area also. > >> > >> Fixes: 2ddae773c93b ("vDPA/ifcvf: detect and use the onboard number of queues directly") > >> Signed-off-by: Angus Chen <angus.chen at jaguarmicro.com> > >> --- > >> drivers/vdpa/ifcvf/ifcvf_base.h | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h > >> index f5563f665cc6..563c04f9b7ac 100644 > >> --- a/drivers/vdpa/ifcvf/ifcvf_base.h > >> +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > >> @@ -104,7 +104,7 @@ struct ifcvf_vring_lm_cfg { > >> > >> struct ifcvf_lm_cfg { > >> u8 reserved[IFCVF_LM_RING_STATE_OFFSET]; > >> - struct ifcvf_vring_lm_cfg vring_lm_cfg[IFCVF_MAX_QUEUES]; > >> + struct ifcvf_vring_lm_cfg vring_lm_cfg[(IFCVF_MAX_QUEUES+1)/2]; > >> }; > >> > >> struct ifcvf_vdpa_mgmt_dev { > >> -- > >> 2.17.1 > >> >