@@ -28,8 +28,8 @@ static void smbdirect_connection_send_immediate_work(struct work_struct *work);
2828
2929static void smbdirect_connection_destroy_mr_list (struct smbdirect_socket * sc );
3030
31- __maybe_unused /* this is temporary while this file is included in orders */
32- static bool smbdirect_frwr_is_supported (const struct ib_device_attr * attrs )
31+ __SMBDIRECT_PUBLIC__
32+ bool smbdirect_frwr_is_supported (const struct ib_device_attr * attrs )
3333{
3434 /*
3535 * Test if FRWR (Fast Registration Work Requests) is supported on the
@@ -43,6 +43,7 @@ static bool smbdirect_frwr_is_supported(const struct ib_device_attr *attrs)
4343 return false;
4444 return true;
4545}
46+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_frwr_is_supported );
4647
4748__maybe_unused /* this is temporary while this file is included in orders */
4849static void smbdirect_socket_prepare_create (struct smbdirect_socket * sc ,
@@ -117,8 +118,8 @@ static int smbdirect_socket_init_new(struct net *net, struct smbdirect_socket *s
117118 return 0 ;
118119}
119120
120- __maybe_unused /* this is temporary while this file is included in orders */
121- static int smbdirect_socket_create_kern (struct net * net , struct smbdirect_socket * * _sc )
121+ __SMBDIRECT_PUBLIC__
122+ int smbdirect_socket_create_kern (struct net * net , struct smbdirect_socket * * _sc )
122123{
123124 struct smbdirect_socket * sc ;
124125 int ret ;
@@ -142,6 +143,7 @@ static int smbdirect_socket_create_kern(struct net *net, struct smbdirect_socket
142143alloc_failed :
143144 return ret ;
144145}
146+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_create_kern );
145147
146148static int smbdirect_socket_init_accepting (struct rdma_cm_id * id , struct smbdirect_socket * sc )
147149{
@@ -158,8 +160,8 @@ static int smbdirect_socket_init_accepting(struct rdma_cm_id *id, struct smbdire
158160 return 0 ;
159161}
160162
161- __maybe_unused /* this is temporary while this file is included in orders */
162- static int smbdirect_socket_create_accepting (struct rdma_cm_id * id , struct smbdirect_socket * * _sc )
163+ __SMBDIRECT_PUBLIC__
164+ int smbdirect_socket_create_accepting (struct rdma_cm_id * id , struct smbdirect_socket * * _sc )
163165{
164166 struct smbdirect_socket * sc ;
165167 int ret ;
@@ -183,10 +185,11 @@ static int smbdirect_socket_create_accepting(struct rdma_cm_id *id, struct smbdi
183185alloc_failed :
184186 return ret ;
185187}
188+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_create_accepting );
186189
187- __maybe_unused /* this is temporary while this file is included in orders */
188- static int smbdirect_socket_set_initial_parameters (struct smbdirect_socket * sc ,
189- const struct smbdirect_socket_parameters * sp )
190+ __SMBDIRECT_PUBLIC__
191+ int smbdirect_socket_set_initial_parameters (struct smbdirect_socket * sc ,
192+ const struct smbdirect_socket_parameters * sp )
190193{
191194 /*
192195 * This is only allowed before connect or accept
@@ -208,18 +211,20 @@ static int smbdirect_socket_set_initial_parameters(struct smbdirect_socket *sc,
208211
209212 return 0 ;
210213}
214+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_set_initial_parameters );
211215
212- __maybe_unused /* this is temporary while this file is included in orders */
213- static const struct smbdirect_socket_parameters *
216+ __SMBDIRECT_PUBLIC__
217+ const struct smbdirect_socket_parameters *
214218smbdirect_socket_get_current_parameters (struct smbdirect_socket * sc )
215219{
216220 return & sc -> parameters ;
217221}
222+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_get_current_parameters );
218223
219- __maybe_unused /* this is temporary while this file is included in orders */
220- static int smbdirect_socket_set_kernel_settings (struct smbdirect_socket * sc ,
221- enum ib_poll_context poll_ctx ,
222- gfp_t gfp_mask )
224+ __SMBDIRECT_PUBLIC__
225+ int smbdirect_socket_set_kernel_settings (struct smbdirect_socket * sc ,
226+ enum ib_poll_context poll_ctx ,
227+ gfp_t gfp_mask )
223228{
224229 /*
225230 * This is only allowed before connect or accept
@@ -239,10 +244,11 @@ static int smbdirect_socket_set_kernel_settings(struct smbdirect_socket *sc,
239244
240245 return 0 ;
241246}
247+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_set_kernel_settings );
242248
243- __maybe_unused /* this is temporary while this file is included in orders */
244- static int smbdirect_socket_set_custom_workqueue (struct smbdirect_socket * sc ,
245- struct workqueue_struct * workqueue )
249+ __SMBDIRECT_PUBLIC__
250+ int smbdirect_socket_set_custom_workqueue (struct smbdirect_socket * sc ,
251+ struct workqueue_struct * workqueue )
246252{
247253 /*
248254 * This is only allowed before connect or accept
@@ -261,26 +267,28 @@ static int smbdirect_socket_set_custom_workqueue(struct smbdirect_socket *sc,
261267
262268 return 0 ;
263269}
264-
265- __maybe_unused /* this is temporary while this file is included in orders */
266- static void smbdirect_socket_set_logging (struct smbdirect_socket * sc ,
267- void * private_ptr ,
268- bool (* needed )(struct smbdirect_socket * sc ,
269- void * private_ptr ,
270- unsigned int lvl ,
271- unsigned int cls ),
272- void (* vaprintf )(struct smbdirect_socket * sc ,
273- const char * func ,
274- unsigned int line ,
275- void * private_ptr ,
276- unsigned int lvl ,
277- unsigned int cls ,
278- struct va_format * vaf ))
270+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_set_custom_workqueue );
271+
272+ __SMBDIRECT_PUBLIC__
273+ void smbdirect_socket_set_logging (struct smbdirect_socket * sc ,
274+ void * private_ptr ,
275+ bool (* needed )(struct smbdirect_socket * sc ,
276+ void * private_ptr ,
277+ unsigned int lvl ,
278+ unsigned int cls ),
279+ void (* vaprintf )(struct smbdirect_socket * sc ,
280+ const char * func ,
281+ unsigned int line ,
282+ void * private_ptr ,
283+ unsigned int lvl ,
284+ unsigned int cls ,
285+ struct va_format * vaf ))
279286{
280287 sc -> logging .private_ptr = private_ptr ;
281288 sc -> logging .needed = needed ;
282289 sc -> logging .vaprintf = vaprintf ;
283290}
291+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_set_logging );
284292
285293__maybe_unused /* this is temporary while this file is included in orders */
286294static void smbdirect_connection_wake_up_all (struct smbdirect_socket * sc )
@@ -1095,16 +1103,17 @@ static void smbdirect_connection_disconnect_work(struct work_struct *work)
10951103 smbdirect_connection_wake_up_all (sc );
10961104}
10971105
1098- __maybe_unused /* this is temporary while this file is included in orders */
1099- static bool smbdirect_connection_is_connected (struct smbdirect_socket * sc )
1106+ __SMBDIRECT_PUBLIC__
1107+ bool smbdirect_connection_is_connected (struct smbdirect_socket * sc )
11001108{
11011109 if (unlikely (!sc || sc -> first_error || sc -> status != SMBDIRECT_SOCKET_CONNECTED ))
11021110 return false;
11031111 return true;
11041112}
1113+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_connection_is_connected );
11051114
1106- __maybe_unused /* this is temporary while this file is included in orders */
1107- static int smbdirect_connection_wait_for_connected (struct smbdirect_socket * sc )
1115+ __SMBDIRECT_PUBLIC__
1116+ int smbdirect_connection_wait_for_connected (struct smbdirect_socket * sc )
11081117{
11091118 struct smbdirect_socket_parameters * sp = & sc -> parameters ;
11101119 union {
@@ -1170,6 +1179,7 @@ static int smbdirect_connection_wait_for_connected(struct smbdirect_socket *sc)
11701179
11711180 return 0 ;
11721181}
1182+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_connection_wait_for_connected );
11731183
11741184static void smbdirect_connection_destroy (struct smbdirect_socket * sc )
11751185{
@@ -1295,11 +1305,12 @@ static void smbdirect_connection_destroy_sync(struct smbdirect_socket *sc)
12951305 SMBDIRECT_DEBUG_ERR_PTR (sc -> first_error ));
12961306}
12971307
1298- __maybe_unused /* this is temporary while this file is included in orders */
1299- static void smbdirect_socket_shutdown (struct smbdirect_socket * sc )
1308+ __SMBDIRECT_PUBLIC__
1309+ void smbdirect_socket_shutdown (struct smbdirect_socket * sc )
13001310{
13011311 smbdirect_connection_schedule_disconnect (sc , - ECONNABORTED );
13021312}
1313+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_shutdown );
13031314
13041315__maybe_unused /* this is temporary while this file is included in orders */
13051316static void smbdirect_socket_release_disconnect (struct kref * kref )
@@ -1327,8 +1338,8 @@ static void smbdirect_socket_release_destroy(struct kref *kref)
13271338 kfree (sc );
13281339}
13291340
1330- __maybe_unused /* this is temporary while this file is included in orders */
1331- static void smbdirect_socket_release (struct smbdirect_socket * sc )
1341+ __SMBDIRECT_PUBLIC__
1342+ void smbdirect_socket_release (struct smbdirect_socket * sc )
13321343{
13331344 /*
13341345 * We expect only 1 disconnect reference
@@ -1344,6 +1355,7 @@ static void smbdirect_socket_release(struct smbdirect_socket *sc)
13441355 */
13451356 kref_put (& sc -> refs .destroy , smbdirect_socket_release_destroy );
13461357}
1358+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_socket_release );
13471359
13481360static void smbdirect_connection_idle_timer_work (struct work_struct * work )
13491361{
@@ -1600,11 +1612,12 @@ static int smbdirect_connection_post_send_io(struct smbdirect_socket *sc,
16001612 return smbdirect_connection_post_send_wr (sc , & msg -> wr );
16011613}
16021614
1603- static int smbdirect_connection_send_single_iter (struct smbdirect_socket * sc ,
1604- struct smbdirect_send_batch * batch ,
1605- struct iov_iter * iter ,
1606- unsigned int flags ,
1607- u32 remaining_data_length )
1615+ __SMBDIRECT_PUBLIC__
1616+ int smbdirect_connection_send_single_iter (struct smbdirect_socket * sc ,
1617+ struct smbdirect_send_batch * batch ,
1618+ struct iov_iter * iter ,
1619+ unsigned int flags ,
1620+ u32 remaining_data_length )
16081621{
16091622 const struct smbdirect_socket_parameters * sp = & sc -> parameters ;
16101623 struct smbdirect_send_io * msg ;
@@ -1735,9 +1748,10 @@ static int smbdirect_connection_send_single_iter(struct smbdirect_socket *sc,
17351748lcredit_failed :
17361749 return ret ;
17371750}
1751+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_connection_send_single_iter );
17381752
1739- __maybe_unused /* this is temporary while this file is included in orders */
1740- static int smbdirect_connection_send_wait_zero_pending (struct smbdirect_socket * sc )
1753+ __SMBDIRECT_PUBLIC__
1754+ int smbdirect_connection_send_wait_zero_pending (struct smbdirect_socket * sc )
17411755{
17421756 /*
17431757 * As an optimization, we don't wait for individual I/O to finish
@@ -1760,13 +1774,14 @@ static int smbdirect_connection_send_wait_zero_pending(struct smbdirect_socket *
17601774
17611775 return 0 ;
17621776}
1777+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_connection_send_wait_zero_pending );
17631778
1764- __maybe_unused /* this is temporary while this file is included in orders */
1765- static int smbdirect_connection_send_iter (struct smbdirect_socket * sc ,
1766- struct iov_iter * iter ,
1767- unsigned int flags ,
1768- bool need_invalidate ,
1769- unsigned int remote_key )
1779+ __SMBDIRECT_PUBLIC__
1780+ int smbdirect_connection_send_iter (struct smbdirect_socket * sc ,
1781+ struct iov_iter * iter ,
1782+ unsigned int flags ,
1783+ bool need_invalidate ,
1784+ unsigned int remote_key )
17701785{
17711786 struct smbdirect_socket_parameters * sp = & sc -> parameters ;
17721787 struct smbdirect_send_batch batch ;
@@ -1845,6 +1860,7 @@ static int smbdirect_connection_send_iter(struct smbdirect_socket *sc,
18451860
18461861 return total_count ;
18471862}
1863+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_connection_send_iter );
18481864
18491865static void smbdirect_connection_send_io_done (struct ib_cq * cq , struct ib_wc * wc )
18501866{
@@ -2223,10 +2239,10 @@ static void smbdirect_connection_recv_io_refill_work(struct work_struct *work)
22232239 }
22242240}
22252241
2226- __maybe_unused /* this is temporary while this file is included in orders */
2227- static int smbdirect_connection_recvmsg (struct smbdirect_socket * sc ,
2228- struct msghdr * msg ,
2229- unsigned int flags )
2242+ __SMBDIRECT_PUBLIC__
2243+ int smbdirect_connection_recvmsg (struct smbdirect_socket * sc ,
2244+ struct msghdr * msg ,
2245+ unsigned int flags )
22302246{
22312247 struct smbdirect_recv_io * response ;
22322248 struct smbdirect_data_transfer * data_transfer ;
@@ -2373,6 +2389,7 @@ static int smbdirect_connection_recvmsg(struct smbdirect_socket *sc,
23732389
23742390 goto again ;
23752391}
2392+ __SMBDIRECT_EXPORT_SYMBOL__ (smbdirect_connection_recvmsg );
23762393
23772394static bool smbdirect_map_sges_single_page (struct smbdirect_map_sges * state ,
23782395 struct page * page , size_t off , size_t len )
0 commit comments