[Cluster-devel] [PATCHv2 dlm-next 0/3] fs: dlm: add support to set skb mark value

Alexander Aring aahringo at redhat.com
Fri Jun 26 17:26:47 UTC 2020


Hi,

this patch series adds support for setting the skb mark value as socket
option. It's not possible yet to change this after the socket is
created, although the mark value can be changed afterwards.

How to test it:

1. Setup mark values

echo 0xcafe > /sys/kernel/config/dlm/cluster/mark
echo 0xbeef > /sys/kernel/config/dlm/cluster/comms/2/mark

Note: setting a mark value for local node has no effect.

2. Add some skb mark classifier:

tc qdisc add dev $DEV root handle 1: htb
tc filter add dev $DEV parent 1: u32 match mark 0xcafe 0xffffffff action ok
tc filter add dev $DEV parent 1: u32 match mark 0xbeef 0xffffffff action ok

3. Mount e.g. gfs2

4. dump stats:

tc -s -d filter show dev $DEV

5. Open e.g. wireshark and check the success rate of stats

I have also patches for dlm user space to set these values via
dlm controld.

- Alex

changes since v2:

- rebase on current dlm/next branch
- because rebase it's necessary now to add PATCH 1/3. Please netdev
  maintainers, reply if it's okay to merge this one patch into dlm/next.
  Due other patches in dlm/next it's as well not possible to merge
  everything in net-next. Thanks.

Alexander Aring (3):
  net: sock: add sock_set_mark
  fs: dlm: set skb mark for listen socket
  fs: dlm: set skb mark per peer socket

 fs/dlm/config.c    | 44 ++++++++++++++++++++++++++++++++++++++++++++
 fs/dlm/config.h    |  2 ++
 fs/dlm/lowcomms.c  | 19 +++++++++++++++++++
 include/net/sock.h |  1 +
 net/core/sock.c    |  8 ++++++++
 5 files changed, 74 insertions(+)

-- 
2.26.2




More information about the Cluster-devel mailing list