public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail•com>
To: Neil Horman <nhorman@tuxdriver•com>
Cc: netdev@vger•kernel.org
Subject: Re: [RFC PATCH 0/2] net: alternate proposal for using macvlans with forwarding acceleration
Date: Tue, 01 Oct 2013 23:31:29 -0700	[thread overview]
Message-ID: <524BBDC1.6040000@gmail.com> (raw)
In-Reply-To: <1380140209-24587-1-git-send-email-nhorman@tuxdriver.com>

On 09/25/2013 01:16 PM, Neil Horman wrote:
> John, et al. -
>       As promised, heres my (very rough) first pass at an alternate propsal for
> what you're trying to do with virtual station interfaces here.  Its completely
> untested, but it builds, and I'll be trying to run it over the next few days
> (though I'm sure I got part of the hardware manipulation wrong).  I wanted to
> post it early though so you could get a look at it to see what you did and
> didn't like about it.  Some notes:

Sorry for the delay. I like the idea one nice win here is my macvlan
kvm setup would use the offloads without having to reconfigure.

>
> 1) As discussed, the major effort here is to tie in macvlans with l2 forwarding
> acceleration, rather than creating a new vsi link type.  That should make
> management easier for admins (be it via ovs or some other mechanism).  It
> basically exposes a bit less to the user, which I think is good.
>

The trick here is the offload path may be functionally different from
the non-offload path. The user needs some visibility into this. For
example any qdiscs running on the lowerdev will not be visible from the
accelerated path.

When a new link type was being used I was able to convince myself that
it was a property of the link type. But if we reuse macvlan I think we
need some way to either automatically disable the offload path when this
occurs or provide the user visibility. Maybe a feature flag and a
netif_can_hw_offload() routine is needed?

> 2) I've separated out the l2 forwarding acceleration operations from the
> net_device_operations structure.  I'm not sure I like that yet, but I'm kind on
> leaning that way.  Since a limited set of hardare supports forwarding
> acceleration, it makes for a nice easy way to group functionality without
> polluting the net_device_operations structure.  It also lets us group simmilar
> functions together nicely (I can see a future l3_accel_ops structure if we can
> do l3 flows in hardware).  Anywho, its a divergence from what we've been doing
> so I thought I would call attention to it.
>
> 3) I've included a l2_accel_xmit method in the accel_ops structure for fast path
> forwarding, but I'm not sure I like that.  It seems we should be able to use
> ndo_start_xmit and key off some data to recognize that we should be doing
> hardware forwarding.  I'm not quite sure how to do that yet though.  Something
> to think about.

Without a specific xmit routine though you will be adding operations in
the common case for a special case. Having a new op fixes this.

>
> 4) I've borrowed heavily from your vsi work of course just to get this building.
> I think theres probbaly alot of consolidation that can be done in the code that
> I added to ixgbe_main.c to make it smaller.  Again, I just wanted to post this
> so you could speak up if you though this was all crap before I wen't too far
> down the rabbit hole.

There was some consolidation needed in my original RFC as well. I can
help clean some of this stuff up if you want.

.John

-- 
John Fastabend         Intel Corporation

  parent reply	other threads:[~2013-10-02  6:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 18:45 [RFC PATCH 0/4] Series short description John Fastabend
2013-09-11 18:46 ` [RFC PATCH 1/4] net: rtnetlink: make priv_size a function for devs with dynamic size John Fastabend
2013-09-11 18:46 ` [RFC PATCH 2/4] net: Add lower dev list helpers John Fastabend
2013-09-14 12:27   ` Veaceslav Falico
2013-09-14 20:43     ` John Fastabend
2013-09-14 21:14       ` Veaceslav Falico
2013-09-11 18:47 ` [RFC PATCH 3/4] net: VSI: Add virtual station interface support John Fastabend
2013-09-20 23:12   ` Neil Horman
2013-09-21 17:30     ` John Fastabend
2013-09-22 16:44       ` Neil Horman
2013-09-11 18:47 ` [RFC PATCH 4/4] ixgbe: Adding VSI support to ixgbe John Fastabend
2013-09-25 20:16 ` [RFC PATCH 0/2] net: alternate proposal for using macvlans with forwarding acceleration Neil Horman
2013-09-25 20:16   ` [RFC PATCH 1/2] net: Add layer 2 hardware acceleration operations for macvlan devices Neil Horman
2013-10-02  7:08     ` John Fastabend
2013-10-02 12:53       ` Neil Horman
2013-09-25 20:16   ` [RFC PATCH 2/2] ixgbe: enable l2 forwarding acceleration for macvlans Neil Horman
2013-10-02  6:31   ` John Fastabend [this message]
2013-10-02 13:28     ` [RFC PATCH 0/2] net: alternate proposal for using macvlans with forwarding acceleration Neil Horman
2013-10-04 20:10   ` [RFC PATCH 0/2 v2] " Neil Horman
2013-10-04 20:10     ` [PATCH 1/2] net: Add layer 2 hardware acceleration operations for macvlan devices Neil Horman
2013-10-07 19:52       ` David Miller
2013-10-07 21:20         ` Neil Horman
2013-10-07 21:34           ` David Miller
2013-10-07 22:39             ` John Fastabend
2013-10-08  0:52               ` Neil Horman
2013-10-04 20:10     ` [PATCH 2/2] ixgbe: enable l2 forwarding acceleration for macvlans Neil Horman
2013-10-07 22:09     ` [RFC PATCH 0/2 v2] net: alternate proposal for using macvlans with forwarding acceleration John Fastabend
2013-10-08  1:08       ` Neil Horman
2013-10-11 18:43   ` [RFC PATCH 0/2 v3] " Neil Horman
2013-10-11 18:43     ` [PATCH 1/2] net: Add layer 2 hardware acceleration operations for macvlan devices Neil Horman
2013-10-13 20:46       ` John Fastabend
2013-10-14 10:48         ` Neil Horman
2013-10-11 18:43     ` [PATCH 2/2] ixgbe: enable l2 forwarding acceleration for macvlans Neil Horman
2013-10-13 20:48       ` John Fastabend
2013-10-14 10:50         ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524BBDC1.6040000@gmail.com \
    --to=john.fastabend@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nhorman@tuxdriver$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox