Message ID | 1655345240-26411-8-git-send-email-longli@linuxonhyperv.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | Introduce Microsoft Azure Network Adapter (MANA) RDMA driver | expand |
> From: longli@linuxonhyperv.com <longli@linuxonhyperv.com> > Sent: Wednesday, June 15, 2022 7:07 PM > @@ -125,6 +125,7 @@ int mana_gd_send_request(struct gdma_context *gc, > u32 req_len, const void *req, > > return mana_hwc_send_request(hwc, req_len, req, resp_len, resp); > } > +EXPORT_SYMBOL(mana_gd_send_request); Can we use EXPORT_SYMBOL_GPL? > @@ -715,9 +715,10 @@ static int mana_create_wq_obj(struct > mana_port_context *apc, > out: > return err; > } > +EXPORT_SYMBOL_GPL(mana_create_wq_obj); Well, here we use EXPORT_SYMBOL_GPL. If there is a rule to decide which one should be used, please add a comment. In general, the patch looks good to me. Reviewed-by: Dexuan Cui <decui@microsoft.com>
> Subject: RE: [Patch v4 07/12] net: mana: Export Work Queue functions for use > by RDMA driver > > > From: longli@linuxonhyperv.com <longli@linuxonhyperv.com> > > Sent: Wednesday, June 15, 2022 7:07 PM @@ -125,6 +125,7 @@ int > > mana_gd_send_request(struct gdma_context *gc, > > u32 req_len, const void *req, > > > > return mana_hwc_send_request(hwc, req_len, req, resp_len, resp); } > > +EXPORT_SYMBOL(mana_gd_send_request); > Can we use EXPORT_SYMBOL_GPL? > > > @@ -715,9 +715,10 @@ static int mana_create_wq_obj(struct > > mana_port_context *apc, > > out: > > return err; > > } > > +EXPORT_SYMBOL_GPL(mana_create_wq_obj); > Will fix this in v5. > Well, here we use EXPORT_SYMBOL_GPL. If there is a rule to decide which one > should be used, please add a comment. > > In general, the patch looks good to me. > > Reviewed-by: Dexuan Cui <decui@microsoft.com>
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index 60cc1270b7d5..272facd272a4 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -125,6 +125,7 @@ int mana_gd_send_request(struct gdma_context *gc, u32 req_len, const void *req, return mana_hwc_send_request(hwc, req_len, req, resp_len, resp); } +EXPORT_SYMBOL(mana_gd_send_request); int mana_gd_alloc_memory(struct gdma_context *gc, unsigned int length, struct gdma_mem_info *gmi) diff --git a/drivers/net/ethernet/microsoft/mana/mana.h b/drivers/net/ethernet/microsoft/mana/mana.h index 8e58abdce906..aca95c6ba8b3 100644 --- a/drivers/net/ethernet/microsoft/mana/mana.h +++ b/drivers/net/ethernet/microsoft/mana/mana.h @@ -571,6 +571,15 @@ struct mana_adev { struct gdma_dev *mdev; }; +int mana_create_wq_obj(struct mana_port_context *apc, + mana_handle_t vport, + u32 wq_type, struct mana_obj_spec *wq_spec, + struct mana_obj_spec *cq_spec, + mana_handle_t *wq_obj); + +void mana_destroy_wq_obj(struct mana_port_context *apc, u32 wq_type, + mana_handle_t wq_obj); + int mana_cfg_vport(struct mana_port_context *apc, u32 protection_dom_id, u32 doorbell_pg_id); void mana_uncfg_vport(struct mana_port_context *apc); diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index c18c358607a7..b769fccc076d 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -662,11 +662,11 @@ static int mana_cfg_vport_steering(struct mana_port_context *apc, return err; } -static int mana_create_wq_obj(struct mana_port_context *apc, - mana_handle_t vport, - u32 wq_type, struct mana_obj_spec *wq_spec, - struct mana_obj_spec *cq_spec, - mana_handle_t *wq_obj) +int mana_create_wq_obj(struct mana_port_context *apc, + mana_handle_t vport, + u32 wq_type, struct mana_obj_spec *wq_spec, + struct mana_obj_spec *cq_spec, + mana_handle_t *wq_obj) { struct mana_create_wqobj_resp resp = {}; struct mana_create_wqobj_req req = {}; @@ -715,9 +715,10 @@ static int mana_create_wq_obj(struct mana_port_context *apc, out: return err; } +EXPORT_SYMBOL_GPL(mana_create_wq_obj); -static void mana_destroy_wq_obj(struct mana_port_context *apc, u32 wq_type, - mana_handle_t wq_obj) +void mana_destroy_wq_obj(struct mana_port_context *apc, u32 wq_type, + mana_handle_t wq_obj) { struct mana_destroy_wqobj_resp resp = {}; struct mana_destroy_wqobj_req req = {}; @@ -742,6 +743,7 @@ static void mana_destroy_wq_obj(struct mana_port_context *apc, u32 wq_type, netdev_err(ndev, "Failed to destroy WQ object: %d, 0x%x\n", err, resp.hdr.status); } +EXPORT_SYMBOL_GPL(mana_destroy_wq_obj); static void mana_destroy_eq(struct mana_context *ac) {