From: John Fastabend <hidden> Date: 2012-03-21 00:40:20
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
By default the passthru mode puts the lowerdev into a
promiscuous mode to receive all packets. This behavior
is not changed by this patch. This is a bit problematic
and needs to be solved without IMHO breaking existing
mechanics. Maybe on the first add_fdb we can decrement
the promisc mode? That seems to work reasonable well and
keep existing functionality in place... but requires
an initial add to set things up which is a bit annoying
so maybe a flag is better. I haven't thought too hard
about it yet so any ideas welcome
This patch is a result of Roopa Prabhu's work. Follow up
patches are needed for VEPA and VEB macvlan modes.
Only lightly touch tested at this point.
CC: Roopa Prabhu <redacted>
Signed-off-by: John Fastabend <redacted>
---
drivers/net/macvlan.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2012-03-21 08:34:11
On Tue, Mar 20, 2012 at 05:26:48PM -0700, John Fastabend wrote:
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
By default the passthru mode puts the lowerdev into a
promiscuous mode to receive all packets. This behavior
is not changed by this patch. This is a bit problematic
and needs to be solved without IMHO breaking existing
mechanics. Maybe on the first add_fdb we can decrement
the promisc mode? That seems to work reasonable well and
keep existing functionality in place... but requires
an initial add to set things up which is a bit annoying
so maybe a flag is better.
I think a flag is better, too.
I haven't thought too hard
about it yet so any ideas welcome
This patch is a result of Roopa Prabhu's work. Follow up
patches are needed for VEPA and VEB macvlan modes.
For bridged mode, we need to update the hash tables.
What's needed for VEPA?
quoted hunk
Only lightly touch tested at this point.
CC: Roopa Prabhu <redacted>
Signed-off-by: John Fastabend <redacted>
---
drivers/net/macvlan.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
On 3/20/12 5:26 PM, "John Fastabend" [off-list ref] wrote:
quoted hunk
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
By default the passthru mode puts the lowerdev into a
promiscuous mode to receive all packets. This behavior
is not changed by this patch. This is a bit problematic
and needs to be solved without IMHO breaking existing
mechanics. Maybe on the first add_fdb we can decrement
the promisc mode? That seems to work reasonable well and
keep existing functionality in place... but requires
an initial add to set things up which is a bit annoying
so maybe a flag is better. I haven't thought too hard
about it yet so any ideas welcome
This patch is a result of Roopa Prabhu's work. Follow up
patches are needed for VEPA and VEB macvlan modes.
Only lightly touch tested at this point.
CC: Roopa Prabhu <redacted>
Signed-off-by: John Fastabend <redacted>
---
drivers/net/macvlan.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
Thanks John. Looks good.
I added a few things to your patch below. Yes, I think the promisc check is
required. Made an attempt to add a flag below (I did not get a chance to
think about other approaches there too). Briefly tested it with the br
command.
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2012-03-28 15:52:17
On Wed, Mar 28, 2012 at 08:43:56AM -0700, Roopa Prabhu wrote:
On 3/20/12 5:26 PM, "John Fastabend" [off-list ref] wrote:
quoted
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
By default the passthru mode puts the lowerdev into a
promiscuous mode to receive all packets. This behavior
is not changed by this patch. This is a bit problematic
and needs to be solved without IMHO breaking existing
mechanics. Maybe on the first add_fdb we can decrement
the promisc mode? That seems to work reasonable well and
keep existing functionality in place... but requires
an initial add to set things up which is a bit annoying
so maybe a flag is better. I haven't thought too hard
about it yet so any ideas welcome
...
quoted hunk
Thanks John. Looks good.
I added a few things to your patch below. Yes, I think the promisc check is
required. Made an attempt to add a flag below (I did not get a chance to
think about other approaches there too). Briefly tested it with the br
command.
From: John Fastabend <hidden> Date: 2012-03-28 15:58:50
On 3/28/2012 8:52 AM, Michael S. Tsirkin wrote:
On Wed, Mar 28, 2012 at 08:43:56AM -0700, Roopa Prabhu wrote:
quoted
On 3/20/12 5:26 PM, "John Fastabend" [off-list ref] wrote:
quoted
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
By default the passthru mode puts the lowerdev into a
promiscuous mode to receive all packets. This behavior
is not changed by this patch. This is a bit problematic
and needs to be solved without IMHO breaking existing
mechanics. Maybe on the first add_fdb we can decrement
the promisc mode? That seems to work reasonable well and
keep existing functionality in place... but requires
an initial add to set things up which is a bit annoying
so maybe a flag is better. I haven't thought too hard
about it yet so any ideas welcome
...
quoted
Thanks John. Looks good.
I added a few things to your patch below. Yes, I think the promisc check is
required. Made an attempt to add a flag below (I did not get a chance to
think about other approaches there too). Briefly tested it with the br
command.
So this clears the promisc on the first add which
is a bit annoying. How about a simple flag, set when
we create the macvlan?
Agreed. This probably needs a new attrib maybe IFLA_MACVLAN_FLAGS unless
there already exists a per "kind" (rtnl_link_ops) flags field we can use.
I scanned the code briefly and didn't see any such thing so likely we need
the new attribute.
.John
On 3/28/12 8:58 AM, "John Fastabend" [off-list ref] wrote:
On 3/28/2012 8:52 AM, Michael S. Tsirkin wrote:
quoted
On Wed, Mar 28, 2012 at 08:43:56AM -0700, Roopa Prabhu wrote:
quoted
On 3/20/12 5:26 PM, "John Fastabend" [off-list ref] wrote:
quoted
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
By default the passthru mode puts the lowerdev into a
promiscuous mode to receive all packets. This behavior
is not changed by this patch. This is a bit problematic
and needs to be solved without IMHO breaking existing
mechanics. Maybe on the first add_fdb we can decrement
the promisc mode? That seems to work reasonable well and
keep existing functionality in place... but requires
an initial add to set things up which is a bit annoying
so maybe a flag is better. I haven't thought too hard
about it yet so any ideas welcome
...
quoted
Thanks John. Looks good.
I added a few things to your patch below. Yes, I think the promisc check is
required. Made an attempt to add a flag below (I did not get a chance to
think about other approaches there too). Briefly tested it with the br
command.
So this clears the promisc on the first add which
is a bit annoying. How about a simple flag, set when
we create the macvlan?
Agreed. This probably needs a new attrib maybe IFLA_MACVLAN_FLAGS unless
there already exists a per "kind" (rtnl_link_ops) flags field we can use.
I scanned the code briefly and didn't see any such thing so likely we need
the new attribute.
O ok. That makes sense. Unfortunately I am not sure if I will be able to get
back to this anytime in the near future. If anyone wants to rework this
patch please do.
Thanks.
Roopa
From: John Fastabend <hidden> Date: 2012-03-30 01:06:26
On 3/29/2012 2:26 PM, Roopa Prabhu wrote:
On 3/28/12 8:58 AM, "John Fastabend" [off-list ref] wrote:
quoted
On 3/28/2012 8:52 AM, Michael S. Tsirkin wrote:
quoted
On Wed, Mar 28, 2012 at 08:43:56AM -0700, Roopa Prabhu wrote:
quoted
On 3/20/12 5:26 PM, "John Fastabend" [off-list ref] wrote:
quoted
Add support to add/del and dump the forwarding database
for macvlan passthru mode. The macvlan driver acts like
a Two Port Mac Relay (TPMR 802.1Q-2011) in the passthru
case so adding forwarding rules is just adding the addr
to the uc or mc lists.
[...]
quoted
quoted
So this clears the promisc on the first add which
is a bit annoying. How about a simple flag, set when
we create the macvlan?
Agreed. This probably needs a new attrib maybe IFLA_MACVLAN_FLAGS unless
there already exists a per "kind" (rtnl_link_ops) flags field we can use.
I scanned the code briefly and didn't see any such thing so likely we need
the new attribute.
O ok. That makes sense. Unfortunately I am not sure if I will be able to get
back to this anytime in the near future. If anyone wants to rework this
patch please do.
Thanks.
Roopa
OK I'll fix it up and submit it with the rest of the FDB
patches.
.John