All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
	linux-kernel@vger.kernel.org,
	Jakub Buchocki <jakubx.buchocki@intel.com>,
	Pawel Chmielewski <pawel.chmielewski@intel.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Pawel Kaminski <pawel.kaminski@intel.com>,
	Mateusz Pacuszka <mateuszx.pacuszka@intel.com>,
	Lukasz Plachno <lukasz.plachno@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 4/5] ice: Implement VF LLDP RX support on VF
Date: Thu, 29 Feb 2024 10:12:34 +0100	[thread overview]
Message-ID: <ZeBKgpUurx90HDET@nanopsycho> (raw)
In-Reply-To: <20240228155957.408036-5-larysa.zaremba@intel.com>

Wed, Feb 28, 2024 at 04:59:48PM CET, larysa.zaremba@intel.com wrote:

[...]


>diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
>index 9c2c8637b4a7..af3611055e60 100644
>--- a/drivers/net/ethernet/intel/ice/ice_main.c
>+++ b/drivers/net/ethernet/intel/ice/ice_main.c
>@@ -4704,9 +4704,60 @@ void ice_deinit_dev(struct ice_pf *pf)
> 	ice_clear_interrupt_scheme(pf);
> }
> 
>+static ssize_t rx_lldp_show(struct device *dev, struct device_attribute *attr,
>+			    char *buf)
>+{
>+	struct ice_pf *pf = dev_get_drvdata(dev);
>+	struct ice_vsi *vsi = ice_get_main_vsi(pf);
>+
>+	return sysfs_emit(buf, "%u\n", vsi->rx_lldp_ena);
>+}
>+
>+static ssize_t rx_lldp_store(struct device *dev, struct device_attribute *attr,
>+			     const char *buf, size_t count)
>+{
>+	struct ice_pf *pf = dev_get_drvdata(dev);
>+	struct ice_vsi *vsi;
>+	bool ena;
>+	int err;
>+
>+	if (test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags)) {
>+		dev_err(dev, "Toggling Rx LLDP for PF is only allowed when FW LLDP Agent is disabled");
>+		return -EPERM;
>+	}
>+
>+	err = kstrtobool(buf, &ena);
>+	if (err)
>+		return -EINVAL;
>+
>+	vsi = ice_get_main_vsi(pf);
>+
>+	if (ena == vsi->rx_lldp_ena) {
>+		dev_dbg(dev, "Rx LLDP already %sabled", ena ? "en" : "dis");
>+		return count;
>+	}
>+
>+	ice_cfg_sw_lldp(vsi, false, ena);
>+
>+	return count;
>+}
>+
>+static DEVICE_ATTR_RW(rx_lldp);
>+
>+static int ice_init_rx_lldp_sysfs(struct ice_pf *pf)
>+{
>+	return device_create_file(ice_pf_to_dev(pf), &dev_attr_rx_lldp);

Don't add driver specific sysfs knobs please.

pw-bot: reject

[...]

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Pirko <jiri@resnulli.us>
To: Larysa Zaremba <larysa.zaremba@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Mateusz Pacuszka <mateuszx.pacuszka@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Lukasz Plachno <lukasz.plachno@intel.com>,
	Jakub Buchocki <jakubx.buchocki@intel.com>,
	Pawel Kaminski <pawel.kaminski@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Pawel Chmielewski <pawel.chmielewski@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [PATCH iwl-net 4/5] ice: Implement VF LLDP RX support on VF
Date: Thu, 29 Feb 2024 10:12:34 +0100	[thread overview]
Message-ID: <ZeBKgpUurx90HDET@nanopsycho> (raw)
In-Reply-To: <20240228155957.408036-5-larysa.zaremba@intel.com>

Wed, Feb 28, 2024 at 04:59:48PM CET, larysa.zaremba@intel.com wrote:

[...]


>diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
>index 9c2c8637b4a7..af3611055e60 100644
>--- a/drivers/net/ethernet/intel/ice/ice_main.c
>+++ b/drivers/net/ethernet/intel/ice/ice_main.c
>@@ -4704,9 +4704,60 @@ void ice_deinit_dev(struct ice_pf *pf)
> 	ice_clear_interrupt_scheme(pf);
> }
> 
>+static ssize_t rx_lldp_show(struct device *dev, struct device_attribute *attr,
>+			    char *buf)
>+{
>+	struct ice_pf *pf = dev_get_drvdata(dev);
>+	struct ice_vsi *vsi = ice_get_main_vsi(pf);
>+
>+	return sysfs_emit(buf, "%u\n", vsi->rx_lldp_ena);
>+}
>+
>+static ssize_t rx_lldp_store(struct device *dev, struct device_attribute *attr,
>+			     const char *buf, size_t count)
>+{
>+	struct ice_pf *pf = dev_get_drvdata(dev);
>+	struct ice_vsi *vsi;
>+	bool ena;
>+	int err;
>+
>+	if (test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags)) {
>+		dev_err(dev, "Toggling Rx LLDP for PF is only allowed when FW LLDP Agent is disabled");
>+		return -EPERM;
>+	}
>+
>+	err = kstrtobool(buf, &ena);
>+	if (err)
>+		return -EINVAL;
>+
>+	vsi = ice_get_main_vsi(pf);
>+
>+	if (ena == vsi->rx_lldp_ena) {
>+		dev_dbg(dev, "Rx LLDP already %sabled", ena ? "en" : "dis");
>+		return count;
>+	}
>+
>+	ice_cfg_sw_lldp(vsi, false, ena);
>+
>+	return count;
>+}
>+
>+static DEVICE_ATTR_RW(rx_lldp);
>+
>+static int ice_init_rx_lldp_sysfs(struct ice_pf *pf)
>+{
>+	return device_create_file(ice_pf_to_dev(pf), &dev_attr_rx_lldp);

Don't add driver specific sysfs knobs please.

pw-bot: reject

[...]

  reply	other threads:[~2024-02-29  9:12 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 15:59 [Intel-wired-lan] [PATCH iwl-net 0/5] ice: LLDP support for VFs Larysa Zaremba
2024-02-28 15:59 ` Larysa Zaremba
2024-02-28 15:59 ` [Intel-wired-lan] [PATCH iwl-net 1/5] ice: Add function to get VF from device struct Larysa Zaremba
2024-02-28 15:59   ` Larysa Zaremba
2024-02-28 15:59 ` [Intel-wired-lan] [PATCH iwl-net 2/5] ice: Fix check for existing switch rule Larysa Zaremba
2024-02-28 15:59   ` Larysa Zaremba
2024-02-28 15:59 ` [Intel-wired-lan] [PATCH iwl-net 3/5] ice: Do not add LLDP-specific filter Larysa Zaremba
2024-02-28 15:59   ` Larysa Zaremba
2024-02-28 15:59 ` [Intel-wired-lan] [PATCH iwl-net 4/5] ice: Implement VF LLDP RX support on VF Larysa Zaremba
2024-02-28 15:59   ` Larysa Zaremba
2024-02-29  9:12   ` Jiri Pirko [this message]
2024-02-29  9:12     ` Jiri Pirko
2024-02-28 15:59 ` [Intel-wired-lan] [PATCH iwl-net 5/5] ice: Implement VF LLDP TX support for VF Larysa Zaremba
2024-02-28 15:59   ` Larysa Zaremba
2024-02-28 16:47 ` [Intel-wired-lan] [PATCH iwl-net 0/5] ice: LLDP support for VFs Jakub Kicinski
2024-02-28 16:47   ` Jakub Kicinski
2024-02-29  9:20   ` [Intel-wired-lan] " Jiri Pirko
2024-02-29  9:20     ` Jiri Pirko
2024-02-29 15:28     ` [Intel-wired-lan] " Jakub Kicinski
2024-02-29 15:28       ` Jakub Kicinski
2024-02-29 19:33       ` [Intel-wired-lan] " Larysa Zaremba
2024-02-29 19:33         ` Larysa Zaremba
2024-03-01 17:08         ` [Intel-wired-lan] " Jakub Kicinski
2024-03-01 17:08           ` Jakub Kicinski
2024-03-02  0:50           ` [Intel-wired-lan] " Larysa Zaremba
2024-03-02  0:50             ` Larysa Zaremba
2024-03-05 19:54             ` [Intel-wired-lan] " Jakub Kicinski
2024-03-05 19:54               ` Jakub Kicinski
2024-03-02  6:47               ` [Intel-wired-lan] " Larysa Zaremba
2024-03-02  6:47                 ` Larysa Zaremba

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=ZeBKgpUurx90HDET@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jakubx.buchocki@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.plachno@intel.com \
    --cc=mateusz.polchlopek@intel.com \
    --cc=mateuszx.pacuszka@intel.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pawel.chmielewski@intel.com \
    --cc=pawel.kaminski@intel.com \
    --cc=przemyslaw.kitszel@intel.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 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.