Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device
@ 2021-01-28  5:58 Rocco Yue
  2021-01-30  3:07 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Rocco Yue @ 2021-01-28  5:58 UTC (permalink / raw)
  To: David S . Miller, Hideaki YOSHIFUJI, Jakub Kicinski, Matthias Brugger
  Cc: netdev, linux-kernel, linux-arm-kernel, linux-mediatek,
	wsd_upstream, Rocco Yue

PUREIP device such as ccmni does not need kernel to generate
link-local address in any addr_gen_mode, generally, it shall
use the IPv6 Interface Identifier, as provided by the GGSN,
to create its IPv6 link-ocal Unicast Address.

Signed-off-by: Rocco Yue <rocco.yue@mediatek.com>
---
 net/ipv6/addrconf.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 9edc5bb2d531..5e8134d3e704 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3337,7 +3337,8 @@ static void addrconf_dev_config(struct net_device *dev)
 	    (dev->type != ARPHRD_IPGRE) &&
 	    (dev->type != ARPHRD_TUNNEL) &&
 	    (dev->type != ARPHRD_NONE) &&
-	    (dev->type != ARPHRD_RAWIP)) {
+	    (dev->type != ARPHRD_RAWIP) &&
+	    (dev->type != ARPHRD_PUREIP)) {
 		/* Alas, we support only Ethernet autoconfiguration. */
 		idev = __in6_dev_get(dev);
 		if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP &&
@@ -3350,6 +3351,12 @@ static void addrconf_dev_config(struct net_device *dev)
 	if (IS_ERR(idev))
 		return;
 
+	/* this device type doesn't need to generate
+	 * link-local address in any addr_gen_mode
+	 */
+	if (dev->type == ARPHRD_PUREIP)
+		return;
+
 	/* this device type has no EUI support */
 	if (dev->type == ARPHRD_NONE &&
 	    idev->cnf.addr_gen_mode == IN6_ADDR_GEN_MODE_EUI64)
-- 
2.18.0


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

* Re: [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device
  2021-01-28  5:58 [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device Rocco Yue
@ 2021-01-30  3:07 ` Jakub Kicinski
       [not found]   ` <1612418761.1817.19.camel@mbjsdccf07>
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2021-01-30  3:07 UTC (permalink / raw)
  To: Rocco Yue
  Cc: David S . Miller, Hideaki YOSHIFUJI, Matthias Brugger, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek, wsd_upstream

On Thu, 28 Jan 2021 13:58:09 +0800 Rocco Yue wrote:
> PUREIP device such as ccmni does not need kernel to generate
> link-local address in any addr_gen_mode, generally, it shall
> use the IPv6 Interface Identifier, as provided by the GGSN,
> to create its IPv6 link-ocal Unicast Address.
> 
> Signed-off-by: Rocco Yue <rocco.yue@mediatek.com>

There is no ccmni driver in the tree - is this for non-upstream
driver?

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

* Re: [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device
       [not found]     ` <1614045791.6614.3.camel@mbjsdccf07>
@ 2021-02-23  2:45       ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-02-23  2:45 UTC (permalink / raw)
  To: rocco.yue
  Cc: David S . Miller, Hideaki YOSHIFUJI, Matthias Brugger, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek, wsd_upstream

On Tue, 23 Feb 2021 10:03:11 +0800 rocco.yue wrote:
> On Thu, 2021-02-04 at 14:06 +0800, rocco.yue wrote:
> > On Fri, 2021-01-29 at 19:07 -0800, Jakub Kicinski wrote:  
> > > On Thu, 28 Jan 2021 13:58:09 +0800 Rocco Yue wrote:  
>  [...]  
> > > 
> > > There is no ccmni driver in the tree - is this for non-upstream
> > > driver?  
> > 
> > ccmni is the name of MediaTek mobile interface, currently, it is
> > non-upstream driver and we plan to upstream these driver codes this
> > year.
> > 
> > Honestly, the reason why upstreamed this patch is not only that it can
> > be used by ccmni, but also I observed that the current Linux kernel does
> > not generate ipv6 link-local address only when addr_gen_mode ==
> > IN6_ADDR_GEN_MODE_NONE. We hope kernel can add a device type so that no
> > ipv6 link-local address can be generated in any addr_gen_mode.  
> 
> gentle ping for this patch set.

We don't merge patches without upstream users.

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  5:58 [PATCH net-next 2/2] net: ipv6: don't generate link local address on PUREIP device Rocco Yue
2021-01-30  3:07 ` Jakub Kicinski
     [not found]   ` <1612418761.1817.19.camel@mbjsdccf07>
     [not found]     ` <1614045791.6614.3.camel@mbjsdccf07>
2021-02-23  2:45       ` Jakub Kicinski

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git