Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-21 Thread Igor Russkikh
> Right. I did not see how *not* to strip the sectag in the h/w back then, > I'll have another look because that would improve things a lot. > > @all: do other MACsec offloading hardware allow not to stip the sectag? I've just checked this, and see an action option in our HW classifier to keep m

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-21 Thread Antoine Tenart
Hi Sabrina, On Tue, Aug 20, 2019 at 04:41:19PM +0200, Sabrina Dubroca wrote: > 2019-08-20, 12:01:40 +0200, Antoine Tenart wrote: > > So it seems the ability to enable or disable the offloading on a given > > interface is the main missing feature. I'll add that, however I'll > > probably (at least

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-21 Thread allan.niel...@microchip.com
The 08/21/2019 09:20, Igor Russkikh wrote: > > Talking about packet numbers, can you describe how PN exhaustion is > > handled? I couldn't find much about packet numbers at all in the > > driver patches (I hope the hw doesn't wrap around from 2^32-1 to 0 on > > the same SA). At some point userspa

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-21 Thread allan.niel...@microchip.com
Hi, I can add some information to the HW Antoine is working on, general design of it and the thoughts behind it. See below. The 08/20/2019 16:41, Sabrina Dubroca wrote: > 2019-08-20, 12:01:40 +0200, Antoine Tenart wrote: > > So it seems the ability to enable or disable the offloading on a given >

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-21 Thread Igor Russkikh
> > Talking about packet numbers, can you describe how PN exhaustion is > handled? I couldn't find much about packet numbers at all in the > driver patches (I hope the hw doesn't wrap around from 2^32-1 to 0 on > the same SA). At some point userspace needs to know that we're > getting close to

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-20 Thread Andrew Lunn
> If you look at IPsec offloading, the networking stack builds up the > ESP header, and passes the unencrypted data down to the driver. I'm > wondering if the same would be possible with MACsec offloading: the > macsec virtual interface adds the header (and maybe a dummy ICV), and > then the HW doe

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-20 Thread Sabrina Dubroca
2019-08-20, 12:01:40 +0200, Antoine Tenart wrote: > So it seems the ability to enable or disable the offloading on a given > interface is the main missing feature. I'll add that, however I'll > probably (at least at first): > > - Have the interface to be fully offloaded or fully handled in s/w (wi

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-20 Thread Antoine Tenart
Hi Sabrina, On Fri, Aug 16, 2019 at 03:25:00PM +0200, Sabrina Dubroca wrote: > 2019-08-13, 10:58:17 +0200, Antoine Tenart wrote: > > > > As for the need for xmit / handle_frame ops (for a MAC w/ MACsec > > offloading), I'd say the xmit / handle_frame ops of the real net device > > driver could be

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-20 Thread Antoine Tenart
Hi Andrew, On Tue, Aug 13, 2019 at 06:28:23PM +0200, Andrew Lunn wrote: > > 1) With current implementation it's impossible to install SW macsec engine > > onto > > the device which supports HW offload. That could be a strong limitation in > > cases when user sees HW macsec offload is broken or wo

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-20 Thread Antoine Tenart
Hi Sabrina, On Fri, Aug 16, 2019 at 03:29:59PM +0200, Sabrina Dubroca wrote: > 2019-08-13, 16:18:40 +, Igor Russkikh wrote: > > On 13.08.2019 16:17, Andrew Lunn wrote: > > > That could be a strong limitation in > > cases when user sees HW macsec offload is broken or work differently, and > >

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-16 Thread Sabrina Dubroca
2019-08-13, 16:18:40 +, Igor Russkikh wrote: > On 13.08.2019 16:17, Andrew Lunn wrote: > > On Tue, Aug 13, 2019 at 10:58:17AM +0200, Antoine Tenart wrote: > >> I think this question is linked to the use of a MACsec virtual interface > >> when using h/w offloading. The starting point for me was

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-16 Thread Sabrina Dubroca
2019-08-13, 18:28:23 +0200, Andrew Lunn wrote: > > 1) With current implementation it's impossible to install SW macsec engine > > onto > > the device which supports HW offload. That could be a strong limitation in > > cases when user sees HW macsec offload is broken or work differently, and > > h

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-16 Thread Sabrina Dubroca
2019-08-13, 10:58:17 +0200, Antoine Tenart wrote: > Hi Igor, > > On Sat, Aug 10, 2019 at 01:20:32PM +, Igor Russkikh wrote: > > On 08.08.2019 17:05, Antoine Tenart wrote: > > > > > The Rx and TX handlers are modified to take in account the special case > > > were the MACsec transformation hap

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-14 Thread Florian Fainelli
On 8/13/19 9:28 AM, Andrew Lunn wrote: >> 1) With current implementation it's impossible to install SW macsec engine >> onto >> the device which supports HW offload. That could be a strong limitation in >> cases when user sees HW macsec offload is broken or work differently, and >> he/she >> want

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-14 Thread Antoine Tenart
Hi Andrew, On Tue, Aug 13, 2019 at 06:28:23PM +0200, Andrew Lunn wrote: > > It would also be nice to add extra information to the netlink API to > indicate if HW or SW is being used. In other places where we offload > to accelerators we have such additional information. Yes, that would be very n

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-14 Thread Antoine Tenart
Hi Igor, On Tue, Aug 13, 2019 at 04:18:40PM +, Igor Russkikh wrote: > On 13.08.2019 16:17, Andrew Lunn wrote: > > On Tue, Aug 13, 2019 at 10:58:17AM +0200, Antoine Tenart wrote: > >> I think this question is linked to the use of a MACsec virtual interface > >> when using h/w offloading. The st

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-13 Thread Andrew Lunn
> 1) With current implementation it's impossible to install SW macsec engine > onto > the device which supports HW offload. That could be a strong limitation in > cases when user sees HW macsec offload is broken or work differently, and > he/she > wants to replace it with SW one. > MACSec is a co

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-13 Thread Igor Russkikh
On 13.08.2019 16:17, Andrew Lunn wrote: > On Tue, Aug 13, 2019 at 10:58:17AM +0200, Antoine Tenart wrote: >> I think this question is linked to the use of a MACsec virtual interface >> when using h/w offloading. The starting point for me was that I wanted >> to reuse the data structures and the A

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-13 Thread Andrew Lunn
On Tue, Aug 13, 2019 at 10:58:17AM +0200, Antoine Tenart wrote: > I think this question is linked to the use of a MACsec virtual interface > when using h/w offloading. The starting point for me was that I wanted > to reuse the data structures and the API exposed to the userspace by the > s/w implem

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-13 Thread Igor Russkikh
On 10.08.2019 19:34, Andrew Lunn wrote: > On Thu, Aug 08, 2019 at 04:05:57PM +0200, Antoine Tenart wrote: >> The MACsec configuration is passed to device drivers supporting it >> through macsec_hw_offload() which is called from the MACsec genl >> helpers. This function calls the macsec ops of PH

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-13 Thread Antoine Tenart
Hi Igor, On Sat, Aug 10, 2019 at 01:20:32PM +, Igor Russkikh wrote: > On 08.08.2019 17:05, Antoine Tenart wrote: > > > The Rx and TX handlers are modified to take in account the special case > > were the MACsec transformation happens in the hardware, whether in a PHY > > or in a MAC, as the p

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-12 Thread Antoine Tenart
Hi Andrew, On Sat, Aug 10, 2019 at 06:34:23PM +0200, Andrew Lunn wrote: > On Thu, Aug 08, 2019 at 04:05:57PM +0200, Antoine Tenart wrote: > > This patch introduces the MACsec hardware offloading infrastructure. > > > > The main idea here is to re-use the logic and data structures of the > > softw

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-10 Thread Andrew Lunn
On Thu, Aug 08, 2019 at 04:05:57PM +0200, Antoine Tenart wrote: > This patch introduces the MACsec hardware offloading infrastructure. > > The main idea here is to re-use the logic and data structures of the > software MACsec implementation. This allows not to duplicate definitions > and structure

Re: [PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-10 Thread Igor Russkikh
On 08.08.2019 17:05, Antoine Tenart wrote: > The Rx and TX handlers are modified to take in account the special case > were the MACsec transformation happens in the hardware, whether in a PHY > or in a MAC, as the packets seen by the networking stack on both the Don't you think we may eventually

[PATCH net-next v2 6/9] net: macsec: hardware offloading infrastructure

2019-08-08 Thread Antoine Tenart
This patch introduces the MACsec hardware offloading infrastructure. The main idea here is to re-use the logic and data structures of the software MACsec implementation. This allows not to duplicate definitions and structure storing the same kind of information. It also allows to use a unified gen