[Intel-wired-lan] [PATCH net-next 04/15] idpf: add core init and interrupt request
Simon Horman
simon.horman at corigine.com
Fri Mar 31 15:39:41 UTC 2023
On Wed, Mar 29, 2023 at 07:03:53AM -0700, Pavan Kumar Linga wrote:
> As the mailbox is setup, add the necessary send and receive
> mailbox message framework to support the virtchnl communication
> between the driver and device Control Plane (CP).
>
> Add the core initialization. To start with, driver confirms the
> virtchnl version with the CP. Once that is done, it requests
> and gets the required capabilities and resources needed such as
> max vectors, queues etc.
>
> Based on the vector information received in 'VIRTCHNL2_OP_GET_CAPS',
> request the stack to allocate the required vectors. Finally add
> the interrupt handling mechanism for the mailbox queue and enable
> the interrupt.
>
> Note: Checkpatch issues a warning about IDPF_FOREACH_VPORT_VC_STATE and
> IDPF_GEN_STRING being complex macros and should be enclosed in parentheses
> but it's not the case. They are never used as a statement and instead only
> used to define the enum and array.
>
> Co-developed-by: Alan Brady <alan.brady at intel.com>
> Signed-off-by: Alan Brady <alan.brady at intel.com>
> Co-developed-by: Emil Tantilov <emil.s.tantilov at intel.com>
> Signed-off-by: Emil Tantilov <emil.s.tantilov at intel.com>
> Co-developed-by: Joshua Hay <joshua.a.hay at intel.com>
> Signed-off-by: Joshua Hay <joshua.a.hay at intel.com>
> Co-developed-by: Madhu Chittim <madhu.chittim at intel.com>
> Signed-off-by: Madhu Chittim <madhu.chittim at intel.com>
> Co-developed-by: Phani Burra <phani.r.burra at intel.com>
> Signed-off-by: Phani Burra <phani.r.burra at intel.com>
> Co-developed-by: Shailendra Bhatnagar <shailendra.bhatnagar at intel.com>
> Signed-off-by: Shailendra Bhatnagar <shailendra.bhatnagar at intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga at intel.com>
> Reviewed-by: Sridhar Samudrala <sridhar.samudrala at intel.com>
More spelling nits from my side.
...
> diff --git a/drivers/net/ethernet/intel/idpf/idpf.h b/drivers/net/ethernet/intel/idpf/idpf.h
...
> +/* Stack to maintain vector indexes used for 'vector distribution' algorithm */
> +struct idpf_vector_lifo {
> + /* Vector stack maintains all the relative vector indexes at the
> + * *adapter* level. This stack is divided into 2 parts, first one is
> + * called as 'default pool' and other one is called 'free pool'.
> + * Vector distribution algorithm gives priority to default vports in
> + * a way that at least IDPF_MIN_Q_VEC vectors are allocated per
> + * default vport and the relative vector indexes for those are
> + * maintained in default pool. Free pool contains all the unallocated
> + * vector indexes which can be allocated on-demand basis.
> + * Mailbox vector index is maitained in the default pool of the stack
s/maitained/maintained/
> + */
...
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
...
> +/**
> + * idpf_recv_get_caps_msg - Receive virtchnl get capabilities message
> + * @adapter: Driver specific private structure
> + *
> + * Receive virtchnl get capabilities message. Returns 0 on succes, negative on
s/succes/success/
...
> +/**
> + * idpf_vc_core_deinit - Device deinit routine
> + * @adapter: Driver specific private structue
s/structue/structure/
...
More information about the Intel-wired-lan
mailing list