Netdev List
 help / color / mirror / Atom feed
* [PATCH] net: export dev_change_name function
@ 2023-08-01 11:21 Anvesh Jain P
  2023-08-01 12:31 ` Andrew Lunn
  2023-08-01 17:27 ` Jiri Pirko
  0 siblings, 2 replies; 6+ messages in thread
From: Anvesh Jain P @ 2023-08-01 11:21 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Hangbin Liu, Jiri Pirko,
	Heiner Kallweit, Andy Ren
  Cc: netdev, linux-kernel, Venkata Rao Kakani, Vagdhan Kumar,
	Anvesh Jain P

export dev_change_name function to be used by other modules.

Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 69a3e544676c..1dad68e2950c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1254,6 +1254,7 @@ int dev_change_name(struct net_device *dev, const char *newname)
 
 	return err;
 }
+EXPORT_SYMBOL(dev_change_name);
 
 /**
  *	dev_set_alias - change ifalias of a device

base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: export dev_change_name function
  2023-08-01 11:21 [PATCH] net: export dev_change_name function Anvesh Jain P
@ 2023-08-01 12:31 ` Andrew Lunn
  2023-08-01 13:07   ` Anvesh Jain P
  2023-08-01 17:27 ` Jiri Pirko
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2023-08-01 12:31 UTC (permalink / raw)
  To: Anvesh Jain P
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Hangbin Liu, Jiri Pirko,
	Heiner Kallweit, Andy Ren, netdev, linux-kernel,
	Venkata Rao Kakani, Vagdhan Kumar

On Tue, Aug 01, 2023 at 04:51:01PM +0530, Anvesh Jain P wrote:
> export dev_change_name function to be used by other modules.
> 
> Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
> Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>

It would be normal to include a user of the API when exposing an API.

What module needs to change the name of a device? At the moment, only
user space can do this via netlink or an IOCTL.

     Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: export dev_change_name function
  2023-08-01 12:31 ` Andrew Lunn
@ 2023-08-01 13:07   ` Anvesh Jain P
  2023-08-01 14:07     ` Andrew Lunn
  2023-08-01 14:11     ` Eric Dumazet
  0 siblings, 2 replies; 6+ messages in thread
From: Anvesh Jain P @ 2023-08-01 13:07 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Hangbin Liu, Jiri Pirko,
	Heiner Kallweit, Andy Ren, netdev, linux-kernel,
	Venkata Rao Kakani, Vagdhan Kumar



On 8/1/2023 6:01 PM, Andrew Lunn wrote:
> On Tue, Aug 01, 2023 at 04:51:01PM +0530, Anvesh Jain P wrote:
>> export dev_change_name function to be used by other modules.
>>
>> Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
>> Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
> 
> It would be normal to include a user of the API when exposing an API.
> 
> What module needs to change the name of a device? At the moment, only
> user space can do this via netlink or an IOCTL.
> 
>       Andrew
CONFIG_RENAME_DEVICES is the module which needs "dev_change_name" API. 
Our requirement is to change the network device name from kernel space.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: export dev_change_name function
  2023-08-01 13:07   ` Anvesh Jain P
@ 2023-08-01 14:07     ` Andrew Lunn
  2023-08-01 14:11     ` Eric Dumazet
  1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2023-08-01 14:07 UTC (permalink / raw)
  To: Anvesh Jain P
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Hangbin Liu, Jiri Pirko,
	Heiner Kallweit, Andy Ren, netdev, linux-kernel,
	Venkata Rao Kakani, Vagdhan Kumar

> CONFIG_RENAME_DEVICES is the module which needs "dev_change_name" API. Our
> requirement is to change the network device name from kernel space.

Can you give a link to this module. It is very unusual for the kernel
to change the device name. Before accepting this patch, we probably
want a better understanding of the big picture. Which is why we
normally to use the user of an API.

   Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: export dev_change_name function
  2023-08-01 13:07   ` Anvesh Jain P
  2023-08-01 14:07     ` Andrew Lunn
@ 2023-08-01 14:11     ` Eric Dumazet
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2023-08-01 14:11 UTC (permalink / raw)
  To: Anvesh Jain P
  Cc: Andrew Lunn, David S . Miller, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Hangbin Liu, Jiri Pirko,
	Heiner Kallweit, Andy Ren, netdev, linux-kernel,
	Venkata Rao Kakani, Vagdhan Kumar

On Tue, Aug 1, 2023 at 3:08 PM Anvesh Jain P <quic_ajainp@quicinc.com> wrote:
>
>
>
> On 8/1/2023 6:01 PM, Andrew Lunn wrote:
> > On Tue, Aug 01, 2023 at 04:51:01PM +0530, Anvesh Jain P wrote:
> >> export dev_change_name function to be used by other modules.
> >>
> >> Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
> >> Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
> >
> > It would be normal to include a user of the API when exposing an API.
> >
> > What module needs to change the name of a device? At the moment, only
> > user space can do this via netlink or an IOCTL.
> >
> >       Andrew
> CONFIG_RENAME_DEVICES is the module which needs "dev_change_name" API.
> Our requirement is to change the network device name from kernel space.

We do not support out-of-tree code.

You will have to upstream this code first.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: export dev_change_name function
  2023-08-01 11:21 [PATCH] net: export dev_change_name function Anvesh Jain P
  2023-08-01 12:31 ` Andrew Lunn
@ 2023-08-01 17:27 ` Jiri Pirko
  1 sibling, 0 replies; 6+ messages in thread
From: Jiri Pirko @ 2023-08-01 17:27 UTC (permalink / raw)
  To: Anvesh Jain P
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Hangbin Liu, Heiner Kallweit,
	Andy Ren, netdev, linux-kernel, Venkata Rao Kakani, Vagdhan Kumar

Tue, Aug 01, 2023 at 01:21:01PM CEST, quic_ajainp@quicinc.com wrote:
>export dev_change_name function to be used by other modules.
>
>Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
>Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
>---
> net/core/dev.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/net/core/dev.c b/net/core/dev.c
>index 69a3e544676c..1dad68e2950c 100644
>--- a/net/core/dev.c
>+++ b/net/core/dev.c
>@@ -1254,6 +1254,7 @@ int dev_change_name(struct net_device *dev, const char *newname)
> 
> 	return err;
> }
>+EXPORT_SYMBOL(dev_change_name);
> 
> /**
>  *	dev_set_alias - change ifalias of a device
>
>base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd

nack.
1) there is no in-tree user
2) changing name from anywhere else than userspace does not make any
   sense. I'll eat my shoes if there is a sane reason for it.

Please don't send patches like this.


>-- 
>2.17.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-01 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 11:21 [PATCH] net: export dev_change_name function Anvesh Jain P
2023-08-01 12:31 ` Andrew Lunn
2023-08-01 13:07   ` Anvesh Jain P
2023-08-01 14:07     ` Andrew Lunn
2023-08-01 14:11     ` Eric Dumazet
2023-08-01 17:27 ` Jiri Pirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox