summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ring.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/ring.h b/ring.h
index f0edd82..0ef42d1 100644
--- a/ring.h
+++ b/ring.h
@@ -102,13 +102,21 @@ static inline void prepare_polling(int sock, struct pollfd *pfd)
pfd->events = POLLIN | POLLRDNORM | POLLERR;
}
-static inline void set_sockopt_tpacket_v2(int sock)
+static inline void __set_sockopt_tpacket(int sock, int val)
{
- int ret, val = TPACKET_V2;
-
- ret = setsockopt(sock, SOL_PACKET, PACKET_VERSION, &val, sizeof(val));
+ int ret = setsockopt(sock, SOL_PACKET, PACKET_VERSION, &val, sizeof(val));
if (ret)
panic("Cannot set tpacketv2!\n");
}
+static inline void set_sockopt_tpacket_v2(int sock)
+{
+ __set_sockopt_tpacket(sock, TPACKET_V2);
+}
+
+static inline void set_sockopt_tpacket_v3(int sock)
+{
+ __set_sockopt_tpacket(sock, TPACKET_V3);
+}
+
#endif /* RING_H */
4489448361213e9c3b749d14900'>diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull DAX updates from Dan Williams: "The completion of Jan's DAX work for 4.10. As I mentioned in the libnvdimm-for-4.10 pull request, these are some final fixes for the DAX dirty-cacheline-tracking invalidation work that was merged through the -mm, ext4, and xfs trees in -rc1. These patches were prepared prior to the merge window, but we waited for 4.10-rc1 to have a stable merge base after all the prerequisites were merged. Quoting Jan on the overall changes in these patches: "So I'd like all these 6 patches to go for rc2. The first three patches fix invalidation of exceptional DAX entries (a bug which is there for a long time) - without these patches data loss can occur on power failure even though user called fsync(2). The other three patches change locking of DAX faults so that ->iomap_begin() is called in a more relaxed locking context and we are safe to start a transaction there for ext4" These have received a build success notification from the kbuild robot, and pass the latest libnvdimm unit tests. There have not been any -next releases since -rc1, so they have not appeared there" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: ext4: Simplify DAX fault path dax: Call ->iomap_begin without entry lock during dax fault dax: Finish fault completely when loading holes dax: Avoid page invalidation races and unnecessary radix tree traversals mm: Invalidate DAX radix tree entries only if appropriate ext2: Return BH_New buffers for zeroed blocks
Diffstat (limited to 'tools/build')