aboutsummaryrefslogtreecommitdiff
path: root/pcap-dpdk.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-02-10 12:08:04 -0800
committerGuy Harris <guy@alum.mit.edu>2019-02-10 12:08:04 -0800
commitabeb357041f40ccf2dd715cab5e2860ceb851eb7 (patch)
treea8aa1bf1dcabfcf28c49de8c87408c85aafadb50 /pcap-dpdk.c
parent901a9a3ee8c9e32545e930d43e2a2f5b3490cf49 (diff)
Don't explicitly check for root permission.
Let DPDK tell us if we don't have sufficient permission to use it; rte_eal_init() appears to return -1 and set rte_errno to EACCES in that case, and we now handle that case ourselves.
Diffstat (limited to 'pcap-dpdk.c')
-rw-r--r--pcap-dpdk.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/pcap-dpdk.c b/pcap-dpdk.c
index 9b324e6b..df4bfd49 100644
--- a/pcap-dpdk.c
+++ b/pcap-dpdk.c
@@ -581,16 +581,6 @@ static int dpdk_pre_init(char * ebuf)
return 1;
}
}
- // check for root permission
- // XXX - is it sufficient to call rte_eal_init() and check for
- // EACCES?
- if( geteuid() != 0)
- {
- RTE_LOG(ERR, USER1, "%s\n", DPDK_ERR_PERM_MSG);
- pcap_snprintf(ebuf, PCAP_ERRBUF_SIZE,
- "DPDK requires that it run as root");
- return PCAP_ERROR_PERM_DENIED;
- }
// init EAL
ptr_dpdk_cfg = getenv(DPDK_CFG_ENV_NAME);
// set default log level to debug