IB/hfi1: Move normal functions from hfi1_devdata to const array
The current implementation precludes having receive context specific packet type receive handlers. Fix this by adding adding c99 const array for the existing handlers and remove the current 72 bytes of pointers from devdata. A new pointer in hfi1_ctxtdata will point to the const array. Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Este cometimento está contido em:

cometido por
Jason Gunthorpe

ascendente
c59450c463
cometimento
b0ba3c18d6
@@ -367,6 +367,7 @@ int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa,
|
||||
__set_bit(0, rcd->in_use_ctxts);
|
||||
rcd->numa_id = numa;
|
||||
rcd->rcv_array_groups = dd->rcv_entries.ngroups;
|
||||
rcd->rhf_rcv_function_map = normal_rhf_rcv_functions;
|
||||
|
||||
mutex_init(&rcd->exp_mutex);
|
||||
|
||||
@@ -853,24 +854,6 @@ int hfi1_init(struct hfi1_devdata *dd, int reinit)
|
||||
struct hfi1_ctxtdata *rcd;
|
||||
struct hfi1_pportdata *ppd;
|
||||
|
||||
/* Set up recv low level handlers */
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_EXPECTED] =
|
||||
kdeth_process_expected;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_EAGER] =
|
||||
kdeth_process_eager;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_IB] = process_receive_ib;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_ERROR] =
|
||||
process_receive_error;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_BYPASS] =
|
||||
process_receive_bypass;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_INVALID5] =
|
||||
process_receive_invalid;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_INVALID6] =
|
||||
process_receive_invalid;
|
||||
dd->normal_rhf_rcv_functions[RHF_RCV_TYPE_INVALID7] =
|
||||
process_receive_invalid;
|
||||
dd->rhf_rcv_function_map = dd->normal_rhf_rcv_functions;
|
||||
|
||||
/* Set up send low level handlers */
|
||||
dd->process_pio_send = hfi1_verbs_send_pio;
|
||||
dd->process_dma_send = hfi1_verbs_send_dma;
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador