git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/tap: fix multi segments capability
[dpdk.git]
/
drivers
/
net
/
cxgbe
/
cxgbe_compat.h
diff --git
a/drivers/net/cxgbe/cxgbe_compat.h
b/drivers/net/cxgbe/cxgbe_compat.h
index
1551cbf
..
03bba9f
100644
(file)
--- a/
drivers/net/cxgbe/cxgbe_compat.h
+++ b/
drivers/net/cxgbe/cxgbe_compat.h
@@
-1,7
+1,7
@@
/*-
* BSD LICENSE
*
/*-
* BSD LICENSE
*
- * Copyright(c) 2014-201
5
Chelsio Communications.
+ * Copyright(c) 2014-201
7
Chelsio Communications.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-226,6
+226,15
@@
static inline int cxgbe_fls(int x)
return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
}
return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
}
+/**
+ * cxgbe_ffs - find first bit set
+ * @x: the word to search
+ */
+static inline int cxgbe_ffs(int x)
+{
+ return x ? __builtin_ffs(x) : 0;
+}
+
static inline unsigned long ilog2(unsigned long n)
{
unsigned int e = 0;
static inline unsigned long ilog2(unsigned long n)
{
unsigned int e = 0;