* [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice)
@ 2023-03-28 17:20 Tony Nguyen
2023-03-28 17:20 ` [PATCH net 1/4] ice: fix W=1 headers mismatch Tony Nguyen
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Tony Nguyen @ 2023-03-28 17:20 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev; +Cc: Tony Nguyen
This series contains updates to ice driver only.
Jesse fixes mismatched header documentation reported when building with
W=1.
Brett restricts setting of VSI context to only applicable fields for the
given ICE_AQ_VSI_PROP_Q_OPT_VALID bit.
Junfeng adds check when adding Flow Director filters that conflict with
existing filter rules.
Jakob Koschel adds interim variable for iterating to prevent possible
misuse after looping.
The following are changes since commit 917fd7d6cdda179fdced2ebb060a9cda517d76e0:
Merge branch 'xen-netback-fix-issue-introduced-recently'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE
Brett Creeley (1):
ice: Fix ice_cfg_rdma_fltr() to only update relevant fields
Jakob Koschel (1):
ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
Jesse Brandeburg (1):
ice: fix W=1 headers mismatch
Junfeng Guo (1):
ice: add profile conflict check for AVF FDIR
drivers/net/ethernet/intel/ice/ice_sched.c | 8 +-
drivers/net/ethernet/intel/ice/ice_switch.c | 26 ++++++-
drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 1 +
.../ethernet/intel/ice/ice_virtchnl_fdir.c | 73 +++++++++++++++++++
5 files changed, 102 insertions(+), 8 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net 1/4] ice: fix W=1 headers mismatch
2023-03-28 17:20 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) Tony Nguyen
@ 2023-03-28 17:20 ` Tony Nguyen
2023-03-29 12:06 ` Leon Romanovsky
2023-03-28 17:20 ` [PATCH net 2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields Tony Nguyen
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Tony Nguyen @ 2023-03-28 17:20 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Jesse Brandeburg, anthony.l.nguyen, maciej.fijalkowski,
magnus.karlsson, ast, daniel, hawk, john.fastabend, bpf,
Piotr Raczynski
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
make modules W=1 returns:
.../ice/ice_txrx_lib.c:448: warning: Function parameter or member 'first_idx' not described in 'ice_finalize_xdp_rx'
.../ice/ice_txrx.c:948: warning: Function parameter or member 'ntc' not described in 'ice_get_rx_buf'
.../ice/ice_txrx.c:1038: warning: Excess function parameter 'rx_buf' description in 'ice_construct_skb'
Fix these warnings by adding and deleting the deviant arguments.
Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side")
Fixes: d7956d81f150 ("ice: Pull out next_to_clean bump out of ice_put_rx_buf()")
CC: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index b61dd9f01540..4fcf2d07eb85 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -938,6 +938,7 @@ ice_reuse_rx_page(struct ice_rx_ring *rx_ring, struct ice_rx_buf *old_buf)
* ice_get_rx_buf - Fetch Rx buffer and synchronize data for use
* @rx_ring: Rx descriptor ring to transact packets on
* @size: size of buffer to add to skb
+ * @ntc: index of next to clean element
*
* This function will pull an Rx buffer from the ring and synchronize it
* for use by the CPU.
@@ -1026,7 +1027,6 @@ ice_build_skb(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp)
/**
* ice_construct_skb - Allocate skb and populate it
* @rx_ring: Rx descriptor ring to transact packets on
- * @rx_buf: Rx buffer to pull data from
* @xdp: xdp_buff pointing to the data
*
* This function allocates an skb. It then populates it with the page
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
index 7bc5aa340c7d..c8322fb6f2b3 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c
@@ -438,6 +438,7 @@ int __ice_xmit_xdp_ring(struct xdp_buff *xdp, struct ice_tx_ring *xdp_ring,
* ice_finalize_xdp_rx - Bump XDP Tx tail and/or flush redirect map
* @xdp_ring: XDP ring
* @xdp_res: Result of the receive batch
+ * @first_idx: index to write from caller
*
* This function bumps XDP Tx tail and/or flush redirect map, and
* should be called when a batch of packets has been processed in the
--
2.38.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH net 2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields
2023-03-28 17:20 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) Tony Nguyen
2023-03-28 17:20 ` [PATCH net 1/4] ice: fix W=1 headers mismatch Tony Nguyen
@ 2023-03-28 17:20 ` Tony Nguyen
2023-03-29 12:08 ` Leon Romanovsky
2023-03-28 17:20 ` [PATCH net 3/4] ice: add profile conflict check for AVF FDIR Tony Nguyen
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Tony Nguyen @ 2023-03-28 17:20 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Brett Creeley, anthony.l.nguyen, Robert Malz, Jesse Brandeburg,
Piotr Raczynski, Jakub Andrysiak
From: Brett Creeley <brett.creeley@intel.com>
The current implementation causes ice_vsi_update() to update all VSI
fields based on the cached VSI context. This also assumes that the
ICE_AQ_VSI_PROP_Q_OPT_VALID bit is set. This can cause problems if the
VSI context is not correctly synced by the driver. Fix this by only
updating the fields that correspond to ICE_AQ_VSI_PROP_Q_OPT_VALID.
Also, make sure to save the updated result in the cached VSI context
on success.
Fixes: 348048e724a0 ("ice: Implement iidc operations")
Co-developed-by: Robert Malz <robertx.malz@intel.com>
Signed-off-by: Robert Malz <robertx.malz@intel.com>
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Tested-by: Jakub Andrysiak <jakub.andrysiak@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_switch.c | 26 +++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 61f844d22512..46b36851af46 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -1780,18 +1780,36 @@ ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
int
ice_cfg_rdma_fltr(struct ice_hw *hw, u16 vsi_handle, bool enable)
{
- struct ice_vsi_ctx *ctx;
+ struct ice_vsi_ctx *ctx, *cached_ctx;
+ int status;
+
+ cached_ctx = ice_get_vsi_ctx(hw, vsi_handle);
+ if (!cached_ctx)
+ return -ENOENT;
- ctx = ice_get_vsi_ctx(hw, vsi_handle);
+ ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx)
- return -EIO;
+ return -ENOMEM;
+
+ ctx->info.q_opt_rss = cached_ctx->info.q_opt_rss;
+ ctx->info.q_opt_tc = cached_ctx->info.q_opt_tc;
+ ctx->info.q_opt_flags = cached_ctx->info.q_opt_flags;
+
+ ctx->info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_Q_OPT_VALID);
if (enable)
ctx->info.q_opt_flags |= ICE_AQ_VSI_Q_OPT_PE_FLTR_EN;
else
ctx->info.q_opt_flags &= ~ICE_AQ_VSI_Q_OPT_PE_FLTR_EN;
- return ice_update_vsi(hw, vsi_handle, ctx, NULL);
+ status = ice_update_vsi(hw, vsi_handle, ctx, NULL);
+ if (!status) {
+ cached_ctx->info.q_opt_flags = ctx->info.q_opt_flags;
+ cached_ctx->info.valid_sections |= ctx->info.valid_sections;
+ }
+
+ kfree(ctx);
+ return status;
}
/**
--
2.38.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH net 3/4] ice: add profile conflict check for AVF FDIR
2023-03-28 17:20 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) Tony Nguyen
2023-03-28 17:20 ` [PATCH net 1/4] ice: fix W=1 headers mismatch Tony Nguyen
2023-03-28 17:20 ` [PATCH net 2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields Tony Nguyen
@ 2023-03-28 17:20 ` Tony Nguyen
2023-03-29 12:08 ` Leon Romanovsky
2023-03-28 17:20 ` [PATCH net 4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() Tony Nguyen
2023-03-30 4:50 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) patchwork-bot+netdevbpf
4 siblings, 1 reply; 10+ messages in thread
From: Tony Nguyen @ 2023-03-28 17:20 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Junfeng Guo, anthony.l.nguyen, Rafal Romanowski
From: Junfeng Guo <junfeng.guo@intel.com>
Add profile conflict check while adding some FDIR rules to avoid
unexpected flow behavior, rules may have conflict including:
IPv4 <---> {IPv4_UDP, IPv4_TCP, IPv4_SCTP}
IPv6 <---> {IPv6_UDP, IPv6_TCP, IPv6_SCTP}
For example, when we create an FDIR rule for IPv4, this rule will work
on packets including IPv4, IPv4_UDP, IPv4_TCP and IPv4_SCTP. But if we
then create an FDIR rule for IPv4_UDP and then destroy it, the first
FDIR rule for IPv4 cannot work on pkt IPv4_UDP then.
To prevent this unexpected behavior, we add restriction in software
when creating FDIR rules by adding necessary profile conflict check.
Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF")
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
.../ethernet/intel/ice/ice_virtchnl_fdir.c | 73 +++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
index e6ef6b303222..5fd75e75772e 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
@@ -541,6 +541,72 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf *vf)
}
}
+/**
+ * ice_vc_fdir_has_prof_conflict
+ * @vf: pointer to the VF structure
+ * @conf: FDIR configuration for each filter
+ *
+ * Check if @conf has conflicting profile with existing profiles
+ *
+ * Return: true on success, and false on error.
+ */
+static bool
+ice_vc_fdir_has_prof_conflict(struct ice_vf *vf,
+ struct virtchnl_fdir_fltr_conf *conf)
+{
+ struct ice_fdir_fltr *desc;
+
+ list_for_each_entry(desc, &vf->fdir.fdir_rule_list, fltr_node) {
+ struct virtchnl_fdir_fltr_conf *existing_conf;
+ enum ice_fltr_ptype flow_type_a, flow_type_b;
+ struct ice_fdir_fltr *a, *b;
+
+ existing_conf = to_fltr_conf_from_desc(desc);
+ a = &existing_conf->input;
+ b = &conf->input;
+ flow_type_a = a->flow_type;
+ flow_type_b = b->flow_type;
+
+ /* No need to compare two rules with different tunnel types or
+ * with the same protocol type.
+ */
+ if (existing_conf->ttype != conf->ttype ||
+ flow_type_a == flow_type_b)
+ continue;
+
+ switch (flow_type_a) {
+ case ICE_FLTR_PTYPE_NONF_IPV4_UDP:
+ case ICE_FLTR_PTYPE_NONF_IPV4_TCP:
+ case ICE_FLTR_PTYPE_NONF_IPV4_SCTP:
+ if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_OTHER)
+ return true;
+ break;
+ case ICE_FLTR_PTYPE_NONF_IPV4_OTHER:
+ if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_UDP ||
+ flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_TCP ||
+ flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_SCTP)
+ return true;
+ break;
+ case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
+ case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
+ case ICE_FLTR_PTYPE_NONF_IPV6_SCTP:
+ if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_OTHER)
+ return true;
+ break;
+ case ICE_FLTR_PTYPE_NONF_IPV6_OTHER:
+ if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_UDP ||
+ flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_TCP ||
+ flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_SCTP)
+ return true;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return false;
+}
+
/**
* ice_vc_fdir_write_flow_prof
* @vf: pointer to the VF structure
@@ -677,6 +743,13 @@ ice_vc_fdir_config_input_set(struct ice_vf *vf, struct virtchnl_fdir_add *fltr,
enum ice_fltr_ptype flow;
int ret;
+ ret = ice_vc_fdir_has_prof_conflict(vf, conf);
+ if (ret) {
+ dev_dbg(dev, "Found flow profile conflict for VF %d\n",
+ vf->vf_id);
+ return ret;
+ }
+
flow = input->flow_type;
ret = ice_vc_fdir_alloc_prof(vf, flow);
if (ret) {
--
2.38.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH net 4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
2023-03-28 17:20 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) Tony Nguyen
` (2 preceding siblings ...)
2023-03-28 17:20 ` [PATCH net 3/4] ice: add profile conflict check for AVF FDIR Tony Nguyen
@ 2023-03-28 17:20 ` Tony Nguyen
2023-03-29 12:08 ` Leon Romanovsky
2023-03-30 4:50 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) patchwork-bot+netdevbpf
4 siblings, 1 reply; 10+ messages in thread
From: Tony Nguyen @ 2023-03-28 17:20 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Jakob Koschel, anthony.l.nguyen, Arpana Arland
From: Jakob Koschel <jkl820.git@gmail.com>
The code implicitly assumes that the list iterator finds a correct
handle. If 'vsi_handle' is not found the 'old_agg_vsi_info' was
pointing to an bogus memory location. For safety a separate list
iterator variable should be used to make the != NULL check on
'old_agg_vsi_info' correct under any circumstances.
Additionally Linus proposed to avoid any use of the list iterator
variable after the loop, in the attempt to move the list iterator
variable declaration into the macro to avoid any potential misuse after
the loop. Using it in a pointer comparison after the loop is undefined
behavior and should be omitted if possible [1].
Fixes: 37c592062b16 ("ice: remove the VSI info from previous agg")
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel <jkl820.git@gmail.com>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_sched.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
index 4eca8d195ef0..b7682de0ae05 100644
--- a/drivers/net/ethernet/intel/ice/ice_sched.c
+++ b/drivers/net/ethernet/intel/ice/ice_sched.c
@@ -2788,7 +2788,7 @@ static int
ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
u16 vsi_handle, unsigned long *tc_bitmap)
{
- struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL;
+ struct ice_sched_agg_vsi_info *agg_vsi_info, *iter, *old_agg_vsi_info = NULL;
struct ice_sched_agg_info *agg_info, *old_agg_info;
struct ice_hw *hw = pi->hw;
int status = 0;
@@ -2806,11 +2806,13 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
if (old_agg_info && old_agg_info != agg_info) {
struct ice_sched_agg_vsi_info *vtmp;
- list_for_each_entry_safe(old_agg_vsi_info, vtmp,
+ list_for_each_entry_safe(iter, vtmp,
&old_agg_info->agg_vsi_list,
list_entry)
- if (old_agg_vsi_info->vsi_handle == vsi_handle)
+ if (iter->vsi_handle == vsi_handle) {
+ old_agg_vsi_info = iter;
break;
+ }
}
/* check if entry already exist */
--
2.38.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH net 1/4] ice: fix W=1 headers mismatch
2023-03-28 17:20 ` [PATCH net 1/4] ice: fix W=1 headers mismatch Tony Nguyen
@ 2023-03-29 12:06 ` Leon Romanovsky
0 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2023-03-29 12:06 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, Jesse Brandeburg,
maciej.fijalkowski, magnus.karlsson, ast, daniel, hawk,
john.fastabend, bpf, Piotr Raczynski
On Tue, Mar 28, 2023 at 10:20:32AM -0700, Tony Nguyen wrote:
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> make modules W=1 returns:
> .../ice/ice_txrx_lib.c:448: warning: Function parameter or member 'first_idx' not described in 'ice_finalize_xdp_rx'
> .../ice/ice_txrx.c:948: warning: Function parameter or member 'ntc' not described in 'ice_get_rx_buf'
> .../ice/ice_txrx.c:1038: warning: Excess function parameter 'rx_buf' description in 'ice_construct_skb'
>
> Fix these warnings by adding and deleting the deviant arguments.
>
> Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side")
> Fixes: d7956d81f150 ("ice: Pull out next_to_clean bump out of ice_put_rx_buf()")
> CC: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
> drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields
2023-03-28 17:20 ` [PATCH net 2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields Tony Nguyen
@ 2023-03-29 12:08 ` Leon Romanovsky
0 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2023-03-29 12:08 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, Brett Creeley, Robert Malz,
Jesse Brandeburg, Piotr Raczynski, Jakub Andrysiak
On Tue, Mar 28, 2023 at 10:20:33AM -0700, Tony Nguyen wrote:
> From: Brett Creeley <brett.creeley@intel.com>
>
> The current implementation causes ice_vsi_update() to update all VSI
> fields based on the cached VSI context. This also assumes that the
> ICE_AQ_VSI_PROP_Q_OPT_VALID bit is set. This can cause problems if the
> VSI context is not correctly synced by the driver. Fix this by only
> updating the fields that correspond to ICE_AQ_VSI_PROP_Q_OPT_VALID.
> Also, make sure to save the updated result in the cached VSI context
> on success.
>
> Fixes: 348048e724a0 ("ice: Implement iidc operations")
> Co-developed-by: Robert Malz <robertx.malz@intel.com>
> Signed-off-by: Robert Malz <robertx.malz@intel.com>
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
> Tested-by: Jakub Andrysiak <jakub.andrysiak@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_switch.c | 26 +++++++++++++++++----
> 1 file changed, 22 insertions(+), 4 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
2023-03-28 17:20 ` [PATCH net 4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() Tony Nguyen
@ 2023-03-29 12:08 ` Leon Romanovsky
0 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2023-03-29 12:08 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, Jakob Koschel,
Arpana Arland
On Tue, Mar 28, 2023 at 10:20:35AM -0700, Tony Nguyen wrote:
> From: Jakob Koschel <jkl820.git@gmail.com>
>
> The code implicitly assumes that the list iterator finds a correct
> handle. If 'vsi_handle' is not found the 'old_agg_vsi_info' was
> pointing to an bogus memory location. For safety a separate list
> iterator variable should be used to make the != NULL check on
> 'old_agg_vsi_info' correct under any circumstances.
>
> Additionally Linus proposed to avoid any use of the list iterator
> variable after the loop, in the attempt to move the list iterator
> variable declaration into the macro to avoid any potential misuse after
> the loop. Using it in a pointer comparison after the loop is undefined
> behavior and should be omitted if possible [1].
>
> Fixes: 37c592062b16 ("ice: remove the VSI info from previous agg")
> Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
> Signed-off-by: Jakob Koschel <jkl820.git@gmail.com>
> Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_sched.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 3/4] ice: add profile conflict check for AVF FDIR
2023-03-28 17:20 ` [PATCH net 3/4] ice: add profile conflict check for AVF FDIR Tony Nguyen
@ 2023-03-29 12:08 ` Leon Romanovsky
0 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2023-03-29 12:08 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, Junfeng Guo,
Rafal Romanowski
On Tue, Mar 28, 2023 at 10:20:34AM -0700, Tony Nguyen wrote:
> From: Junfeng Guo <junfeng.guo@intel.com>
>
> Add profile conflict check while adding some FDIR rules to avoid
> unexpected flow behavior, rules may have conflict including:
> IPv4 <---> {IPv4_UDP, IPv4_TCP, IPv4_SCTP}
> IPv6 <---> {IPv6_UDP, IPv6_TCP, IPv6_SCTP}
>
> For example, when we create an FDIR rule for IPv4, this rule will work
> on packets including IPv4, IPv4_UDP, IPv4_TCP and IPv4_SCTP. But if we
> then create an FDIR rule for IPv4_UDP and then destroy it, the first
> FDIR rule for IPv4 cannot work on pkt IPv4_UDP then.
>
> To prevent this unexpected behavior, we add restriction in software
> when creating FDIR rules by adding necessary profile conflict check.
>
> Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF")
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> .../ethernet/intel/ice/ice_virtchnl_fdir.c | 73 +++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice)
2023-03-28 17:20 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) Tony Nguyen
` (3 preceding siblings ...)
2023-03-28 17:20 ` [PATCH net 4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() Tony Nguyen
@ 2023-03-30 4:50 ` patchwork-bot+netdevbpf
4 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-30 4:50 UTC (permalink / raw)
To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev
Hello:
This series was applied to netdev/net.git (main)
by Tony Nguyen <anthony.l.nguyen@intel.com>:
On Tue, 28 Mar 2023 10:20:31 -0700 you wrote:
> This series contains updates to ice driver only.
>
> Jesse fixes mismatched header documentation reported when building with
> W=1.
>
> Brett restricts setting of VSI context to only applicable fields for the
> given ICE_AQ_VSI_PROP_Q_OPT_VALID bit.
>
> [...]
Here is the summary with links:
- [net,1/4] ice: fix W=1 headers mismatch
https://git.kernel.org/netdev/net/c/66ceaa4c4507
- [net,2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields
https://git.kernel.org/netdev/net/c/d94dbdc4e020
- [net,3/4] ice: add profile conflict check for AVF FDIR
https://git.kernel.org/netdev/net/c/29486b6df3e6
- [net,4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
https://git.kernel.org/netdev/net/c/e9a1cc2e4c4e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-03-30 4:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-28 17:20 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) Tony Nguyen
2023-03-28 17:20 ` [PATCH net 1/4] ice: fix W=1 headers mismatch Tony Nguyen
2023-03-29 12:06 ` Leon Romanovsky
2023-03-28 17:20 ` [PATCH net 2/4] ice: Fix ice_cfg_rdma_fltr() to only update relevant fields Tony Nguyen
2023-03-29 12:08 ` Leon Romanovsky
2023-03-28 17:20 ` [PATCH net 3/4] ice: add profile conflict check for AVF FDIR Tony Nguyen
2023-03-29 12:08 ` Leon Romanovsky
2023-03-28 17:20 ` [PATCH net 4/4] ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg() Tony Nguyen
2023-03-29 12:08 ` Leon Romanovsky
2023-03-30 4:50 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2023-03-28 (ice) patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).