From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly
Date: Mon, 31 Aug 2015 10:54:52 -0700 [thread overview]
Message-ID: <20150831105452.00006230@unknown> (raw)
In-Reply-To: <1440798961-17326-12-git-send-email-catherine.sullivan@intel.com>
On Fri, 28 Aug 2015 17:55:57 -0400
Catherine Sullivan <catherine.sullivan@intel.com> wrote:
> From: Mitch Williams <mitch.a.williams@intel.com>
>
> Use the capabilities passed to us by the PF driver to control VF driver
> behavior. In the process, clean up the VLAN add/remove code so it's not
> a horrible morass of ifdefs.
In this case I think the description should read:
Use the capabilities passed to us by the PF driver to control VF driver
behavior.
And drop the second sentence as it doesn't make sense.
>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I1050eaf12b658a26fea6813047c9964163c70a73
> ---
> drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> index 53ecc09..4eff523 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> @@ -730,6 +730,8 @@ static int i40evf_vlan_rx_add_vid(struct net_device *netdev,
> {
> struct i40evf_adapter *adapter = netdev_priv(netdev);
>
> + if (!VLAN_ALLOWED(adapter))
> + return -EIO;
> if (i40evf_add_vlan(adapter, vid) == NULL)
> return -ENOMEM;
> return 0;
> @@ -745,8 +747,11 @@ static int i40evf_vlan_rx_kill_vid(struct net_device *netdev,
> {
> struct i40evf_adapter *adapter = netdev_priv(netdev);
>
> - i40evf_del_vlan(adapter, vid);
> - return 0;
> + if (VLAN_ALLOWED(adapter)) {
> + i40evf_del_vlan(adapter, vid);
> + return 0;
> + }
> + return -EIO;
> }
>
> /**
next prev parent reply other threads:[~2015-08-31 17:54 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 21:55 [Intel-wired-lan] [next PATCH S13 00/15] i40e/i40evf updates Catherine Sullivan
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 01/15] i40e/i40evf: add handling of writeback descriptor Catherine Sullivan
2015-09-16 17:47 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 02/15] i40e/i40evf: add GetStatus command for nvmupdate Catherine Sullivan
2015-09-09 21:30 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 03/15] i40e/i40evf: add wait states to NVM state machine Catherine Sullivan
2015-09-09 21:40 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 04/15] i40e/i40evf: add exec_aq command to nvmupdate utility Catherine Sullivan
2015-09-09 21:46 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 05/15] i40e/i40evf: add get AQ result " Catherine Sullivan
2015-09-09 21:50 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 06/15] i40e: Support FW CEE DCB UP to TC map nibble swap Catherine Sullivan
2015-09-09 21:52 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 07/15] i40evf: detect reset more reliably Catherine Sullivan
2015-09-16 17:46 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 08/15] i40e/i40evf: clean up some code Catherine Sullivan
2015-09-09 22:28 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 09/15] i40evf: Fix check_tx_hang Catherine Sullivan
2015-09-09 22:30 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 10/15] i40e: refactor code to remove indent Catherine Sullivan
2015-09-09 22:32 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 11/15] i40evf: use capabilities flags properly Catherine Sullivan
2015-08-31 17:54 ` Jesse Brandeburg [this message]
2015-09-09 22:35 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 12/15] i40e/i40evf: pass QOS handle to VF Catherine Sullivan
2015-09-09 22:43 ` Bowers, AndrewX
2015-08-28 21:55 ` [Intel-wired-lan] [next PATCH S13 13/15] i40e: print neato new features Catherine Sullivan
2015-09-09 23:27 ` Bowers, AndrewX
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 14/15] i40e: fix ip-ip GRE encapulation Catherine Sullivan
2015-08-28 23:03 ` Jesse Gross
[not found] ` <E8A77B2FB54C194393A5C2A8E3ED1678266F3BA6@CRSMSX102.amr.corp.intel.com>
2015-09-09 23:32 ` Nelson, Shannon
2015-09-10 0:52 ` Jesse Gross
2015-09-10 4:54 ` Nelson, Shannon
2015-09-10 6:01 ` Jesse Gross
2015-09-10 21:53 ` Nelson, Shannon
2015-09-11 2:12 ` Jesse Gross
2015-09-10 16:15 ` Bowers, AndrewX
2015-09-10 16:56 ` Sullivan, Catherine
2015-08-28 21:56 ` [Intel-wired-lan] [next PATCH S13 15/15] i40e/i40evf: Bump i40e to 1.3.2l and i40evf to 1.3.13 Catherine Sullivan
2015-09-10 16:34 ` Bowers, AndrewX
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=20150831105452.00006230@unknown \
--to=jesse.brandeburg@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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