All of lore.kernel.org
 help / color / mirror / Atom feed
* DSA switch
@ 2018-05-02 20:20 Ran Shalit
  2018-05-02 20:56 ` Andrew Lunn
  0 siblings, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-02 20:20 UTC (permalink / raw)
  To: netdev

Hello,

Is it possible to use switch just like external real switch,
connecting all ports to the same subnet ?

In our architecture, we prefer that all IPs connected to board shall
be in the same subnet.

Yet, I am not sure if it is possible with dsa switch, because in dsa
the ports are seen in linux as separated interfaces. If we set all
interfaces to the same subnet, it will be problematic, because cpu
won't know in which interface to send output packets, Right ?

for example, can I use the following configuration ? Does it only
require to config ip address of lan0-lan3 ?

net mask 255.255.0.0
lan0 - 10.1.0.1  ------ connected to PC 10.1.0.2
lan1 - 10.1.0.3
lan2 - 10.1.0.5
lan3 - 10.1.0.7 ------ connected to PC 10.1.0.8

Thank you,
ranran

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

* Re: DSA switch
  2018-05-02 20:20 DSA switch Ran Shalit
@ 2018-05-02 20:56 ` Andrew Lunn
  2018-05-03  6:50   ` Ran Shalit
  2018-05-03 20:35   ` Ran Shalit
  0 siblings, 2 replies; 14+ messages in thread
From: Andrew Lunn @ 2018-05-02 20:56 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
> Hello,
> 
> Is it possible to use switch just like external real switch,
> connecting all ports to the same subnet ?

Yes. Just bridge all ports/interfaces together and put your host IP
address on the bridge.

	Andrew

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

* Re: DSA switch
  2018-05-02 20:56 ` Andrew Lunn
@ 2018-05-03  6:50   ` Ran Shalit
  2018-05-03  7:11     ` Jiri Pirko
  2018-05-03 20:35   ` Ran Shalit
  1 sibling, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-03  6:50 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
>> Hello,
>>
>> Is it possible to use switch just like external real switch,
>> connecting all ports to the same subnet ?
>
> Yes. Just bridge all ports/interfaces together and put your host IP
> address on the bridge.
>
>         Andrew


Hi,

I get error on trying to add bridge.
I am trying to =understand which configuration is missing probably in my kernel,
 I ran strace, but not sure , does it point to any missing configuration ?

root@dm814x-evm:~# ip link add br0 type bridge
RTNETLINK answers: Operation not supported

