From: Hauke Mehrtens <hauke@hauke-m.de>
To: Stefan Assmann <sassmann@kpanic.de>, mcgrof@kernel.org
Cc: backports@vger.kernel.org
Subject: Re: [PATCH RFC v2 06/11] backports: igb fixes for linux-3.5
Date: Sun, 22 Dec 2013 19:56:36 +0100 [thread overview]
Message-ID: <52B735E4.5080309@hauke-m.de> (raw)
In-Reply-To: <52B2C2AA.2070407@kpanic.de>
On 12/19/2013 10:55 AM, Stefan Assmann wrote:
> On 18.12.2013 21:35, Hauke Mehrtens wrote:
>> On 12/18/2013 05:08 PM, Stefan Assmann wrote:
>>> - add EEE defines
>>> - add struct ethtool_eee
>>> - backport __skb_alloc_page and __skb_alloc_pages
>>> - add patches/collateral-evolutions/network/82-ethernet/0006-igb_eee.patch
>>>
>>> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
>>> ---
>>> backport/backport-include/linux/ethtool.h | 31 +++++++++++++++
>>> backport/backport-include/linux/gfp.h | 10 +++++
>>> backport/backport-include/linux/mdio.h | 23 ++++++++++-
>>> backport/backport-include/linux/skbuff.h | 46 ++++++++++++++++++++++
>>> .../network/82-ethernet/0006-igb_eee.patch | 15 +++++++
>>> 5 files changed, 124 insertions(+), 1 deletion(-)
>>> create mode 100644 backport/backport-include/linux/gfp.h
>>> create mode 100644 patches/collateral-evolutions/network/82-ethernet/0006-igb_eee.patch
>>>
>>> diff --git a/backport/backport-include/linux/ethtool.h b/backport/backport-include/linux/ethtool.h
>>> index 647fbf6..4f13cb9 100644
>>> --- a/backport/backport-include/linux/ethtool.h
>>> +++ b/backport/backport-include/linux/ethtool.h
>>> @@ -42,4 +42,35 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
>>> }
>>> #endif
>>>
>>> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) && LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)
>>> +/**
>>> + * struct ethtool_eee - Energy Efficient Ethernet information
>>> + * @cmd: ETHTOOL_{G,S}EEE
>>> + * @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations
>>> + * for which there is EEE support.
>>> + * @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations
>>> + * advertised as eee capable.
>>> + * @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex
>>> + * combinations advertised by the link partner as eee capable.
>>> + * @eee_active: Result of the eee auto negotiation.
>>> + * @eee_enabled: EEE configured mode (enabled/disabled).
>>> + * @tx_lpi_enabled: Whether the interface should assert its tx lpi, given
>>> + * that eee was negotiated.
>>> + * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
>>> + * its tx lpi (after reaching 'idle' state). Effective only when eee
>>> + * was negotiated and tx_lpi_enabled was set.
>>> + */
>>> +struct ethtool_eee {
>>> + __u32 cmd;
>>> + __u32 supported;
>>> + __u32 advertised;
>>> + __u32 lp_advertised;
>>> + __u32 eee_active;
>>> + __u32 eee_enabled;
>>> + __u32 tx_lpi_enabled;
>>> + __u32 tx_lpi_timer;
>>> + __u32 reserved[2];
>>> +};
>>> +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) && LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */
>>
>> The get_eee and set_eee callbacks in struct ethtool_ops are not
>> available on this kernel, you could also add a #ifdef <kernel version>
>> around igb_get_eee() and igb_set_eee() and remove the struct here.
>
> True, but that would result in more ifdefs in igb and I'd like to keep
> the number at a minimum. Results in less maintenance work if upstream
> changes.
Yes, but on the other side I am getting some build warnings, because
these function are static and not used. I do not think this will break
often because the order of function isn't changed often and if that is
the case it is easy to fix.
Hauke
CC [M]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_main.o
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_main.c:7359:12:
warning: ‘igb_pci_sriov_configure’ defined but not used [-Wunused-function]
CC [M]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.o
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2354:12:
warning: ‘igb_get_ts_info’ defined but not used [-Wunused-function]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2660:12:
warning: ‘igb_set_eee’ defined but not used [-Wunused-function]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2718:12:
warning: ‘igb_get_module_info’ defined but not used [-Wunused-function]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2760:12:
warning: ‘igb_get_module_eeprom’ defined but not used [-Wunused-function]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2810:12:
warning: ‘igb_get_rxfh_indir_size’ defined but not used [-Wunused-function]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2815:12:
warning: ‘igb_get_rxfh_indir’ defined but not used [-Wunused-function]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/igb_ethtool.c:2861:12:
warning: ‘igb_set_rxfh_indir’ defined but not used [-Wunused-function]
CC [M]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/e1000_82575.o
CC [M]
/home/hauke/compat-wireless/backports-20131206/drivers/net/ethernet/intel/igb/e1000_mac.o
next prev parent reply other threads:[~2013-12-22 18:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 16:08 [PATCH RFC v2 00/11] backports: add igb driver Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 01/11] backports: igb fixes for linux-3.12 Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 02/11] backports: igb fixes for linux-3.9 Stefan Assmann
2013-12-18 20:19 ` Hauke Mehrtens
2013-12-19 8:56 ` Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 03/11] backports: igb fixes for linux-3.8 Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 04/11] backports: igb fixes for linux-3.7 Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 05/11] backports: igb fixes for linux-3.6 Stefan Assmann
2013-12-18 20:27 ` Hauke Mehrtens
2013-12-19 9:50 ` Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 06/11] backports: igb fixes for linux-3.5 Stefan Assmann
2013-12-18 20:35 ` Hauke Mehrtens
2013-12-19 9:55 ` Stefan Assmann
2013-12-22 18:56 ` Hauke Mehrtens [this message]
2013-12-18 16:08 ` [PATCH RFC v2 07/11] backports: igb fixes for linux-3.4 Stefan Assmann
2013-12-18 22:28 ` Hauke Mehrtens
2013-12-19 10:37 ` Stefan Assmann
2013-12-23 13:58 ` Hauke Mehrtens
2013-12-24 11:19 ` Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 08/11] backports: igb fixes for linux-3.3 Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 09/11] backports: igb fixes for linux-3.2 Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 10/11] backports: igb fixes for linux-3.1 Stefan Assmann
2013-12-18 16:08 ` [PATCH RFC v2 11/11] backports: enable igb and add defconfig Stefan Assmann
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=52B735E4.5080309@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=backports@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=sassmann@kpanic.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.