summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2020-05-15 23:13:36 -0400
committerMatthew Smith <mgsmith@netgate.com>2020-05-18 18:21:53 +0000
commitf4fbfd692fbc04a67e61d83ef477200967a6bc34 (patch)
tree06a0ee32dbcdc109384a1fa5eb4ce934e2381b5b /extras/libmemif/src
parent59a78e966c7813e1bd86310bc0edd8e60a506ccf (diff)
libmemif: cleanup typos
cleaned up typos in documetation while doing a read through. Type: style Change-Id: Id8abbd8d6297ee10490c12a8e62097224f7ec1e1 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'extras/libmemif/src')
-rw-r--r--extras/libmemif/src/libmemif.h64
-rw-r--r--extras/libmemif/src/main.c8
-rw-r--r--extras/libmemif/src/socket.c2
3 files changed, 37 insertions, 37 deletions
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
index 056cdca6383..37540de831e 100644
--- a/extras/libmemif/src/libmemif.h
+++ b/extras/libmemif/src/libmemif.h
@@ -71,7 +71,7 @@ typedef enum
MEMIF_ERR_MAXREG, /*!< max region limit reached */
MEMIF_ERR_MAXRING, /*!< max ring limit reached */
MEMIF_ERR_NO_INTFD, /*!< missing interrupt fd */
- MEMIF_ERR_DISCONNECT, /*!< disconenct received */
+ MEMIF_ERR_DISCONNECT, /*!< disconnect received */
MEMIF_ERR_DISCONNECTED, /*!< peer interface disconnected */
MEMIF_ERR_UNKNOWN_MSG, /*!< unknown message type */
MEMIF_ERR_POLL_CANCEL, /*!< memif_poll_event() was cancelled */
@@ -280,7 +280,7 @@ typedef enum
Custom database does not create a default socket
(see memif_per_thread_init).
Memif connection is stored in the same database as the socket.
- @param secret - otional parameter used as interface autenthication
+ @param secret - optional parameter used as interface authentication
@param num_s2m_rings - number of slave to master rings
@param num_m2s_rings - number of master to slave rings
@param buffer_size - size of buffer in shared memory
@@ -344,11 +344,11 @@ typedef struct
/** \brief Memif queue details
@param region - region index
@param qid - queue id
- @param ring_size - size of ring buffer in sharem memory
+ @param ring_size - size of ring buffer in shared memory
@param flags - ring flags
@param head - ring head pointer
@param tail - ring tail pointer
- @param buffer_size - buffer size on sharem memory
+ @param buffer_size - buffer size on shared memory
*/
typedef struct
{
@@ -435,7 +435,7 @@ typedef struct
*/
uint16_t memif_get_version ();
-/** \biref Memif get queue event file descriptor
+/** \brief Memif get queue event file descriptor
@param conn - memif connection handle
@param qid - queue id
@param[out] fd - returns event file descriptor
@@ -465,7 +465,7 @@ int memif_set_rx_mode (memif_conn_handle_t conn, memif_rx_mode_t rx_mode,
char *memif_strerror (int err_code);
/** \brief Memif get details
- @param conn - memif conenction handle
+ @param conn - memif connection handle
@param md - pointer to memif details struct
@param buf - buffer containing details strings
@param buflen - length of buffer
@@ -478,7 +478,7 @@ int memif_get_details (memif_conn_handle_t conn, memif_details_t * md,
/** \brief Memif initialization
@param on_control_fd_update - if control fd updates inform user to watch new fd
@param app_name - application name (will be truncated to 32 chars)
- @param memif_alloc - cutom memory allocator, NULL = default
+ @param memif_alloc - custom memory allocator, NULL = default
@param memif_realloc - custom memory reallocation, NULL = default
@param memif_free - custom memory free, NULL = default
@@ -503,7 +503,7 @@ int memif_init (memif_control_fd_update_t * on_control_fd_update,
@param private_ctx - private context
@param on_control_fd_update - if control fd updates inform user to watch new fd
@param app_name - application name (will be truncated to 32 chars)
- @param memif_alloc - cutom memory allocator, NULL = default
+ @param memif_alloc - custom memory allocator, NULL = default
@param memif_realloc - custom memory reallocation, NULL = default
@param memif_free - custom memory free, NULL = default
@@ -543,7 +543,7 @@ int memif_per_thread_cleanup (memif_per_thread_main_handle_t * pt_main);
@param on_connect - inform user about connected status
@param on_disconnect - inform user about disconnected status
@param on_interrupt - informs user about interrupt, if set to null user will not be notified about interrupt, user can use memif_get_queue_efd call to get interrupt fd to poll for events
- @param private_ctx - private contex passed back to user with callback
+ @param private_ctx - private context passed back to user with callback
Creates memory interface.
@@ -553,7 +553,7 @@ int memif_per_thread_cleanup (memif_per_thread_main_handle_t * pt_main);
On success new fd is passed to user with memif_control_fd_update_t.
MASTER-MODE -
- Create listener socket and pass fd to user with memif_cntrol_fd_update_t.
+ Create listener socket and pass fd to user with memif_control_fd_update_t.
If this fd is passed to memif_control_fd_handler accept will be called and
new fd will be passed to user with memif_control_fd_update_t.
@@ -566,11 +566,11 @@ int memif_create (memif_conn_handle_t * conn, memif_conn_args_t * args,
memif_interrupt_t * on_interrupt, void *private_ctx);
/** \brief Memif control file descriptor handler
- @param fd - file descriptor on which the event occured
- @param events - event type(s) that occured
+ @param fd - file descriptor on which the event occurred
+ @param events - event type(s) that occurred
- If event occures on any control fd, call memif_control_fd_handler.
- Internal - lib will "identify" fd (timerfd, lsitener, control) and handle event accordingly.
+ If event occurs on any control fd, call memif_control_fd_handler.
+ Internal - lib will "identify" fd (timerfd, listener, control) and handle event accordingly.
FD-TYPE -
TIMERFD -
@@ -587,8 +587,8 @@ int memif_control_fd_handler (int fd, uint8_t events);
/** \brief Memif per thread control file descriptor handler
@param pt_main - per thread main handle
- @param fd - file descriptor on which the event occured
- @param events - event type(s) that occured
+ @param fd - file descriptor on which the event occurred
+ @param events - event type(s) that occurred
Per thread version of memif_control_fd_handler.
@@ -610,10 +610,10 @@ int memif_per_thread_control_fd_handler (memif_per_thread_main_handle_t
int memif_delete (memif_conn_handle_t * conn);
/** \brief Memif buffer enq tx
- @param conn - memif conenction handle
- @param qid - number indentifying queue
+ @param conn - memif connection handle
+ @param qid - number identifying queue
@param bufs - memif buffers
- @param count - number of memif buffers to enque
+ @param count - number of memif buffers to enqueue
@param count_out - returns number of allocated buffers
Slave is producer of buffers.
@@ -626,8 +626,8 @@ int memif_buffer_enq_tx (memif_conn_handle_t conn, uint16_t qid,
uint16_t * count_out);
/** \brief Memif buffer alloc
- @param conn - memif conenction handle
- @param qid - number indentifying queue
+ @param conn - memif connection handle
+ @param qid - number identifying queue
@param bufs - memif buffers
@param count - number of memif buffers to allocate
@param count_out - returns number of allocated buffers
@@ -640,8 +640,8 @@ int memif_buffer_alloc (memif_conn_handle_t conn, uint16_t qid,
uint16_t * count_out, uint16_t size);
/** \brief Memif refill ring
- @param conn - memif conenction handle
- @param qid - number indentifying queue
+ @param conn - memif connection handle
+ @param qid - number identifying queue
@param count - number of buffers to be placed on ring
@param headroom - offset the buffer by headroom
@@ -651,8 +651,8 @@ int memif_refill_queue (memif_conn_handle_t conn, uint16_t qid,
uint16_t count, uint16_t headroom);
/** \brief Memif transmit buffer burst
- @param conn - memif conenction handle
- @param qid - number indentifying queue
+ @param conn - memif connection handle
+ @param qid - number identifying queue
@param bufs - memif buffers
@param count - number of memif buffers to transmit
@param tx - returns number of transmitted buffers
@@ -663,8 +663,8 @@ int memif_tx_burst (memif_conn_handle_t conn, uint16_t qid,
memif_buffer_t * bufs, uint16_t count, uint16_t * tx);
/** \brief Memif receive buffer burst
- @param conn - memif conenction handle
- @param qid - number indentifying queue
+ @param conn - memif connection handle
+ @param qid - number identifying queue
@param bufs - memif buffers
@param count - number of memif buffers to receive
@param rx - returns number of received buffers
@@ -702,9 +702,9 @@ int memif_per_thread_poll_event (memif_per_thread_main_handle_t pt_main,
/** \brief Send signal to stop concurrently running memif_poll_event().
The function, however, does not wait for memif_poll_event() to stop.
- memif_poll_event() may still return simply because an event has occured
+ memif_poll_event() may still return simply because an event has occurred
or the timeout has elapsed, but if called repeatedly in an infinite loop,
- a canceled memif_poll_event() is guaranted to return MEMIF_ERR_POLL_CANCEL
+ a canceled memif_poll_event() is guaranteed to return MEMIF_ERR_POLL_CANCEL
in the shortest possible time.
This feature was not available in the first release.
Use macro MEMIF_HAVE_CANCEL_POLL_EVENT to check if the feature is present.
@@ -762,7 +762,7 @@ int memif_request_connection (memif_conn_handle_t conn);
The first time an interface is assigned a socket, its type is determined.
For master role it's 'listener', for slave role it's 'client'. Each interface
- requires socket of its respective type. Default socket is creted if no
+ requires socket of its respective type. Default socket is created if no
socket handle is passed to memif_create(). It's private context is NULL.
If all interfaces using this socket are deleted, the socket returns
to its default state.
@@ -778,7 +778,7 @@ int memif_create_socket (memif_socket_handle_t * sock, const char *filename,
@param filename - path to socket file
@param private_ctx - private context
- Per thread version of memif_create_sopcket.
+ Per thread version of memif_create_socket.
\return memif_err_t
*/
@@ -801,7 +801,7 @@ int memif_delete_socket (memif_socket_handle_t * sock);
Return constant pointer to socket filename.
- \return cosnt char *
+ \return const char *
*/
const char *memif_get_socket_filename (memif_socket_handle_t sock);
diff --git a/extras/libmemif/src/main.c b/extras/libmemif/src/main.c
index b80dd6481b8..ce96c371f36 100644
--- a/extras/libmemif/src/main.c
+++ b/extras/libmemif/src/main.c
@@ -110,7 +110,7 @@ const char *memif_errlist[ERRLIST_LEN] = { /* MEMIF_ERR_SUCCESS */
/* MEMIF_ERR_NOBUF */
"Not enough memif buffers. There are unreceived data in shared memory.",
/* MEMIF_ERR_NOBUF_DET */
- "Not enough space for memif details in suplied buffer. String data might be malformed.",
+ "Not enough space for memif details in supplied buffer. String data might be malformed.",
/* MEMIF_ERR_INT_WRITE */
"Send interrupt error.",
/* MEMIF_ERR_MFMSG */
@@ -122,7 +122,7 @@ const char *memif_errlist[ERRLIST_LEN] = { /* MEMIF_ERR_SUCCESS */
/* MEMIF_ERR_ID */
"Unmatched interface id.",
/* MEMIF_ERR_ACCSLAVE */
- "Slave cannot accept connection reqest.",
+ "Slave cannot accept connection request.",
/* MEMIF_ERR_ALRCONN */
"Interface is already connected.",
/* MEMIF_ERR_MODE */
@@ -281,7 +281,7 @@ memif_mod_epoll_fd (libmemif_main_t * lm, int fd, uint32_t events)
DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
return -1;
}
- DBG ("fd %d moddified on epoll", fd);
+ DBG ("fd %d modified on epoll", fd);
return 0;
}
@@ -1204,7 +1204,7 @@ memif_create (memif_conn_handle_t * c, memif_conn_args_t * args,
conn->index = index;
- /* try connectiong to master */
+ /* try connecting to master */
err = memif_request_connection (conn);
if ((err != MEMIF_ERR_SUCCESS) && (lm->disconn_slaves == 0))
{
diff --git a/extras/libmemif/src/socket.c b/extras/libmemif/src/socket.c
index 41bb22b570d..24546162ee9 100644
--- a/extras/libmemif/src/socket.c
+++ b/extras/libmemif/src/socket.c
@@ -316,7 +316,7 @@ memif_msg_enq_connected (memif_connection_t * c)
}
/* immediately send disconnect msg */
- /* specifie protocol for disconnect msg err_code
+ /* specify protocol for disconnect msg err_code
so that it will be compatible with VPP? (header/doc) */
int
memif_msg_send_disconnect (int fd, uint8_t * err_string, uint32_t err_code)