summaryrefslogtreecommitdiff
path: root/lib/librte_kni/rte_kni.c
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 /lib/librte_kni/rte_kni.c
parentd10296d7ea9c7e4f0da51ff2fb9c89b838e06940 (diff)
downloaddpdk-3031749c2df04a63cdcef186dcce3781e61436e8.zip
dpdk-3031749c2df04a63cdcef186dcce3781e61436e8.tar.gz
dpdk-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 'lib/librte_kni/rte_kni.c')
-rw-r--r--lib/librte_kni/rte_kni.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index a0daa23..89088e7 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.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
@@ -160,7 +160,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
rte_snprintf(intf_name, RTE_KNI_NAMESIZE, conf->name);
rte_snprintf(mz_name, RTE_MEMZONE_NAMESIZE, "KNI_INFO_%s", intf_name);
- mz = kni_memzone_reserve(mz_name, sizeof(struct rte_kni),
+ mz = kni_memzone_reserve(mz_name, sizeof(struct rte_kni),
SOCKET_ID_ANY, 0);
KNI_MZ_CHECK(mz == NULL);
ctx = mz->addr;
@@ -478,7 +478,7 @@ kni_check_request_register(struct rte_kni_ops *ops)
/* check if KNI request ops has been registered*/
if( NULL == ops )
return KNI_REQ_NO_REGISTER;
-
+
if((NULL == ops->change_mtu) && (NULL == ops->config_network_if))
return KNI_REQ_NO_REGISTER;
@@ -489,7 +489,7 @@ int
rte_kni_register_handlers(struct rte_kni *kni,struct rte_kni_ops *ops)
{
enum kni_ops_status req_status;
-
+
if (NULL == ops) {
RTE_LOG(ERR, KNI, "Invalid KNI request operation.\n");
return -1;
@@ -507,7 +507,7 @@ rte_kni_register_handlers(struct rte_kni *kni,struct rte_kni_ops *ops)
return -1;
}
- memcpy(&kni->ops, ops, sizeof(struct rte_kni_ops));
+ memcpy(&kni->ops, ops, sizeof(struct rte_kni_ops));
return 0;
}
@@ -518,17 +518,17 @@ rte_kni_unregister_handlers(struct rte_kni *kni)
RTE_LOG(ERR, KNI, "Invalid kni info.\n");
return -1;
}
-
+
kni->ops.change_mtu = NULL;
kni->ops.config_network_if = NULL;
return 0;
}
-void
+void
rte_kni_close(void)
{
if (kni_fd < 0)
return;
close(kni_fd);
- kni_fd = -1;
+ kni_fd = -1;
}