Re: [ovs-dev] [PATCH net-next v2 3/3] genetlink: remove linux/genetlink.h

2024-03-25 Thread Andy Shevchenko
drop extra space? (I noticed it was originally like this. ... > +#define MODULE_ALIAS_GENL_FAMILY(family) \ > + MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" > family) I would still make this TAB indented.

Re: [ovs-dev] [PATCH net-next 3/3] genetlink: remove linux/genetlink.h

2024-03-11 Thread Andy Shevchenko
efine MODULE_ALIAS_GENL_FAMILY(family) \ > + MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" > family) This is using the macro defined in net.h which seems not being included. -- With Best Regards, Andy Shevchenko _

Re: [ovs-dev] [PATCH net-next v2 1/3] string_helpers: Move string_is_valid() to the header

2023-02-08 Thread Andy Shevchenko
On Wed, Feb 8, 2023 at 6:29 AM Jakub Kicinski wrote: > On Mon, 6 Feb 2023 18:13:12 +0200 Andy Shevchenko wrote: > > +static inline bool string_is_valid(const char *s, int len) > > +{ > > + return memchr(s, '\0', len) ? true : false; > > +} > > I was

Re: [ovs-dev] [PATCH net-next v3 1/3] string_helpers: Move string_is_valid() to the header

2023-02-08 Thread Andy Shevchenko
: > Reviewed-by: Jiri Pirko Thank you! -- With Best Regards, Andy Shevchenko ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

[ovs-dev] [PATCH net-next v3 2/3] genetlink: Use string_is_terminated() helper

2023-02-08 Thread Andy Shevchenko
Use string_is_terminated() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman --- v3: renamed to string_is_terminated (Jakub) v2: added tag and updated subject (Simon) net/netlink/genetlink.c | 4

[ovs-dev] [PATCH net-next v3 3/3] openvswitch: Use string_is_terminated() helper

2023-02-08 Thread Andy Shevchenko
Use string_is_terminated() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman --- v3: renamed to string_is_terminated (Jakub) v2: added tag and updated subject (Simon) net/openvswitch/conntrack.c | 5

[ovs-dev] [PATCH net-next v3 1/3] string_helpers: Move string_is_valid() to the header

2023-02-08 Thread Andy Shevchenko
Move string_is_valid() to the header for wider use. While at it, rename to string_is_terminated() to be precise about its semantics. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman --- v3: renamed to string_is_terminated (Jakub) v2: added tag and updated subject (Simon) include/linux

[ovs-dev] [PATCH net-next v2 1/3] string_helpers: Move string_is_valid() to the header

2023-02-06 Thread Andy Shevchenko
Move string_is_valid() to the header for wider use. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman --- v2: added tag and updated subject (Simon) include/linux/string_helpers.h | 5 + net/tipc/netlink_compat.c | 6 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff

[ovs-dev] [PATCH net-next v2 2/3] genetlink: Use string_is_valid() helper

2023-02-06 Thread Andy Shevchenko
Use string_is_valid() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman --- v2: added tag and updated subject (Simon) net/netlink/genetlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[ovs-dev] [PATCH net-next v2 3/3] openvswitch: Use string_is_valid() helper

2023-02-06 Thread Andy Shevchenko
Use string_is_valid() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Horman --- v2: added tag and updated subject (Simon) net/openvswitch/conntrack.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[ovs-dev] [PATCH v1 1/3] string_helpers: Move string_is_valid() to the header

2023-02-03 Thread Andy Shevchenko
Move string_is_valid() to the header for wider use. Signed-off-by: Andy Shevchenko --- include/linux/string_helpers.h | 5 + net/tipc/netlink_compat.c | 6 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/string_helpers.h b/include/linux

[ovs-dev] [PATCH v1 3/3] openvswitch: Use string_is_valid() helper

2023-02-03 Thread Andy Shevchenko
Use string_is_valid() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko --- net/openvswitch/conntrack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch

[ovs-dev] [PATCH v1 2/3] genetlink: Use string_is_valid() helper

2023-02-03 Thread Andy Shevchenko
Use string_is_valid() helper instead of cpecific memchr() call. This shows better the intention of the call. Signed-off-by: Andy Shevchenko --- net/netlink/genetlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index

Re: [ovs-dev] [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Andy Shevchenko
again it's not more clear. Authors here are going for > a 24-bit number, and masking seems like a clear way to express that. We have some 24-bit APIs (and 48-bit) already in kernel, why not to have get_random_u24() ? -- With Best Regards, Andy Shevchenko ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH v1 1/5] treewide: use prandom_u32_max() when possible

2022-10-06 Thread Andy Shevchenko
; have a chance to flow through subsystem trees. +1 to all arguments for the splitting. I looked a bit into the code I have the interest to, but I won't spam people with not-so-important questions / comments / tags, etc. -- With Best Regards, Andy Shevchenko ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [f2fs-dev] [PATCH v1 3/5] treewide: use get_random_u32() when possible

2022-10-06 Thread Andy Shevchenko
catch. I'll move these to patch #1. I believe coccinelle is able to handle this kind of code as well, so Kees' proposal to use it seems more plausible since it's less error prone and more flexible / powerful. -- With Best Regards, Andy Shevchenko ___

Re: [ovs-dev] [PATCH] net: openvswitch: pass NULL for unused parameters

2020-08-30 Thread Andy Shevchenko
masked_flow_lookup(ti, match->key, mask, _mask_hit); > + flow = masked_flow_lookup(ti, match->key, mask, NULL); > if (flow && ovs_identifier_is_key(>id) && > ovs_flow_cmp_unmasked_key(flow, match)) { > return flow; > -- > 2.18.1 > -- With Best Regards, Andy Shevchenko ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev