lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Sep 2020 03:29:17 +0000
From:   Parav Pandit <parav@...dia.com>
To:     David Ahern <dsahern@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     Jiri Pirko <jiri@...dia.com>
Subject: RE: [PATCH net-next v2 8/8] netdevsim: Add support for add and delete
 PCI SF port


> From: David Ahern <dsahern@...il.com>
> Sent: Friday, September 18, 2020 2:01 AM
> 
> On 9/17/20 11:20 AM, Parav Pandit wrote:
> > Simulate PCI SF ports. Allow user to create one or more PCI SF ports.
> >
> > Examples:
> >
> > Create a PCI PF and PCI SF port.
> > $ devlink port add netdevsim/netdevsim10/10 flavour pcipf pfnum 0 $
> > devlink port add netdevsim/netdevsim10/11 flavour pcisf pfnum 0 sfnum
> > 44 $ devlink port show netdevsim/netdevsim10/11
> > netdevsim/netdevsim10/11: type eth netdev eni10npf0sf44 flavour pcisf
> controller 0 pfnum 0 sfnum 44 external true splittable false
> >   function:
> >     hw_addr 00:00:00:00:00:00 state inactive
> >
> > $ devlink port function set netdevsim/netdevsim10/11 hw_addr
> > 00:11:22:33:44:55 state active
> >
> > $ devlink port show netdevsim/netdevsim10/11 -jp {
> >     "port": {
> >         "netdevsim/netdevsim10/11": {
> >             "type": "eth",
> >             "netdev": "eni10npf0sf44",
> 
> I could be missing something, but it does not seem like this patch creates the
> netdevice for the subfunction.
>
The sf port created here is the eswitch port with a valid switch id similar to PF and physical port.
So the netdev created is the representor netdevice.
It is created uniformly for subfunction and pf port flavours.

This series enables user to add PCI PF and subfunction ports.
PF port addition (and its representor netdev) is done in patch 5 [1].
This patch for SF utilizes the same ' struct nsim_port_function' for PF and SF.
Only difference between them is flavour.
[1] https://lore.kernel.org/netdev/20200917172020.26484-6-parav@nvidia.com/

 > 
> >             "flavour": "pcisf",
> >             "controller": 0,
> >             "pfnum": 0,
> >             "sfnum": 44,
> >             "external": true,
> >             "splittable": false,
> >             "function": {
> >                 "hw_addr": "00:11:22:33:44:55",
> >                 "state": "active"
> >             }
> >         }
> >     }
> > }
> >
> > Delete newly added devlink port
> > $ devlink port add netdevsim/netdevsim10/11
> >
> > Add devlink port of flavour 'pcisf' where port index and sfnum are
> > auto assigned by driver.
> > $ devlink port add netdevsim/netdevsim10 flavour pcisf controller 0
> > pfnum 0

Powered by blists - more mailing lists