From: Jeff Garzik <jeff@garzik•org>
To: Stephen Hemminger <shemminger@vyatta•com>
Cc: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Subject: Re: [PATCH 2/2] ethtool: RXHASH flag support
Date: Tue, 30 Mar 2010 13:29:01 -0400 [thread overview]
Message-ID: <4BB234DD.9040800@garzik.org> (raw)
In-Reply-To: <20100329175352.38008e05@nehalam>
On 03/29/2010 08:53 PM, Stephen Hemminger wrote:
> Add support for RXHASH flag in ethtool offload.
> Update to current net-next sanitized version of ethtool.h
>
> Signed-off-by: Stephen Hemminger<shemminger@vyatta•com>
> ---
> ethtool-copy.h | 32 +++++++++++++++++++++++++-------
> ethtool.8 | 4 ++++
> ethtool.c | 42 +++++++++++++++++++++++++++++++++++++-----
> 3 files changed, 66 insertions(+), 12 deletions(-)
>
> diff --git a/ethtool-copy.h b/ethtool-copy.h
> index 8681f5e..0cf8f33 100644
> --- a/ethtool-copy.h
> +++ b/ethtool-copy.h
> @@ -36,7 +36,7 @@ struct ethtool_cmd {
> __u32 reserved[2];
> };
>
> -static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
> +static __inline__ void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
> __u32 speed)
> {
>
> @@ -44,7 +44,7 @@ static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
> ep->speed_hi = (__u16)(speed>> 16);
> }
>
> -static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
> +static __inline__ __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
> {
> return (ep->speed_hi<< 16) | ep->speed;
> }
> @@ -61,6 +61,13 @@ struct ethtool_drvinfo {
> /* For PCI devices, use pci_name(pci_dev). */
> char reserved1[32];
> char reserved2[12];
> + /*
> + * Some struct members below are filled in
> + * using ops->get_sset_count(). Obtaining
> + * this info from ethtool_drvinfo is now
> + * deprecated; Use ETHTOOL_GSSET_INFO
> + * instead.
> + */
> __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
> __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
> __u32 testinfo_len;
> @@ -253,6 +260,17 @@ struct ethtool_gstrings {
> __u8 data[0];
> };
>
> +struct ethtool_sset_info {
> + __u32 cmd; /* ETHTOOL_GSSET_INFO */
> + __u32 reserved;
> + __u64 sset_mask; /* input: each bit selects an sset to query */
> + /* output: each bit a returned sset */
> + __u32 data[0]; /* ETH_SS_xxx count, in order, based on bits
> + in sset_mask. One bit implies one
> + __u32, two bits implies two
> + __u32's, etc. */
> +};
> +
> enum ethtool_test_flags {
> ETH_TEST_FL_OFFLINE = (1<< 0), /* online / offline */
> ETH_TEST_FL_FAILED = (1<< 1), /* test passed / failed */
> @@ -292,6 +310,7 @@ struct ethtool_perm_addr {
> enum ethtool_flags {
> ETH_FLAG_LRO = (1<< 15), /* LRO is enabled */
> ETH_FLAG_NTUPLE = (1<< 27), /* N-tuple filters enabled */
> + ETH_FLAG_RXHASH = (1<< 28),
> };
>
> /* The following structures are for supporting RX network flow
> @@ -389,8 +408,6 @@ struct ethtool_rx_ntuple_flow_spec {
> #define ETHTOOL_RXNTUPLE_ACTION_DROP -1
> };
>
> -#define ETHTOOL_MAX_NTUPLE_LIST_ENTRY 1024
> -#define ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY 14
> struct ethtool_rx_ntuple {
> __u32 cmd;
> struct ethtool_rx_ntuple_flow_spec fs;
> @@ -408,6 +425,7 @@ struct ethtool_flash {
> char data[ETHTOOL_FLASH_MAX_FILENAME];
> };
>
> +
> /* CMDs currently supported */
> #define ETHTOOL_GSET 0x00000001 /* Get settings. */
> #define ETHTOOL_SSET 0x00000002 /* Set settings. */
> @@ -463,9 +481,9 @@ struct ethtool_flash {
> #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
> #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
> #define ETHTOOL_RESET 0x00000034 /* Reset hardware */
> -
> -#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
> -#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
> +#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
> +#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
> +#define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */
>
NAK - you broke the build. You should also know not to combine patches
like this. Linux 101: separate changes, separate patches.
By blindly sync'ing the ethtool.h header, ETHTOOL_MAX_NTUPLE_LIST_ENTRY
and its sibling ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY were removed,
breaking the ethtool build.
Furthermore, I just pulled net-next and did my own sync, and those
s/inline/__inline__/ substitutions are not present.
I went ahead and made sure everything is sync'd correctly and building
correctly, in the ethtool git repo. Please resubmit a patch DIRECTLY
and ONLY related to RXHASH flag support. If you decide to do any other
work, that belongs in a separate patch.
Jeff
next prev parent reply other threads:[~2010-03-30 17:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-28 22:44 [PATCH 1/2] netdev: add support for Receive Side Scaling hash control Stephen Hemminger
2010-03-28 22:47 ` [PATCH 2/2] ethtool: add RSS command flag Stephen Hemminger
2010-03-30 0:47 ` [PATCH 1/2] netdev: ethtool RXHASH flag Stephen Hemminger
2010-03-30 0:53 ` [PATCH 2/2] ethtool: RXHASH flag support Stephen Hemminger
2010-03-30 17:29 ` Jeff Garzik [this message]
2010-03-30 17:32 ` Stephen Hemminger
2010-03-30 17:37 ` Jeff Garzik
2010-03-30 21:05 ` Stephen Hemminger
2010-03-30 21:08 ` Jeff Garzik
2010-03-30 21:31 ` Stephen Hemminger
2010-03-30 22:58 ` Jeff Garzik
2010-03-30 17:19 ` [PATCH 1/2] netdev: ethtool RXHASH flag Jeff Garzik
2010-03-31 6:52 ` David Miller
2010-03-31 6:52 ` [PATCH 1/2] netdev: add support for Receive Side Scaling hash control 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=4BB234DD.9040800@garzik.org \
--to=jeff@garzik$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=shemminger@vyatta$(echo .)com \
/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