Whamcloud - gitweb
LU-13005 lnet: discard LNetEQGet and LNetEQWait 40/36840/4
authorMr NeilBrown <neilb@suse.de>
Tue, 7 Jan 2020 18:14:51 +0000 (13:14 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Jan 2020 04:04:39 +0000 (04:04 +0000)
These interfaces are never used and are not particularly useful,
so discard them.

Test-Parameters: trivial testlist=sanity-lnet

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Iaf2bc9ec2638820c3e4334e40cf2cf6993237f7d
Reviewed-on: https://review.whamcloud.com/36840
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/lnet/api.h
lnet/lnet/lib-eq.c

index 679da9e..6ba7cac 100644 (file)
@@ -145,12 +145,10 @@ int LNetMDUnlink(struct lnet_handle_md md_in);
  * that can be stored in an EQ. The struct lnet_event defines a structure that
  * holds the information about with an event.
  *
  * that can be stored in an EQ. The struct lnet_event defines a structure that
  * holds the information about with an event.
  *
- * There are five functions for dealing with EQs: LNetEQAlloc() is used to
- * create an EQ and allocate the resources needed, while LNetEQFree()
- * releases these resources and free the EQ. LNetEQGet() retrieves the next
- * event from an EQ, and LNetEQWait() can be used to block a process until
- * an EQ has at least one event. LNetEQPoll() can be used to test or wait
- * on multiple EQs.
+ * There are three functions for dealing with EQs: LNetEQAlloc() is used
+ * to create an EQ and allocate the resources needed, while LNetEQFree()
+ * releases these resources and free the EQ.  LNetEQPoll() can be used
+ * to test or wait on multiple EQs.
  * @{ */
 int LNetEQAlloc(unsigned int      count_in,
                lnet_eq_handler_t  handler,
  * @{ */
 int LNetEQAlloc(unsigned int      count_in,
                lnet_eq_handler_t  handler,
@@ -158,12 +156,6 @@ int LNetEQAlloc(unsigned int          count_in,
 
 int LNetEQFree(struct lnet_handle_eq eventq_in);
 
 
 int LNetEQFree(struct lnet_handle_eq eventq_in);
 
-int LNetEQGet(struct lnet_handle_eq eventq_in,
-             struct lnet_event *event_out);
-
-int LNetEQWait(struct lnet_handle_eq eventq_in,
-              struct lnet_event *event_out);
-
 int LNetEQPoll(struct lnet_handle_eq *eventqs_in,
               int               neq_in,
               signed long       timeout,
 int LNetEQPoll(struct lnet_handle_eq *eventqs_in,
               int               neq_in,
               signed long       timeout,
index f5f2569..6a68e5f 100644 (file)
 /**
  * Create an event queue that has room for \a count number of events.
  *
 /**
  * Create an event queue that has room for \a count number of events.
  *
- * The event queue is circular and older events will be overwritten by new
- * ones if they are not removed in time by the user using the functions
- * LNetEQGet(), LNetEQWait(), or LNetEQPoll(). It is up to the user to
- * determine the appropriate size of the event queue to prevent this loss
- * of events. Note that when EQ handler is specified in \a callback, no
- * event loss can happen, since the handler is run for each event deposited
- * into the EQ.
+ * The event queue is circular and older events will be overwritten by
+ * new ones if they are not removed in time by the user using the
+ * function LNetEQPoll().  It is up to the user to determine the
+ * appropriate size of the event queue to prevent this loss of events.
+ * Note that when EQ handler is specified in \a callback, no event loss
+ * can happen, since the handler is run for each event deposited into
+ * the EQ.
  *
  * \param count The number of events to be stored in the event queue. It
  * will be rounded up to the next power of two.
  *
  * \param count The number of events to be stored in the event queue. It
  * will be rounded up to the next power of two.
@@ -264,58 +264,6 @@ lnet_eq_dequeue_event(struct lnet_eq *eq, struct lnet_event *ev)
        RETURN(rc);
 }
 
        RETURN(rc);
 }
 
-/**
- * A nonblocking function that can be used to get the next event in an EQ.
- * If an event handler is associated with the EQ, the handler will run before
- * this function returns successfully. The event is removed from the queue.
- *
- * \param eventq A handle for the event queue.
- * \param event On successful return (1 or -EOVERFLOW), this location will
- * hold the next event in the EQ.
- *
- * \retval 0         No pending event in the EQ.
- * \retval 1         Indicates success.
- * \retval -ENOENT    If \a eventq does not point to a valid EQ.
- * \retval -EOVERFLOW Indicates success (i.e., an event is returned) and that
- * at least one event between this event and the last event obtained from the
- * EQ has been dropped due to limited space in the EQ.
- */
-int
-LNetEQGet(struct lnet_handle_eq eventq, struct lnet_event *event)
-{
-       int which;
-
-       return LNetEQPoll(&eventq, 1, 0,
-                        event, &which);
-}
-EXPORT_SYMBOL(LNetEQGet);
-
-/**
- * Block the calling process until there is an event in the EQ.
- * If an event handler is associated with the EQ, the handler will run before
- * this function returns successfully. This function returns the next event
- * in the EQ and removes it from the EQ.
- *
- * \param eventq A handle for the event queue.
- * \param event On successful return (1 or -EOVERFLOW), this location will
- * hold the next event in the EQ.
- *
- * \retval 1         Indicates success.
- * \retval -ENOENT    If \a eventq does not point to a valid EQ.
- * \retval -EOVERFLOW Indicates success (i.e., an event is returned) and that
- * at least one event between this event and the last event obtained from the
- * EQ has been dropped due to limited space in the EQ.
- */
-int
-LNetEQWait(struct lnet_handle_eq eventq, struct lnet_event *event)
-{
-       int which;
-
-       return LNetEQPoll(&eventq, 1, MAX_SCHEDULE_TIMEOUT,
-                         event, &which);
-}
-EXPORT_SYMBOL(LNetEQWait);
-
 static int
 lnet_eq_wait_locked(signed long *timeout)
 __must_hold(&the_lnet.ln_eq_wait_lock)
 static int
 lnet_eq_wait_locked(signed long *timeout)
 __must_hold(&the_lnet.ln_eq_wait_lock)