From: Shradha Shah <sshah@solarflare•com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: David Miller <davem@davemloft•net>, <netdev@vger•kernel.org>,
<linux-net-drivers@solarflare•com>
Subject: Re: [PATCH net-next 1/2] sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code
Date: Thu, 9 Apr 2015 09:33:10 +0100 [thread overview]
Message-ID: <55263946.6060600@solarflare.com> (raw)
In-Reply-To: <1428523025.25985.224.camel@edumazet-glaptop2.roam.corp.google.com>
Sorry, I will look into this again.
On 08/04/15 20:57, Eric Dumazet wrote:
> On Wed, 2015-04-08 at 12:52 -0700, Eric Dumazet wrote:
>> On Wed, 2015-04-08 at 15:24 +0100, Shradha Shah wrote:
>>> By putting all the efx_{siena,ef10}_sriov_* declarations in
>>> {siena,ef10}_sriov.h, ensure they cannot be called from nic-generic code.
>>> Also fixes up an instance of this, where mcdi.c was calling
>>> efx_siena_sriov_flr.
>>>
>>> The single instance of netdev_ops should call general high level
>>> functions that can then call something adapter specific in efx_nic_type.
>>> We should only do adapter specialisation via efx_nic_type.
>>>
>>> Removal of sriov functionality from the Falcon code means that tests
>>> are needed for the presence of some callbacks.
>>>
>>> Signed-off-by: Shradha Shah <sshah@solarflare•com>
>>> ---
>>> drivers/net/ethernet/sfc/Makefile | 2 +-
>>> drivers/net/ethernet/sfc/ef10.c | 6 ++
>>> drivers/net/ethernet/sfc/ef10_sriov.h | 56 +++++++++++++++++
>>> drivers/net/ethernet/sfc/efx.c | 95 ++++++++++++----------------
>>> drivers/net/ethernet/sfc/efx.h | 7 +++
>>> drivers/net/ethernet/sfc/falcon.c | 10 ---
>>> drivers/net/ethernet/sfc/farch.c | 48 +++++++-------
>>> drivers/net/ethernet/sfc/mcdi.c | 4 +-
>>> drivers/net/ethernet/sfc/net_driver.h | 8 +++
>>> drivers/net/ethernet/sfc/nic.h | 111 ---------------------------------
>>> drivers/net/ethernet/sfc/siena.c | 6 ++
>>> drivers/net/ethernet/sfc/siena_sriov.c | 53 +++++++++++++---
>>> drivers/net/ethernet/sfc/siena_sriov.h | 78 +++++++++++++++++++++++
>>> drivers/net/ethernet/sfc/sriov.c | 64 +++++++++++++++++++
>>> drivers/net/ethernet/sfc/sriov.h | 27 ++++++++
>>> 15 files changed, 368 insertions(+), 207 deletions(-)
>>> create mode 100644 drivers/net/ethernet/sfc/ef10_sriov.h
>>> create mode 100644 drivers/net/ethernet/sfc/siena_sriov.h
>>> create mode 100644 drivers/net/ethernet/sfc/sriov.c
>>> create mode 100644 drivers/net/ethernet/sfc/sriov.h
>>>
>>> diff --git a/drivers/net/ethernet/sfc/Makefile b/drivers/net/ethernet/sfc/Makefile
>>> index 3a83c0d..a08a789 100644
>>> --- a/drivers/net/ethernet/sfc/Makefile
>>> +++ b/drivers/net/ethernet/sfc/Makefile
>>> @@ -3,6 +3,6 @@ sfc-y += efx.o nic.o farch.o falcon.o siena.o ef10.o tx.o \
>>> tenxpress.o txc43128_phy.o falcon_boards.o \
>>> mcdi.o mcdi_port.o mcdi_mon.o ptp.o
>>> sfc-$(CONFIG_SFC_MTD) += mtd.o
>>> -sfc-$(CONFIG_SFC_SRIOV) += siena_sriov.o
>>> +sfc-$(CONFIG_SFC_SRIOV) += sriov.o siena_sriov.o
>>>
>>> obj-$(CONFIG_SFC) += sfc.o
>>> diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
>>> index fbb6cfa..4dab1b9 100644
>>> --- a/drivers/net/ethernet/sfc/ef10.c
>>> +++ b/drivers/net/ethernet/sfc/ef10.c
>>> @@ -15,6 +15,7 @@
>>> #include "nic.h"
>>> #include "workarounds.h"
>>> #include "selftest.h"
>>> +#include "ef10_sriov.h"
>>> #include <linux/in.h>
>>> #include <linux/jhash.h>
>>> #include <linux/wait.h>
>>> @@ -3694,6 +3695,11 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
>>> .sriov_mac_address_changed = efx_ef10_sriov_mac_address_changed,
>>> .sriov_wanted = efx_ef10_sriov_wanted,
>>> .sriov_reset = efx_ef10_sriov_reset,
>>> + .sriov_flr = efx_ef10_sriov_flr,
>>> + .sriov_set_vf_mac = efx_ef10_sriov_set_vf_mac,
>>> + .sriov_set_vf_vlan = efx_ef10_sriov_set_vf_vlan,
>>> + .sriov_set_vf_spoofchk = efx_ef10_sriov_set_vf_spoofchk,
>>> + .sriov_get_vf_config = efx_ef10_sriov_get_vf_config,
>>>
>>
>> Hmm...
>>
>> CC [M] drivers/net/ethernet/sfc/qt202x_phy.o
>> drivers/net/ethernet/sfc/siena.c:1008:22: error: 'efx_siena_sriov_set_vf_mac' undeclared here (not in a function)
>> drivers/net/ethernet/sfc/siena.c:1009:23: error: 'efx_siena_sriov_set_vf_vlan' undeclared here (not in a function)
>> drivers/net/ethernet/sfc/siena.c:1010:27: error: 'efx_siena_sriov_set_vf_spoofchk' undeclared here (not in a function)
>> drivers/net/ethernet/sfc/siena.c:1011:25: error: 'efx_siena_sriov_get_vf_config' undeclared here (not in a function)
>> CC [M] drivers/net/ethernet/sfc/mdio_10g.o
>> make[5]: *** [drivers/net/ethernet/sfc/siena.o] Error 1
>> make[5]: *** Waiting for unfinished jobs....
>> drivers/net/ethernet/sfc/ef10.c:3700:22: error: 'efx_ef10_sriov_set_vf_mac' undeclared here (not in a function)
>> drivers/net/ethernet/sfc/ef10.c:3701:23: error: 'efx_ef10_sriov_set_vf_vlan' undeclared here (not in a function)
>> drivers/net/ethernet/sfc/ef10.c:3702:27: error: 'efx_ef10_sriov_set_vf_spoofchk' undeclared here (not in a function)
>> drivers/net/ethernet/sfc/ef10.c:3703:25: error: 'efx_ef10_sriov_get_vf_config' undeclared here (not in a function)
>> make[5]: *** [drivers/net/ethernet/sfc/ef10.o] Error 1
>>
>
> Please test your driver with :
>
> $ grep PCI_IOV .config
> # CONFIG_PCI_IOV is not set
> $ grep SFC_SRIOV .config
> $
>
>
>
>
--
Many Thanks,
Regards,
Shradha Shah
next prev parent reply other threads:[~2015-04-09 8:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 14:22 [PATCH net-next 0/2] sfc: Nic specific sriov functions, netdev_ops and sriov_configure Shradha Shah
2015-04-08 14:24 ` [PATCH net-next 1/2] sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code Shradha Shah
2015-04-08 19:52 ` Eric Dumazet
2015-04-08 19:57 ` Eric Dumazet
2015-04-08 20:28 ` David Miller
2015-04-09 9:54 ` Shradha Shah
2015-04-09 8:33 ` Shradha Shah [this message]
2015-04-08 14:25 ` [PATCH net-next 2/2] sfc: Enable VF's via a write to the sysfs file sriov_numvfs Shradha Shah
2015-04-08 16:22 ` [PATCH net-next 0/2] sfc: Nic specific sriov functions, netdev_ops and sriov_configure David Miller
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=55263946.6060600@solarflare.com \
--to=sshah@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=linux-net-drivers@solarflare$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/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