IB/hfi1: Define hfi1_handle_cnp_tbl[] once
Move the hfi1_handle_cnp_tbl[] from a header file to a .c file such that only one copy ends up in the hfi1 kernel module. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Cc: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Родитель
6d945a84c6
Коммит
e2fdbc2368
|
@ -433,6 +433,12 @@ static inline void init_packet(struct hfi1_ctxtdata *rcd,
|
||||||
packet->numpkt = 0;
|
packet->numpkt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We support only two types - 9B and 16B for now */
|
||||||
|
static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = {
|
||||||
|
[HFI1_PKT_TYPE_9B] = &return_cnp,
|
||||||
|
[HFI1_PKT_TYPE_16B] = &return_cnp_16B
|
||||||
|
};
|
||||||
|
|
||||||
void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
|
void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
|
||||||
bool do_cnp)
|
bool do_cnp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1538,11 +1538,6 @@ typedef void (*hfi1_handle_cnp)(struct hfi1_ibport *ibp, struct rvt_qp *qp,
|
||||||
u32 remote_qpn, u32 pkey, u32 slid, u32 dlid,
|
u32 remote_qpn, u32 pkey, u32 slid, u32 dlid,
|
||||||
u8 sc5, const struct ib_grh *old_grh);
|
u8 sc5, const struct ib_grh *old_grh);
|
||||||
|
|
||||||
/* We support only two types - 9B and 16B for now */
|
|
||||||
static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = {
|
|
||||||
[HFI1_PKT_TYPE_9B] = &return_cnp,
|
|
||||||
[HFI1_PKT_TYPE_16B] = &return_cnp_16B
|
|
||||||
};
|
|
||||||
#define PKEY_CHECK_INVALID -1
|
#define PKEY_CHECK_INVALID -1
|
||||||
int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey,
|
int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey,
|
||||||
u8 sc5, int8_t s_pkey_index);
|
u8 sc5, int8_t s_pkey_index);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче