odp_port_t port_no;
struct netdev *netdev;
struct netdev_saved_flags *sf;
- struct netdev_rx *rx;
+ struct netdev_rxq *rxq;
struct ovs_refcount ref_cnt;
char *type; /* Port type as requested by user. */
};
port->port_no = port_no;
port->netdev = netdev;
port->type = xstrdup(type);
- error = netdev_rx_open(netdev, &port->rx);
+ error = netdev_rxq_open(netdev, &port->rxq);
if (error
&& !(error == EOPNOTSUPP && dpif_netdev_class_is_dummy(dp->class))) {
VLOG_ERR("%s: cannot receive packets on this network device (%s)",
error = netdev_turn_flags_on(netdev, NETDEV_PROMISC, &sf);
if (error) {
- netdev_rx_close(port->rx);
+ netdev_rxq_close(port->rxq);
netdev_close(netdev);
- free(port->rx);
+ free(port->rxq);
free(port);
return error;
}
if (port && ovs_refcount_unref(&port->ref_cnt) == 1) {
netdev_close(port->netdev);
netdev_restore_flags(port->sf);
- netdev_rx_close(port->rx);
+ netdev_rxq_close(port->rxq);
free(port->type);
free(port);
}
\f
inline static void
-dp_netdev_process_rx_port(struct dp_netdev *dp,
+dp_netdev_process_rxq_port(struct dp_netdev *dp,
struct dp_netdev_port *port,
- struct netdev_rx *queue)
+ struct netdev_rxq *rxq)
{
struct ofpbuf *packet[NETDEV_MAX_RX_BATCH];
int error, c;
- error = netdev_rx_recv(queue, packet, &c);
+ error = netdev_rxq_recv(rxq, packet, &c);
if (!error) {
struct pkt_metadata md = PKT_METADATA_INITIALIZER(port->port_no);
int i;
ovs_rwlock_rdlock(&dp->port_rwlock);
HMAP_FOR_EACH (port, node, &dp->ports) {
- if (port->rx && !netdev_is_pmd(port->netdev)) {
- dp_netdev_process_rx_port(dp, port, port->rx);
+ if (port->rxq && !netdev_is_pmd(port->netdev)) {
+ dp_netdev_process_rxq_port(dp, port, port->rxq);
}
}
ovs_rwlock_rdlock(&dp->port_rwlock);
HMAP_FOR_EACH (port, node, &dp->ports) {
- if (port->rx && !netdev_is_pmd(port->netdev)) {
- netdev_rx_wait(port->rx);
+ if (port->rxq && !netdev_is_pmd(port->netdev)) {
+ netdev_rxq_wait(port->rxq);
}
}
ovs_rwlock_unlock(&dp->port_rwlock);
}
-struct rx_poll {
+struct rxq_poll {
struct dp_netdev_port *port;
};
static int
pmd_load_queues(struct pmd_thread *f,
- struct rx_poll **ppoll_list, int poll_cnt)
+ struct rxq_poll **ppoll_list, int poll_cnt)
{
struct dp_netdev *dp = f->dp;
- struct rx_poll *poll_list = *ppoll_list;
+ struct rxq_poll *poll_list = *ppoll_list;
struct dp_netdev_port *port;
int id = f->id;
int index;
struct pmd_thread *f = f_;
struct dp_netdev *dp = f->dp;
unsigned int lc = 0;
- struct rx_poll *poll_list;
+ struct rxq_poll *poll_list;
unsigned int port_seq;
int poll_cnt;
int i;
int i;
for (i = 0; i < poll_cnt; i++) {
- dp_netdev_process_rx_port(dp, poll_list[i].port, poll_list[i].port->rx);
+ dp_netdev_process_rxq_port(dp, poll_list[i].port, poll_list[i].port->rxq);
}
if (lc++ > 1024) {
struct dummy_packet_conn conn OVS_GUARDED;
- FILE *tx_pcap, *rx_pcap OVS_GUARDED;
+ FILE *tx_pcap, *rxq_pcap OVS_GUARDED;
- struct list rxes OVS_GUARDED; /* List of child "netdev_rx_dummy"s. */
+ struct list rxes OVS_GUARDED; /* List of child "netdev_rxq_dummy"s. */
};
/* Max 'recv_queue_len' in struct netdev_dummy. */
#define NETDEV_DUMMY_MAX_QUEUE 100
-struct netdev_rx_dummy {
- struct netdev_rx up;
+struct netdev_rxq_dummy {
+ struct netdev_rxq up;
struct list node; /* In netdev_dummy's "rxes" list. */
struct list recv_queue;
int recv_queue_len; /* list_size(&recv_queue). */
return CONTAINER_OF(netdev, struct netdev_dummy, up);
}
-static struct netdev_rx_dummy *
-netdev_rx_dummy_cast(const struct netdev_rx *rx)
+static struct netdev_rxq_dummy *
+netdev_rxq_dummy_cast(const struct netdev_rxq *rx)
{
ovs_assert(is_dummy_class(netdev_get_class(rx->netdev)));
- return CONTAINER_OF(rx, struct netdev_rx_dummy, up);
+ return CONTAINER_OF(rx, struct netdev_rxq_dummy, up);
}
static void
dummy_packet_conn_set_config(&netdev->conn, args);
- if (netdev->rx_pcap) {
- fclose(netdev->rx_pcap);
+ if (netdev->rxq_pcap) {
+ fclose(netdev->rxq_pcap);
}
- if (netdev->tx_pcap && netdev->tx_pcap != netdev->rx_pcap) {
+ if (netdev->tx_pcap && netdev->tx_pcap != netdev->rxq_pcap) {
fclose(netdev->tx_pcap);
}
- netdev->rx_pcap = netdev->tx_pcap = NULL;
+ netdev->rxq_pcap = netdev->tx_pcap = NULL;
pcap = smap_get(args, "pcap");
if (pcap) {
- netdev->rx_pcap = netdev->tx_pcap = ovs_pcap_open(pcap, "ab");
+ netdev->rxq_pcap = netdev->tx_pcap = ovs_pcap_open(pcap, "ab");
} else {
- const char *rx_pcap = smap_get(args, "rx_pcap");
+ const char *rxq_pcap = smap_get(args, "rxq_pcap");
const char *tx_pcap = smap_get(args, "tx_pcap");
- if (rx_pcap) {
- netdev->rx_pcap = ovs_pcap_open(rx_pcap, "ab");
+ if (rxq_pcap) {
+ netdev->rxq_pcap = ovs_pcap_open(rxq_pcap, "ab");
}
if (tx_pcap) {
netdev->tx_pcap = ovs_pcap_open(tx_pcap, "ab");
return 0;
}
-static struct netdev_rx *
-netdev_dummy_rx_alloc(void)
+static struct netdev_rxq *
+netdev_dummy_rxq_alloc(void)
{
- struct netdev_rx_dummy *rx = xzalloc(sizeof *rx);
+ struct netdev_rxq_dummy *rx = xzalloc(sizeof *rx);
return &rx->up;
}
static int
-netdev_dummy_rx_construct(struct netdev_rx *rx_)
+netdev_dummy_rxq_construct(struct netdev_rxq *rxq_)
{
- struct netdev_rx_dummy *rx = netdev_rx_dummy_cast(rx_);
+ struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
struct netdev_dummy *netdev = netdev_dummy_cast(rx->up.netdev);
ovs_mutex_lock(&netdev->mutex);
}
static void
-netdev_dummy_rx_destruct(struct netdev_rx *rx_)
+netdev_dummy_rxq_destruct(struct netdev_rxq *rxq_)
{
- struct netdev_rx_dummy *rx = netdev_rx_dummy_cast(rx_);
+ struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
struct netdev_dummy *netdev = netdev_dummy_cast(rx->up.netdev);
ovs_mutex_lock(&netdev->mutex);
}
static void
-netdev_dummy_rx_dealloc(struct netdev_rx *rx_)
+netdev_dummy_rxq_dealloc(struct netdev_rxq *rxq_)
{
- struct netdev_rx_dummy *rx = netdev_rx_dummy_cast(rx_);
+ struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
free(rx);
}
static int
-netdev_dummy_rx_recv(struct netdev_rx *rx_, struct ofpbuf **arr, int *c)
+netdev_dummy_rxq_recv(struct netdev_rxq *rxq_, struct ofpbuf **arr, int *c)
{
- struct netdev_rx_dummy *rx = netdev_rx_dummy_cast(rx_);
+ struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
struct netdev_dummy *netdev = netdev_dummy_cast(rx->up.netdev);
struct ofpbuf *packet;
}
static void
-netdev_dummy_rx_wait(struct netdev_rx *rx_)
+netdev_dummy_rxq_wait(struct netdev_rxq *rxq_)
{
- struct netdev_rx_dummy *rx = netdev_rx_dummy_cast(rx_);
+ struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
struct netdev_dummy *netdev = netdev_dummy_cast(rx->up.netdev);
uint64_t seq = seq_read(rx->seq);
}
static int
-netdev_dummy_rx_drain(struct netdev_rx *rx_)
+netdev_dummy_rxq_drain(struct netdev_rxq *rxq_)
{
- struct netdev_rx_dummy *rx = netdev_rx_dummy_cast(rx_);
+ struct netdev_rxq_dummy *rx = netdev_rxq_dummy_cast(rxq_);
struct netdev_dummy *netdev = netdev_dummy_cast(rx->up.netdev);
ovs_mutex_lock(&netdev->mutex);
netdev_dummy_update_flags,
- netdev_dummy_rx_alloc,
- netdev_dummy_rx_construct,
- netdev_dummy_rx_destruct,
- netdev_dummy_rx_dealloc,
- netdev_dummy_rx_recv,
- netdev_dummy_rx_wait,
- netdev_dummy_rx_drain,
+ netdev_dummy_rxq_alloc,
+ netdev_dummy_rxq_construct,
+ netdev_dummy_rxq_destruct,
+ netdev_dummy_rxq_dealloc,
+ netdev_dummy_rxq_recv,
+ netdev_dummy_rxq_wait,
+ netdev_dummy_rxq_drain,
};
static struct ofpbuf *
}
static void
-netdev_dummy_queue_packet__(struct netdev_rx_dummy *rx, struct ofpbuf *packet)
+netdev_dummy_queue_packet__(struct netdev_rxq_dummy *rx, struct ofpbuf *packet)
{
list_push_back(&rx->recv_queue, &packet->list_node);
rx->recv_queue_len++;
netdev_dummy_queue_packet(struct netdev_dummy *dummy, struct ofpbuf *packet)
OVS_REQUIRES(dummy->mutex)
{
- struct netdev_rx_dummy *rx, *prev;
+ struct netdev_rxq_dummy *rx, *prev;
- if (dummy->rx_pcap) {
- ovs_pcap_write(dummy->rx_pcap, packet);
- fflush(dummy->rx_pcap);
+ if (dummy->rxq_pcap) {
+ ovs_pcap_write(dummy->rxq_pcap, packet);
+ fflush(dummy->rxq_pcap);
}
prev = NULL;
LIST_FOR_EACH (rx, node, &dummy->rxes) {
int tap_fd;
};
-struct netdev_rx_linux {
- struct netdev_rx up;
+struct netdev_rxq_linux {
+ struct netdev_rxq up;
bool is_tap;
int fd;
};
return CONTAINER_OF(netdev, struct netdev_linux, up);
}
-static struct netdev_rx_linux *
-netdev_rx_linux_cast(const struct netdev_rx *rx)
+static struct netdev_rxq_linux *
+netdev_rxq_linux_cast(const struct netdev_rxq *rx)
{
ovs_assert(is_netdev_linux_class(netdev_get_class(rx->netdev)));
- return CONTAINER_OF(rx, struct netdev_rx_linux, up);
+ return CONTAINER_OF(rx, struct netdev_rxq_linux, up);
}
\f
static void netdev_linux_update(struct netdev_linux *netdev,
free(netdev);
}
-static struct netdev_rx *
-netdev_linux_rx_alloc(void)
+static struct netdev_rxq *
+netdev_linux_rxq_alloc(void)
{
- struct netdev_rx_linux *rx = xzalloc(sizeof *rx);
+ struct netdev_rxq_linux *rx = xzalloc(sizeof *rx);
return &rx->up;
}
static int
-netdev_linux_rx_construct(struct netdev_rx *rx_)
+netdev_linux_rxq_construct(struct netdev_rxq *rxq_)
{
- struct netdev_rx_linux *rx = netdev_rx_linux_cast(rx_);
+ struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
struct netdev *netdev_ = rx->up.netdev;
struct netdev_linux *netdev = netdev_linux_cast(netdev_);
int error;
}
static void
-netdev_linux_rx_destruct(struct netdev_rx *rx_)
+netdev_linux_rxq_destruct(struct netdev_rxq *rxq_)
{
- struct netdev_rx_linux *rx = netdev_rx_linux_cast(rx_);
+ struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
if (!rx->is_tap) {
close(rx->fd);
}
static void
-netdev_linux_rx_dealloc(struct netdev_rx *rx_)
+netdev_linux_rxq_dealloc(struct netdev_rxq *rxq_)
{
- struct netdev_rx_linux *rx = netdev_rx_linux_cast(rx_);
+ struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
free(rx);
}
}
static int
-netdev_linux_rx_recv_sock(int fd, struct ofpbuf *buffer)
+netdev_linux_rxq_recv_sock(int fd, struct ofpbuf *buffer)
{
size_t size;
ssize_t retval;
}
static int
-netdev_linux_rx_recv_tap(int fd, struct ofpbuf *buffer)
+netdev_linux_rxq_recv_tap(int fd, struct ofpbuf *buffer)
{
ssize_t retval;
size_t size = ofpbuf_tailroom(buffer);
}
static int
-netdev_linux_rx_recv(struct netdev_rx *rx_, struct ofpbuf **packet, int *c)
+netdev_linux_rxq_recv(struct netdev_rxq *rxq_, struct ofpbuf **packet, int *c)
{
- struct netdev_rx_linux *rx = netdev_rx_linux_cast(rx_);
+ struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
struct netdev *netdev = rx->up.netdev;
struct ofpbuf *buffer;
ssize_t retval;
buffer = ofpbuf_new_with_headroom(VLAN_ETH_HEADER_LEN + mtu, DP_NETDEV_HEADROOM);
retval = (rx->is_tap
- ? netdev_linux_rx_recv_tap(rx->fd, buffer)
- : netdev_linux_rx_recv_sock(rx->fd, buffer));
+ ? netdev_linux_rxq_recv_tap(rx->fd, buffer)
+ : netdev_linux_rxq_recv_sock(rx->fd, buffer));
if (retval) {
if (retval != EAGAIN && retval != EMSGSIZE) {
VLOG_WARN_RL(&rl, "error receiving Ethernet packet on %s: %s",
- ovs_strerror(errno), netdev_rx_get_name(rx_));
+ ovs_strerror(errno), netdev_rxq_get_name(rxq_));
}
ofpbuf_delete(buffer);
} else {
}
static void
-netdev_linux_rx_wait(struct netdev_rx *rx_)
+netdev_linux_rxq_wait(struct netdev_rxq *rxq_)
{
- struct netdev_rx_linux *rx = netdev_rx_linux_cast(rx_);
+ struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
poll_fd_wait(rx->fd, POLLIN);
}
static int
-netdev_linux_rx_drain(struct netdev_rx *rx_)
+netdev_linux_rxq_drain(struct netdev_rxq *rxq_)
{
- struct netdev_rx_linux *rx = netdev_rx_linux_cast(rx_);
+ struct netdev_rxq_linux *rx = netdev_rxq_linux_cast(rxq_);
if (rx->is_tap) {
struct ifreq ifr;
- int error = af_inet_ifreq_ioctl(netdev_rx_get_name(rx_), &ifr,
+ int error = af_inet_ifreq_ioctl(netdev_rxq_get_name(rxq_), &ifr,
SIOCGIFTXQLEN, "SIOCGIFTXQLEN");
if (error) {
return error;
\
netdev_linux_update_flags, \
\
- netdev_linux_rx_alloc, \
- netdev_linux_rx_construct, \
- netdev_linux_rx_destruct, \
- netdev_linux_rx_dealloc, \
- netdev_linux_rx_recv, \
- netdev_linux_rx_wait, \
- netdev_linux_rx_drain, \
+ netdev_linux_rxq_alloc, \
+ netdev_linux_rxq_construct, \
+ netdev_linux_rxq_destruct, \
+ netdev_linux_rxq_dealloc, \
+ netdev_linux_rxq_recv, \
+ netdev_linux_rxq_wait, \
+ netdev_linux_rxq_drain, \
}
const struct netdev_class netdev_linux_class =
* Network device implementations may read these members but should not modify
* them.
*
- * None of these members change during the lifetime of a struct netdev_rx. */
-struct netdev_rx {
+ * None of these members change during the lifetime of a struct netdev_rxq. */
+struct netdev_rxq {
struct netdev *netdev; /* Owns a reference to the netdev. */
};
-struct netdev *netdev_rx_get_netdev(const struct netdev_rx *);
+struct netdev *netdev_rxq_get_netdev(const struct netdev_rxq *);
/* Network device class structure, to be defined by each implementation of a
* network device.
*
* - "struct netdev", which represents a network device.
*
- * - "struct netdev_rx", which represents a handle for capturing packets
+ * - "struct netdev_rxq", which represents a handle for capturing packets
* received on a network device
*
* Each of these data structures contains all of the implementation-independent
*
* Four stylized functions accompany each of these data structures:
*
- * "alloc" "construct" "destruct" "dealloc"
- * ------------ ---------------- --------------- --------------
- * netdev ->alloc ->construct ->destruct ->dealloc
- * netdev_rx ->rx_alloc ->rx_construct ->rx_destruct ->rx_dealloc
+ * "alloc" "construct" "destruct" "dealloc"
+ * ------------ ---------------- --------------- --------------
+ * netdev ->alloc ->construct ->destruct ->dealloc
+ * netdev_rxq ->rxq_alloc ->rxq_construct ->rxq_destruct ->rxq_dealloc
*
* Any instance of a given data structure goes through the following life
* cycle:
int (*update_flags)(struct netdev *netdev, enum netdev_flags off,
enum netdev_flags on, enum netdev_flags *old_flags);
-/* ## ------------------- ## */
-/* ## netdev_rx Functions ## */
-/* ## ------------------- ## */
+/* ## -------------------- ## */
+/* ## netdev_rxq Functions ## */
+/* ## -------------------- ## */
/* If a particular netdev class does not support receiving packets, all these
* function pointers must be NULL. */
- /* Life-cycle functions for a netdev_rx. See the large comment above on
+ /* Life-cycle functions for a netdev_rxq. See the large comment above on
* struct netdev_class. */
- struct netdev_rx *(*rx_alloc)(void);
- int (*rx_construct)(struct netdev_rx *);
- void (*rx_destruct)(struct netdev_rx *);
- void (*rx_dealloc)(struct netdev_rx *);
+ struct netdev_rxq *(*rxq_alloc)(void);
+ int (*rxq_construct)(struct netdev_rxq *);
+ void (*rxq_destruct)(struct netdev_rxq *);
+ void (*rxq_dealloc)(struct netdev_rxq *);
/* Attempts to receive batch of packets from 'rx' and place array of pointers
* into '*pkt'. netdev is responsible for allocating buffers.
* Caller is expected to pass array of size MAX_RX_BATCH.
* This function may be set to null if it would always return EOPNOTSUPP
* anyhow. */
- int (*rx_recv)(struct netdev_rx *rx, struct ofpbuf **pkt, int *cnt);
+ int (*rxq_recv)(struct netdev_rxq *rx, struct ofpbuf **pkt, int *cnt);
/* Registers with the poll loop to wake up from the next call to
- * poll_block() when a packet is ready to be received with netdev_rx_recv()
+ * poll_block() when a packet is ready to be received with netdev_rxq_recv()
* on 'rx'. */
- void (*rx_wait)(struct netdev_rx *rx);
+ void (*rxq_wait)(struct netdev_rxq *rx);
/* Discards all packets waiting to be received from 'rx'. */
- int (*rx_drain)(struct netdev_rx *rx);
+ int (*rxq_drain)(struct netdev_rxq *rx);
};
int netdev_register_provider(const struct netdev_class *);
}
}
-/* Attempts to open a netdev_rx handle for obtaining packets received on
- * 'netdev'. On success, returns 0 and stores a nonnull 'netdev_rx *' into
+/* Attempts to open a netdev_rxq handle for obtaining packets received on
+ * 'netdev'. On success, returns 0 and stores a nonnull 'netdev_rxq *' into
* '*rxp'. On failure, returns a positive errno value and stores NULL into
* '*rxp'.
*
* Some kinds of network devices might not support receiving packets. This
* function returns EOPNOTSUPP in that case.*/
int
-netdev_rx_open(struct netdev *netdev, struct netdev_rx **rxp)
+netdev_rxq_open(struct netdev *netdev, struct netdev_rxq **rxp)
OVS_EXCLUDED(netdev_mutex)
{
int error;
- if (netdev->netdev_class->rx_alloc) {
- struct netdev_rx *rx = netdev->netdev_class->rx_alloc();
+ if (netdev->netdev_class->rxq_alloc) {
+ struct netdev_rxq *rx = netdev->netdev_class->rxq_alloc();
if (rx) {
rx->netdev = netdev;
- error = netdev->netdev_class->rx_construct(rx);
+ error = netdev->netdev_class->rxq_construct(rx);
if (!error) {
ovs_mutex_lock(&netdev_mutex);
netdev->ref_cnt++;
*rxp = rx;
return 0;
}
- netdev->netdev_class->rx_dealloc(rx);
+ netdev->netdev_class->rxq_dealloc(rx);
} else {
error = ENOMEM;
}
/* Closes 'rx'. */
void
-netdev_rx_close(struct netdev_rx *rx)
+netdev_rxq_close(struct netdev_rxq *rx)
OVS_EXCLUDED(netdev_mutex)
{
if (rx) {
struct netdev *netdev = rx->netdev;
- netdev->netdev_class->rx_destruct(rx);
- netdev->netdev_class->rx_dealloc(rx);
+ netdev->netdev_class->rxq_destruct(rx);
+ netdev->netdev_class->rxq_dealloc(rx);
netdev_close(netdev);
}
}
* This function may be set to null if it would always return EOPNOTSUPP
* anyhow. */
int
-netdev_rx_recv(struct netdev_rx *rx, struct ofpbuf **buffers, int *cnt)
+netdev_rxq_recv(struct netdev_rxq *rx, struct ofpbuf **buffers, int *cnt)
{
int retval;
- retval = rx->netdev->netdev_class->rx_recv(rx, buffers, cnt);
+ retval = rx->netdev->netdev_class->rxq_recv(rx, buffers, cnt);
if (!retval) {
COVERAGE_INC(netdev_received);
}
/* Arranges for poll_block() to wake up when a packet is ready to be received
* on 'rx'. */
void
-netdev_rx_wait(struct netdev_rx *rx)
+netdev_rxq_wait(struct netdev_rxq *rx)
{
- rx->netdev->netdev_class->rx_wait(rx);
+ rx->netdev->netdev_class->rxq_wait(rx);
}
/* Discards any packets ready to be received on 'rx'. */
int
-netdev_rx_drain(struct netdev_rx *rx)
+netdev_rxq_drain(struct netdev_rxq *rx)
{
- return (rx->netdev->netdev_class->rx_drain
- ? rx->netdev->netdev_class->rx_drain(rx)
+ return (rx->netdev->netdev_class->rxq_drain
+ ? rx->netdev->netdev_class->rxq_drain(rx)
: 0);
}
}
\f
struct netdev *
-netdev_rx_get_netdev(const struct netdev_rx *rx)
+netdev_rxq_get_netdev(const struct netdev_rxq *rx)
{
ovs_assert(rx->netdev->ref_cnt > 0);
return rx->netdev;
}
const char *
-netdev_rx_get_name(const struct netdev_rx *rx)
+netdev_rxq_get_name(const struct netdev_rxq *rx)
{
- return netdev_get_name(netdev_rx_get_netdev(rx));
+ return netdev_get_name(netdev_rxq_get_netdev(rx));
}
static void
* any number of threads on the same or different netdev objects. The
* exceptions are:
*
- * netdev_rx_recv()
- * netdev_rx_wait()
- * netdev_rx_drain()
+ * netdev_rxq_recv()
+ * netdev_rxq_wait()
+ * netdev_rxq_drain()
*
* These functions are conditionally thread-safe: they may be called from
- * different threads only on different netdev_rx objects. (The client may
- * create multiple netdev_rx objects for a single netdev and access each
+ * different threads only on different netdev_rxq objects. (The client may
+ * create multiple netdev_rxq objects for a single netdev and access each
* of those from a different thread.)
*
* NETDEV_FOR_EACH_QUEUE
struct netdev;
struct netdev_class;
-struct netdev_rx;
+struct netdev_rxq;
struct netdev_saved_flags;
struct ofpbuf;
struct in_addr;
int netdev_get_ifindex(const struct netdev *);
/* Packet reception. */
-int netdev_rx_open(struct netdev *, struct netdev_rx **);
-void netdev_rx_close(struct netdev_rx *);
+int netdev_rxq_open(struct netdev *, struct netdev_rxq **);
+void netdev_rxq_close(struct netdev_rxq *);
-const char *netdev_rx_get_name(const struct netdev_rx *);
+const char *netdev_rxq_get_name(const struct netdev_rxq *);
-int netdev_rx_recv(struct netdev_rx *rx, struct ofpbuf **buffers, int *cnt);
-void netdev_rx_wait(struct netdev_rx *);
-int netdev_rx_drain(struct netdev_rx *);
+int netdev_rxq_recv(struct netdev_rxq *rx, struct ofpbuf **buffers, int *cnt);
+void netdev_rxq_wait(struct netdev_rxq *);
+int netdev_rxq_drain(struct netdev_rxq *);
/* Packet transmission. */
int netdev_send(struct netdev *, struct ofpbuf *, bool may_steal);