Skip to content

w1: fixes and bundling replies

David Fries lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3w1: fix netlink refcnt leak on error pathdrivers/w1/w1_netlink.c+26 -181 reply
2/3connector: allow multiple messages to be sent in one packetDocumentation/connector/connector.txt drivers/connector/connector.c include/linux/connector.h+26 -50 replies
3/3w1: optional bundling of netlink kernel repliesDocumentation/connector/connector.txt Documentation/w1/w1.generic Documentation/w1/w1.netlink +3 more+447 -2630 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEvgeniy Polyakov
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] w1: fixes and bundling replies

A program can bundle a sequence of commands in one netlink packet but the kernel was having to reply in many different packets, this adds a flag W1_CN_BUNDLE in the cn_msg.flags to allow the kernel to bundle the replies in to one message. This is opt in to avoid breaking programs that aren't expecting additional messages.

Netlink connector now has a new call cn_netlink_send_multi, which allow sending multiple cn_msg structures in a nlmsghdr structure.

I tested with my client program that will bundle up 14 temperature sensor conversions, then after a delay, bundle up another set of commands to read all 14 with the bundle bit set. I also tested with a two year old version of the software that sends requests two one slave at a time (bundling only the write/read to get the data out), and doesn't have code to read the bundling the this patch adds. Both operate correctly running at the same time.

 Documentation/connector/connector.txt |   15 +-
 Documentation/w1/w1.generic           |    2 +-
 Documentation/w1/w1.netlink           |   13 +-
 drivers/connector/connector.c         |   17 +-
 drivers/w1/w1.h                       |    8 -
 drivers/w1/w1_netlink.c               |  673 ++++++++++++++++++++-------------
 drivers/w1/w1_netlink.h               |   36 ++
 include/linux/connector.h             |    1 +
 8 files changed, 489 insertions(+), 276 deletions(-)

[PATCH 1/3] w1: fix netlink refcnt leak on error path [PATCH 2/3] connector: allow multiple messages to be sent in one [PATCH 3/3] w1: optional bundling of netlink kernel replies