public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Pawel Chmielewski <pawel.chmielewski@intel.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: <netdev@vger.kernel.org>, <intel-wired-lan@lists.osuosl.org>,
	<andrew@lunn.ch>, <aelior@marvell.com>, <manishc@marvell.com>,
	<horms@kernel.org>, <vladimir.oltean@nxp.com>,
	<pabeni@redhat.com>, <davem@davemloft.net>, <edumazet@google.com>,
	<jdamato@fastly.com>, <d-tatianin@yandex-team.ru>,
	<kuba@kernel.org>, Paul Greenwalt <paul.greenwalt@intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	"Przemek Kitszel" <przemyslaw.kitszel@intel.com>
Subject: Re: [PATCH net-next v4 1/2] ethtool: Add forced speed to supported link modes maps
Date: Thu, 12 Oct 2023 15:33:15 +0200	[thread overview]
Message-ID: <ZSf1m7uIYGuF35a8@baltimore> (raw)
In-Reply-To: <ZSa7Y9gwC8qCBv2r@nanopsycho>

> >diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
> 
> Why you put this into ioctl.c?
> 
> Can't this be put into include/linux/linkmode.h as a static helper as
> well?

I'm a little bit confused, include/linux/linkmode.h doesn't contain
similar ethtool helpers.. Did you maybe meant ethtool.h?
 
> 
> >index 0b0ce4f81c01..34507691fc9d 100644
> >--- a/net/ethtool/ioctl.c
> >+++ b/net/ethtool/ioctl.c
> >@@ -3388,3 +3388,16 @@ void ethtool_rx_flow_rule_destroy(struct ethtool_rx_flow_rule *flow)
> > 	kfree(flow);
> > }
> > EXPORT_SYMBOL(ethtool_rx_flow_rule_destroy);
> >+
> >+void ethtool_forced_speed_maps_init(struct ethtool_forced_speed_map *maps,
> >+				    u32 size)
> >+{
> >+	for (u32 i = 0; i < size; i++) {
> >+		struct ethtool_forced_speed_map *map = &maps[i];
> >+
> >+		linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps);
> >+		map->cap_arr = NULL;
> >+		map->arr_size = 0;
> >+	}
> >+}
> >+EXPORT_SYMBOL(ethtool_forced_speed_maps_init);
> >-- 
> >2.37.3
> >
> >

  reply	other threads:[~2023-10-12 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 13:13 [PATCH net-next v4 0/2] ethtool: Add link mode maps for forced speeds Pawel Chmielewski
2023-10-11 13:13 ` [PATCH net-next v4 1/2] ethtool: Add forced speed to supported link modes maps Pawel Chmielewski
2023-10-11 15:12   ` Jiri Pirko
2023-10-12 13:33     ` Pawel Chmielewski [this message]
2023-10-12 13:42       ` Jiri Pirko
2023-10-11 13:13 ` [PATCH net-next v4 2/2] ice: Refactor finding advertised link speed Pawel Chmielewski

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=ZSf1m7uIYGuF35a8@baltimore \
    --to=pawel.chmielewski@intel.com \
    --cc=aelior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=d-tatianin@yandex-team.ru \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jdamato@fastly.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paul.greenwalt@intel.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=vladimir.oltean@nxp.com \
    /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