Thread (17 messages) 17 messages, 2 authors, 2025-02-06

Re: [PATCH net-next v5 5/7] tun: Extract the vnet handling code

From: Akihiko Odaki <hidden>
Date: 2025-02-06 06:58:41
Also in: kvm, linux-doc, linux-kselftest, lkml, virtualization

On 2025/02/06 6:12, Willem de Bruijn wrote:
Akihiko Odaki wrote:
quoted
The vnet handling code will be reused by tap.

Signed-off-by: Akihiko Odaki <redacted>
---
  MAINTAINERS            |   2 +-
  drivers/net/tun.c      | 179 +----------------------------------------------
  drivers/net/tun_vnet.h | 184 +++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 187 insertions(+), 178 deletions(-)
quoted
-static inline bool tun_legacy_is_little_endian(unsigned int flags)
-{
-	return !(IS_ENABLED(CONFIG_TUN_VNET_CROSS_LE) &&
-		 (flags & TUN_VNET_BE)) &&
-		virtio_legacy_is_little_endian();
-}
quoted
+static inline bool tun_vnet_legacy_is_little_endian(unsigned int flags)
+{
+	return !(IS_ENABLED(CONFIG_TUN_VNET_CROSS_LE) &&
+		 (flags & TUN_VNET_BE)) &&
+		virtio_legacy_is_little_endian();
+}
In general LGTM. But why did you rename functions while moving them?
Please add an explanation in the commit message for any non obvious
changes like that.
I renamed them to clarify they are in a distinct, decoupled part of 
code. It was obvious in the previous version as they are static 
functions contained in a translation unit, but now they are part of a 
header file so I'm clarifying that with this rename. I will add this 
explanation to the commit message.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help