public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: davem@davemloft.net, "Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	netdev@vger.kernel.org, gospo@redhat.com
Subject: Re: [net-next 01/11] ixgb: convert to ndo_fix_features
Date: Fri, 16 Sep 2011 19:50:28 -0700	[thread overview]
Message-ID: <1316227829.27917.19.camel@Joe-Laptop> (raw)
In-Reply-To: <1316225752-1709-2-git-send-email-jeffrey.t.kirsher@intel.com>

On Fri, 2011-09-16 at 19:15 -0700, Jeff Kirsher wrote:
> Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
> Removing this needs deeper surgery.
> diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
[]
> @@ -439,12 +462,14 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (err)
>  		goto err_sw_init;
>  
> -	netdev->features = NETIF_F_SG |
> -			   NETIF_F_HW_CSUM |
> +	netdev->hw_features = NETIF_F_SG |
> +			   NETIF_F_TSO |
> +			   NETIF_F_HW_CSUM;
> +	netdev->features = netdev->hw_features |
>  			   NETIF_F_HW_VLAN_TX |
>  			   NETIF_F_HW_VLAN_RX |
>  			   NETIF_F_HW_VLAN_FILTER;
> -	netdev->features |= NETIF_F_TSO;
> +	netdev->hw_features |= NETIF_F_RXCSUM;

Is there any real reason to do this?
It looks overly complicated for no benefit.

Why not just use something like:

	netdev->hw_features = foo;
	netdev->features = bar;

or maybe use #defines like:

#define FEATURES_DEFAULT (NETIF_F_NETIF_F_SG | NETIF_F_TSO | NETIF_F_HW_CSUM)
#define FEATURES_HW_VLAN (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER)

and
	netdev->features = FEATURES_DEFAULT | FEATURES_HW_VLAN;
	netdev->hw_features = FEATURES_DEFAULT | NETIF_F_RXCSUM;

  reply	other threads:[~2011-09-17  2:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17  2:15 [net-next 00/11][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2011-09-17  2:15 ` [net-next 01/11] ixgb: convert to ndo_fix_features Jeff Kirsher
2011-09-17  2:50   ` Joe Perches [this message]
2011-09-17 13:21   ` Michał Mirosław
2011-09-20  0:02     ` Jeff Kirsher
2011-09-23 20:56       ` Michał Mirosław
2011-09-24  4:47         ` Jeff Kirsher
2011-10-07 20:47           ` Michał Mirosław
2011-10-08  2:04             ` Jeff Kirsher
2011-09-17  2:15 ` [net-next 02/11] ixgbe: remove redundant configuration of tx_sample_rate Jeff Kirsher
2011-09-17  2:15 ` [net-next 03/11] v2 ixgbe: Update packet buffer reservation to correct fdir headroom size Jeff Kirsher
2011-09-17  2:15 ` [net-next 04/11] ixgbe: make ixgbe_up and ixgbe_up_complete void functions Jeff Kirsher
2011-09-17  2:15 ` [net-next 05/11] ixgbe: Add missing code for enabling overheat sensor interrupt Jeff Kirsher
2011-09-17  2:15 ` [net-next 06/11] ixgbe: Add SFP support for missed 82598 PHY Jeff Kirsher
2011-09-17  2:15 ` [net-next 07/11] ixgbe: drop adapter from ixgbe_fso call documentation Jeff Kirsher
2011-09-17  2:15 ` [net-next 08/11] ixgbe: Make better use of memory allocations in one-buffer mode w/ RSC Jeff Kirsher
2011-09-17  2:15 ` [net-next 09/11] ixgbe: cleanup some register reads Jeff Kirsher
2011-09-17  2:15 ` [net-next 10/11] ixgbe: fix FCRTL/H register dump for X540 Jeff Kirsher
2011-09-17  2:15 ` [net-next 11/11] ixgbe: remove duplicate netif_tx_start_all_queues Jeff Kirsher

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=1316227829.27917.19.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=netdev@vger.kernel.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