summaryrefslogtreecommitdiff
path: root/examples/netmap_compat
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2014-06-04 00:42:50 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-06-11 00:29:34 +0200
commit3031749c2df04a63cdcef186dcce3781e61436e8 (patch)
treee2ecf6d8ed4f7347ca4113fe00b77a0876a14246 /examples/netmap_compat
parentd10296d7ea9c7e4f0da51ff2fb9c89b838e06940 (diff)
downloaddpdk-draft-windows-3031749c2df04a63cdcef186dcce3781e61436e8.zip
dpdk-draft-windows-3031749c2df04a63cdcef186dcce3781e61436e8.tar.gz
dpdk-draft-windows-3031749c2df04a63cdcef186dcce3781e61436e8.tar.xz
remove trailing whitespaces
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat]. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'examples/netmap_compat')
-rw-r--r--examples/netmap_compat/Makefile8
-rw-r--r--examples/netmap_compat/bridge/Makefile8
-rw-r--r--examples/netmap_compat/bridge/bridge.c14
-rw-r--r--examples/netmap_compat/lib/compat_netmap.c24
-rw-r--r--examples/netmap_compat/lib/compat_netmap.h8
-rw-r--r--examples/netmap_compat/netmap/netmap.h14
-rw-r--r--examples/netmap_compat/netmap/netmap_user.h12
7 files changed, 44 insertions, 44 deletions
diff --git a/examples/netmap_compat/Makefile b/examples/netmap_compat/Makefile
index 8c9b67a..d398e5f 100644
--- a/examples/netmap_compat/Makefile
+++ b/examples/netmap_compat/Makefile
@@ -1,12 +1,12 @@
# BSD LICENSE
-#
+#
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
# All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@@ -16,7 +16,7 @@
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/examples/netmap_compat/bridge/Makefile b/examples/netmap_compat/bridge/Makefile
index 893264b..13eb229 100644
--- a/examples/netmap_compat/bridge/Makefile
+++ b/examples/netmap_compat/bridge/Makefile
@@ -1,12 +1,12 @@
# BSD LICENSE
-#
+#
# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
# All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
-#
+#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@@ -16,7 +16,7 @@
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c
index e0cef57..d9c892c 100644
--- a/examples/netmap_compat/bridge/bridge.c
+++ b/examples/netmap_compat/bridge/bridge.c
@@ -1,13 +1,13 @@
/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
@@ -17,7 +17,7 @@
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -181,7 +181,7 @@ parse_args(int argc, char **argv)
rte_exit(EXIT_FAILURE, "configs with %u "
"ports are not supported\n",
ports.num + 1);
-
+
}
ports.p[ports.num].str = optarg;
@@ -232,7 +232,7 @@ netmap_port_open(uint32_t idx)
port = ports.p + idx;
- port->fd = rte_netmap_open("/dev/netmap", O_RDWR);
+ port->fd = rte_netmap_open("/dev/netmap", O_RDWR);
rte_snprintf(req.nr_name, sizeof(req.nr_name), "%s", port->str);
req.nr_version = NETMAP_API;
@@ -263,7 +263,7 @@ netmap_port_open(uint32_t idx)
printf("[E] NETMAP mmap failed for fd: %d)\n", port->fd);
return (-ENOMEM);
}
-
+
port->nmif = NETMAP_IF(ports.mem, req.nr_offset);
port->tx_ring = NETMAP_TXRING(port->nmif, 0);
diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index ebb98ff..946fab4 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -1,13 +1,13 @@
/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
@@ -17,7 +17,7 @@
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -92,7 +92,7 @@ struct netmap_state {
static struct netmap_port ports[RTE_MAX_ETHPORTS];
static struct netmap_state netmap;
-static struct fd_port fd_port[COMPAT_NETMAP_MAX_NOFILE];
+static struct fd_port fd_port[COMPAT_NETMAP_MAX_NOFILE];
static const int next_fd_start = RLIMIT_NOFILE + 1;
static rte_spinlock_t netmap_lock;
@@ -288,7 +288,7 @@ netmap_ring_setup(struct netmap_ring *ring, uint8_t port, uint32_t ringid,
ring->flags = 0;
ring->ts.tv_sec = 0;
ring->ts.tv_usec = 0;
-
+
for (j = 0; j < ring->num_slots; j++) {
ring->slot[j].buf_idx = BUF_IDX(port, ringid, j);
ring->slot[j].len = 0;
@@ -487,7 +487,7 @@ rx_sync_ring(struct netmap_ring *ring, uint8_t port, uint16_t ring_number,
ring->avail += n_rx;
n_free_slots -= n_rx;
}
-
+
return 0;
}
@@ -705,7 +705,7 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)
ret = rte_eth_dev_configure(portid, conf->nr_rx_rings,
conf->nr_tx_rings, conf->eth_conf);
-
+
if (ret < 0) {
RTE_LOG(ERR, USER1, "Couldn't configure port %hhu\n", portid);
return (ret);
@@ -725,7 +725,7 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)
ret = rte_eth_rx_queue_setup(portid, i, rx_slots,
conf->socket_id, conf->rx_conf, conf->pool);
-
+
if (ret < 0) {
RTE_LOG(ERR, USER1,
"Couldn't configure RX queue %hu of "
@@ -774,7 +774,7 @@ int rte_netmap_ioctl(int fd, int op, void *param)
if (!FD_VALID(fd)) {
errno = EBADF;
return (-1);
- }
+ }
switch (op) {
@@ -829,7 +829,7 @@ rte_netmap_mmap(void *addr, size_t length,
return ((void *)((uintptr_t)netmap.mem + offset));
}
-/**
+/**
* Return a "fake" file descriptor with a value above RLIMIT_NOFILE so that
* any attempt to use that file descriptor with the usual API will fail.
*/
@@ -869,7 +869,7 @@ rte_netmap_poll(struct pollfd *fds, nfds_t nfds, int timeout)
fds[i].revents = 0;
continue;
}
-
+
idx = FD_TO_IDX(fds[i].fd);
if ((port = fd_port[idx].port) >= RTE_DIM(ports) ||
ports[port].fd != idx) {
diff --git a/examples/netmap_compat/lib/compat_netmap.h b/examples/netmap_compat/lib/compat_netmap.h
index 0971443..f7f2276 100644
--- a/examples/netmap_compat/lib/compat_netmap.h
+++ b/examples/netmap_compat/lib/compat_netmap.h
@@ -1,13 +1,13 @@
/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
@@ -17,7 +17,7 @@
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/examples/netmap_compat/netmap/netmap.h b/examples/netmap_compat/netmap/netmap.h
index 8dba31c..677c8a9 100644
--- a/examples/netmap_compat/netmap/netmap.h
+++ b/examples/netmap_compat/netmap/netmap.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2011 Matteo Landi, Luigi Rizzo. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
- *
+ *
* 3. Neither the name of the authors nor the names of their contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY MATTEO LANDI AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -37,7 +37,7 @@
* Definitions of constants and the structures used by the netmap
* framework, for the part visible to both kernel and userspace.
* Detailed info on netmap is available with "man netmap" or at
- *
+ *
* http://info.iet.unipi.it/~luigi/netmap/
*/
@@ -234,7 +234,7 @@ struct netmap_if {
ssize_t ring_ofs[0];
};
-#ifndef NIOCREGIF
+#ifndef NIOCREGIF
/*
* ioctl names and related fields
*
diff --git a/examples/netmap_compat/netmap/netmap_user.h b/examples/netmap_compat/netmap/netmap_user.h
index 86b1b71..f369592 100644
--- a/examples/netmap_compat/netmap/netmap_user.h
+++ b/examples/netmap_compat/netmap/netmap_user.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2011 Matteo Landi, Luigi Rizzo. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
- *
+ *
* 3. Neither the name of the authors nor the names of their contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY MATTEO LANDI AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -77,7 +77,7 @@
#define NETMAP_BUF_IDX(ring, buf) \
( ((char *)(buf) - ((char *)(ring) + (ring)->buf_ofs) ) / \
- (ring)->nr_buf_size )
+ (ring)->nr_buf_size )
#define NETMAP_RING_NEXT(r, i) \
((i)+1 == (r)->num_slots ? 0 : (i) + 1 )