root@dm814x-evm:~# ./strace ip link add br0 type bridge
execve("/bin/ip", ["ip", "link", "add", "br0", "type", "bridge"], [/*
11 vars */]) = 0
brk(0)                                  = 0x44000
uname({sys="Linux", node="dm814x-evm", ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x400c1000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/lib/tls/v7l/fast-mult/half/libresolv.so.2", O_RDONLY) = -1
ENOENT (No such file or directory)
stat64("/lib/tls/v7l/fast-mult/half", 0xbe8bb3c0) = -1 ENOENT (No such
file or directory)
open("/lib/tls/v7l/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/lib/tls/v7l/fast-mult", 0xbe8bb3c0) = -1 ENOENT (No such file
or directory)
open("/lib/tls/v7l/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/lib/tls/v7l/half", 0xbe8bb3c0) = -1 ENOENT (No such file or directory)
open("/lib/tls/v7l/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/tls/v7l", 0xbe8bb3c0)      = -1 ENOENT (No such file or directory)
open("/lib/tls/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/lib/tls/fast-mult/half", 0xbe8bb3c0) = -1 ENOENT (No such
file or directory)
open("/lib/tls/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/lib/tls/fast-mult", 0xbe8bb3c0) = -1 ENOENT (No such file or directory)
open("/lib/tls/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/tls/half", 0xbe8bb3c0)     = -1 ENOENT (No such file or directory)
open("/lib/tls/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls", 0xbe8bb3c0)          = -1 ENOENT (No such file or directory)
open("/lib/v7l/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/lib/v7l/fast-mult/half", 0xbe8bb3c0) = -1 ENOENT (No such
file or directory)
open("/lib/v7l/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/lib/v7l/fast-mult", 0xbe8bb3c0) = -1 ENOENT (No such file or directory)
open("/lib/v7l/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/v7l/half", 0xbe8bb3c0)     = -1 ENOENT (No such file or directory)
open("/lib/v7l/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/v7l", 0xbe8bb3c0)          = -1 ENOENT (No such file or directory)
open("/lib/fast-mult/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/lib/fast-mult/half", 0xbe8bb3c0) = -1 ENOENT (No such file or
directory)
open("/lib/fast-mult/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/fast-mult", 0xbe8bb3c0)    = -1 ENOENT (No such file or directory)
open("/lib/half/libresolv.so.2", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/half", 0xbe8bb3c0)         = -1 ENOENT (No such file or directory)
open("/lib/libresolv.so.2", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\234
\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=67624, ...}) = 0
mmap2(NULL, 108588, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x40164000
mprotect(0x40174000, 28672, PROT_NONE)  = 0
mmap2(0x4017b000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0x4017b000
mmap2(0x4017d000, 6188, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4017d000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0l\n\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=18080, ...}) = 0
mmap2(NULL, 49364, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x400b2000
mprotect(0x400b6000, 28672, PROT_NONE)  = 0
mmap2(0x400bd000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0x400bd000
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0x'\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=70650, ...}) = 0
mmap2(NULL, 79984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x400d1000
mprotect(0x400dd000, 28672, PROT_NONE)  = 0
mmap2(0x400e4000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb) = 0x400e4000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\240Q\1\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1181160, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x400c2000
mmap2(NULL, 1217096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x4017f000
mprotect(0x4029c000, 28672, PROT_NONE)  = 0
mmap2(0x402a3000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11c) = 0x402a3000
mmap2(0x402a6000, 8776, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x402a6000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x400e5000
set_tls(0x400e54a0, 0x400e5b70, 0x4002867c, 0x400e5b78, 0x40028050) = 0
mprotect(0x402a3000, 8192, PROT_READ)   = 0
mprotect(0x400bd000, 4096, PROT_READ)   = 0
mprotect(0x4017b000, 4096, PROT_READ)   = 0
mprotect(0x40027000, 4096, PROT_READ)   = 0
socket(PF_NETLINK, SOCK_RAW, 0)         = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [1048576], 4) = 0
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=1274, groups=00000000}, [12]) = 0
gettimeofday({1356950670, 688093}, NULL) = 0
send(3, " \0\0\0\20\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
32, 0) = 32
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"4\0\0\0\2\0\0\0\0\0\0\0\372\4\0\0\355\377\377\377
\0\0\0\20\0\5\0\0\0\0\0"..., 8192}], msg_controllen=0, msg_flags=0},
0) = 52
send(3, "\24\0\0\0\22\0\1\3\217l\341P\0\0\0\0\0\0\0\0", 20, 0) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\254\1\0\0\20\0\2\0\217l\341P\372\4\0\0\0\0\4\3\1\0\0\0I\0\1\0\0\0\0\0"...,
16384}], msg_controllen=0, msg_flags=0}, 0) = 2664
brk(0)                                  = 0x44000
brk(0x65000)                            = 0x65000
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\24\0\0\0\3\0\2\0\217l\341P\372\4\0\0\0\0\0\0\1\0\0\0I\0\1\0\0\0\0\0"...,
16384}], msg_controllen=0, msg_flags=0}, 0) = 20
open("/usr/lib//ip/link_bridge.so", O_RDONLY) = -1 ENOENT (No such
file or directory)
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"8\0\0\0\20\0\5\6\220l\341P\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
56}], msg_controllen=0, msg_flags=0}, 0) = 56
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"L\0\0\0\2\0\0\0\220l\341P\372\4\0\0\241\377\377\3778\0\0\0\20\0\5\6\220l\341P"...,
16384}], msg_controllen=0, msg_flags=0}, 0) = 76
dup(2)                                  = 4
fcntl64(4, F_GETFL)                     = 0x20002 (flags O_RDWR|O_LARGEFILE)
fstat64(4, {st_mode=S_IFCHR|0600, st_rdev=makedev(252, 0), ...}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B115200 opost isig icanon echo ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x4011b000
_llseek(4, 0, 0xbe8b7510, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(4, "RTNETLINK answers: Operation not"..., 43RTNETLINK answers:
Operation not supported
) = 43
close(4)                                = 0
munmap(0x4011b000, 4096)                = 0
exit_group(2)                           = ?
root@dm814x-evm:~#


Thank you,
ran

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

* Re: DSA switch
  2018-05-03  6:50   ` Ran Shalit
@ 2018-05-03  7:11     ` Jiri Pirko
  2018-05-03  7:25       ` Ran Shalit
  2018-05-03 13:54       ` Ran Shalit
  0 siblings, 2 replies; 14+ messages in thread
From: Jiri Pirko @ 2018-05-03  7:11 UTC (permalink / raw)
  To: Ran Shalit; +Cc: Andrew Lunn, netdev

Thu, May 03, 2018 at 08:50:52AM CEST, ranshalit@gmail.com wrote:
>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
>>> Hello,
>>>
>>> Is it possible to use switch just like external real switch,
>>> connecting all ports to the same subnet ?
>>
>> Yes. Just bridge all ports/interfaces together and put your host IP
>> address on the bridge.
>>
>>         Andrew
>
>
>Hi,
>
>I get error on trying to add bridge.
>I am trying to =understand which configuration is missing probably in my kernel,
> I ran strace, but not sure , does it point to any missing configuration ?
>
>root@dm814x-evm:~# ip link add br0 type bridge

Is the bridge module enabled in the kernel config?


>RTNETLINK answers: Operation not supported

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

* Re: DSA switch
  2018-05-03  7:11     ` Jiri Pirko
@ 2018-05-03  7:25       ` Ran Shalit
  2018-05-03 13:54       ` Ran Shalit
  1 sibling, 0 replies; 14+ messages in thread
From: Ran Shalit @ 2018-05-03  7:25 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Andrew Lunn, netdev

On Thu, May 3, 2018 at 10:11 AM, Jiri Pirko <jiri@resnulli.us> wrote:
> Thu, May 03, 2018 at 08:50:52AM CEST, ranshalit@gmail.com wrote:
>>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
>>>> Hello,
>>>>
>>>> Is it possible to use switch just like external real switch,
>>>> connecting all ports to the same subnet ?
>>>
>>> Yes. Just bridge all ports/interfaces together and put your host IP
>>> address on the bridge.
>>>
>>>         Andrew
>>
>>
>>Hi,
>>
>>I get error on trying to add bridge.
>>I am trying to =understand which configuration is missing probably in my kernel,
>> I ran strace, but not sure , does it point to any missing configuration ?
>>
>>root@dm814x-evm:~# ip link add br0 type bridge
>
> Is the bridge module enabled in the kernel config?
Yes, I've also added all configuration listed in
https://www.thelinuxfaq.com/355-rtnetlink-answers-operation-not-supported-on-centos
(we old kernel 2.6.37, which support TI's chip)

>
>
>>RTNETLINK answers: Operation not supported

I've managed doing it with brctl instead and it seems to work fine.
ifconfig lan0 0.0.0.0
ifconfig lan1 0.0.0.0
ifconfig lan2 0.0.0.0
ifconfig lan3 0.0.0.0
brctl addbr br0
brctl addif br0 lan0
brctl addif br0 lan1
brctl addif br0 lan2
brctl addif br0 lan3
ifconfig br0 150.42.40.222

Yet, brctl command seems to take  time (about a second till it
returns), and we have a requirement for fast boot,
So, I wander why " ip link add br0 type bridge" command gave those errors.
I also notice in the strace I've pasted here the following:
open("/usr/lib//ip/link_bridge.so", O_RDONLY) = -1 ENOENT (No such
file or directory)
There is really no such file in my filesystem /usr/lib//ip/link_bridge.so.
Why is it missing ?


Thank you,
ranran

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

* Re: DSA switch
  2018-05-03  7:11     ` Jiri Pirko
  2018-05-03  7:25       ` Ran Shalit
@ 2018-05-03 13:54       ` Ran Shalit
  2018-05-03 14:01         ` Andrew Lunn
  1 sibling, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-03 13:54 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Andrew Lunn, netdev

On Thu, May 3, 2018 at 10:11 AM, Jiri Pirko <jiri@resnulli.us> wrote:
> Thu, May 03, 2018 at 08:50:52AM CEST, ranshalit@gmail.com wrote:
>>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
>>>> Hello,
>>>>
>>>> Is it possible to use switch just like external real switch,
>>>> connecting all ports to the same subnet ?
>>>
>>> Yes. Just bridge all ports/interfaces together and put your host IP
>>> address on the bridge.
>>>
>>>         Andrew
>>
>>
>>Hi,
>>
>>I get error on trying to add bridge.
>>I am trying to =understand which configuration is missing probably in my kernel,
>> I ran strace, but not sure , does it point to any missing configuration ?
>>
>>root@dm814x-evm:~# ip link add br0 type bridge
>
> Is the bridge module enabled in the kernel config?
>
>

Hi,

It seems that although the bridge command functions, it takes several
seconds (~6-7 seconds !) from the time it resturns to shell till a
real communication works (ping between 2 PCs connected to switch).
Does it usually takes so much time ?

Thank you,
ranran

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

* Re: DSA switch
  2018-05-03 13:54       ` Ran Shalit
@ 2018-05-03 14:01         ` Andrew Lunn
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Lunn @ 2018-05-03 14:01 UTC (permalink / raw)
  To: Ran Shalit; +Cc: Jiri Pirko, netdev

> It seems that although the bridge command functions, it takes several
> seconds (~6-7 seconds !) from the time it resturns to shell till a
> real communication works (ping between 2 PCs connected to switch).
> Does it usually takes so much time ?

PHY link up can take a second or two. Less if you use interrupts.

What do you have the bridge forwarding delay set to?

I would suggest profiling it, see what is take time, and how you can
tune it.

     Andrew

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

* Re: DSA switch
  2018-05-02 20:56 ` Andrew Lunn
  2018-05-03  6:50   ` Ran Shalit
@ 2018-05-03 20:35   ` Ran Shalit
  2018-05-03 20:41     ` Andrew Lunn
  1 sibling, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-03 20:35 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
>> Hello,
>>
>> Is it possible to use switch just like external real switch,
>> connecting all ports to the same subnet ?
>
> Yes. Just bridge all ports/interfaces together and put your host IP
> address on the bridge.

I also noticed that even before making the bridge connection between
all "lanX" interfaces, the ports already communicates with each other
(ping between PCs connected to other ports work).
It is only that communication to cpu was not functioning, till I made
the bridge connection.

Is this the normal behavior (or is it that for some reason my switch
behaves different) ? I mean, is it usually by default "flat switch
except cpu" ?

Regards,
Ran


>
>         Andrew

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

* Re: DSA switch
  2018-05-03 20:35   ` Ran Shalit
@ 2018-05-03 20:41     ` Andrew Lunn
  2018-05-03 20:56       ` Ran Shalit
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Lunn @ 2018-05-03 20:41 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote:
> On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
> >> Hello,
> >>
> >> Is it possible to use switch just like external real switch,
> >> connecting all ports to the same subnet ?
> >
> > Yes. Just bridge all ports/interfaces together and put your host IP
> > address on the bridge.
> 
> I also noticed that even before making the bridge connection between
> all "lanX" interfaces, the ports already communicates with each other

That should not happen. They should be isolated.

What kernel version are you using?

     Andrew

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

* Re: DSA switch
  2018-05-03 20:41     ` Andrew Lunn
@ 2018-05-03 20:56       ` Ran Shalit
  2018-05-03 21:05         ` Andrew Lunn
  0 siblings, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-03 20:56 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Thu, May 3, 2018 at 11:41 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote:
>> On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote:
>> >> Hello,
>> >>
>> >> Is it possible to use switch just like external real switch,
>> >> connecting all ports to the same subnet ?
>> >
>> > Yes. Just bridge all ports/interfaces together and put your host IP
>> > address on the bridge.
>>
>> I also noticed that even before making the bridge connection between
>> all "lanX" interfaces, the ports already communicates with each other
>
> That should not happen. They should be isolated.
>
> What kernel version are you using?
>

I am using kernel 2.6.37, but I think it is not kernel issue, but more
bad patches done on kernel.
It is based on TI's kernel, but with some custom modifications on
driver's switch, to make it work with TI's cpsw switch.
Seems like someone made some bad patch, I'll continue investigating it.
You can ignore the question...

Many thanks a lot for the help,
Ran

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

* Re: DSA switch
  2018-05-03 20:56       ` Ran Shalit
@ 2018-05-03 21:05         ` Andrew Lunn
  2018-05-04  6:59           ` Ran Shalit
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Lunn @ 2018-05-03 21:05 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

> I am using kernel 2.6.37, but I think it is not kernel issue, but more
> bad patches done on kernel.
> It is based on TI's kernel, but with some custom modifications on
> driver's switch, to make it work with TI's cpsw switch.
> Seems like someone made some bad patch, I'll continue investigating it.
> You can ignore the question...
> 
> Many thanks a lot for the help,
> Ran

There is no DSA driver for the cpsw. Are you just using the cpsw to
pass frames to a switch which is supported by DSA?

In theory, mainline CPSW should just work for passing frames to an
external switch. So why not just use mainline?

	 Andrew

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

* Re: DSA switch
  2018-05-03 21:05         ` Andrew Lunn
@ 2018-05-04  6:59           ` Ran Shalit
  2018-05-04  7:26             ` Ran Shalit
  0 siblings, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-04  6:59 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Fri, May 4, 2018 at 12:05 AM, Andrew Lunn <andrew@lunn.ch> wrote:
>> I am using kernel 2.6.37, but I think it is not kernel issue, but more
>> bad patches done on kernel.
>> It is based on TI's kernel, but with some custom modifications on
>> driver's switch, to make it work with TI's cpsw switch.
>> Seems like someone made some bad patch, I'll continue investigating it.
>> You can ignore the question...
>>
>> Many thanks a lot for the help,
>> Ran
>
> There is no DSA driver for the cpsw. Are you just using the cpsw to
> pass frames to a switch which is supported by DSA?
>
> In theory, mainline CPSW should just work for passing frames to an
> external switch. So why not just use mainline?
>

It seems that the bridge functions OK,
so I rather keep on working with it, instead of doing too many
dramatically changes in the custom kernel of TI's which works with our
chip (dm8148).

Yet, I would like to ask about the bridge:
Can a bridge also be used with dsa switch when ports are connected to
different subnets ?

Regards,
Ran

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

* Re: DSA switch
  2018-05-04  6:59           ` Ran Shalit
@ 2018-05-04  7:26             ` Ran Shalit
  2018-05-04 12:56               ` Andrew Lunn
  0 siblings, 1 reply; 14+ messages in thread
From: Ran Shalit @ 2018-05-04  7:26 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev

On Fri, May 4, 2018 at 9:59 AM, Ran Shalit <ranshalit@gmail.com> wrote:
> On Fri, May 4, 2018 at 12:05 AM, Andrew Lunn <andrew@lunn.ch> wrote:
>>> I am using kernel 2.6.37, but I think it is not kernel issue, but more
>>> bad patches done on kernel.
>>> It is based on TI's kernel, but with some custom modifications on
>>> driver's switch, to make it work with TI's cpsw switch.
>>> Seems like someone made some bad patch, I'll continue investigating it.
>>> You can ignore the question...
>>>
>>> Many thanks a lot for the help,
>>> Ran
>>
>> There is no DSA driver for the cpsw. Are you just using the cpsw to
>> pass frames to a switch which is supported by DSA?
>>
>> In theory, mainline CPSW should just work for passing frames to an
>> external switch. So why not just use mainline?
>>
>
> It seems that the bridge functions OK,
> so I rather keep on working with it, instead of doing too many
> dramatically changes in the custom kernel of TI's which works with our
> chip (dm8148).
>
> Yet, I would like to ask about the bridge:
> Can a bridge also be used with dsa switch when ports are connected to
> different subnets ?
>
> Regards,
> Ran



I also see that there is no bridge function in /drivers/net/dsa files
in our kernel (2.6.37)
I can't find any reference to *bridge* or function used in bridge patch:
https://patchwork.ozlabs.org/patch/16578/

So, how is it that bridge worked in my system ?
Does it mean that it actually does the bridging not in the switch but
in the kernel ip stack ?

Thank you,
ran

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

* Re: DSA switch
  2018-05-04  7:26             ` Ran Shalit
@ 2018-05-04 12:56               ` Andrew Lunn
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Lunn @ 2018-05-04 12:56 UTC (permalink / raw)
  To: Ran Shalit; +Cc: netdev

> I also see that there is no bridge function in /drivers/net/dsa files
> in our kernel (2.6.37)

Sorry, i cannot really help you with an ancient kernel like that.

       Andrew

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

end of thread, other threads:[~2018-05-04 12:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 20:20 DSA switch Ran Shalit
2018-05-02 20:56 ` Andrew Lunn
2018-05-03  6:50   ` Ran Shalit
2018-05-03  7:11     ` Jiri Pirko
2018-05-03  7:25       ` Ran Shalit
2018-05-03 13:54       ` Ran Shalit
2018-05-03 14:01         ` Andrew Lunn
2018-05-03 20:35   ` Ran Shalit
2018-05-03 20:41     ` Andrew Lunn
2018-05-03 20:56       ` Ran Shalit
2018-05-03 21:05         ` Andrew Lunn
2018-05-04  6:59           ` Ran Shalit
2018-05-04  7:26             ` Ran Shalit
2018-05-04 12:56               ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.