Skip to content

Revert "ASoC: SOF: topology: continue parsing when num_hw_configs is … - #543

Merged
plbossart merged 2 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/hw_config
Jan 15, 2019
Merged

plbossart merged 2 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/hw_config

Conversation

@ranj063

@ranj063 ranj063 commented Jan 15, 2019

Copy link
Copy Markdown
Collaborator

This change was added previously because hw_config section
for HDA DAI's was missing from topology. But with that fixed
in topology, this patch is no longer needed.

Please apply this change along with thesofproject/sof#844

@plbossart

plbossart commented Jan 15, 2019 via email

Copy link
Copy Markdown
Member

@ranj063

ranj063 commented Jan 15, 2019

Copy link
Copy Markdown
Collaborator Author

On 1/15/19 1:14 PM, Ranjani Sridharan wrote: This change was added previously because hw_config section for HDA DAI's was missing from topology. But with that fixed in topology, this patch is no longer needed. Please apply this change along with thesofproject/sof#844 <thesofproject/sof#844>
Isn't it needed if we deal with topologies designed in 2018 which don't have this section?
A newer kernel needs to deal with older topologies.

@plbossart which topologies are you referring to? We have this problem only for HDA DAI links in topology at the moment. But allowing num_hw_configs to be 0 is risky.

@plbossart

plbossart commented Jan 15, 2019 via email

Copy link
Copy Markdown
Member

@ranj063

ranj063 commented Jan 15, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart are you saying this because we have already made the GLK release?
But I'm not sure how to handle that case. Does this warrant an ABI update?

@plbossart

plbossart commented Jan 15, 2019 via email

Copy link
Copy Markdown
Member

…not 1"

This reverts commit 7af711b.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063
ranj063 force-pushed the fix/hw_config branch 2 times, most recently from 1a4172e to 8fc9eb3 Compare January 15, 2019 20:49
@ranj063

ranj063 commented Jan 15, 2019

Copy link
Copy Markdown
Collaborator Author

@plbossart updated to accommodate the older topologies now.

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need clarifications below.

Comment thread sound/soc/sof/topology.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not correct. dai links could have more than one config, and in fact it's an issue that we've pushed under the rug consistently.
The code should be
numconfig == 0 && config.type != SOF_DAI_INTEL_HDA.

what happens btw if we have a topology with no HDAudio config, would things work or would we generate an oops?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart if we can have more than 1 hw_config, we dont have the logic to process them here. How would we handle that?

To answer you second question, if there are no HDA configs in topology,i cant imagne what would cause a kernel oops.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well multiple configs would be another "topology ABI" bump triggering a different behavior on newer kernels.
For the second part it'd like to see a test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well multiple configs would be another "topology ABI" bump triggering a different behavior on newer kernels.

@plbossart OK, fixed now.

For the second part it'd like to see a test.

I tested the sof-pcm-521x topology without the HDA pipelines and config. I didnt see any oops.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, that's fine then

With the changes in SOF topology to add hw_config for HDA links,
all dai links should have at least 1 hw_config in topology.
But older topologies built before this change was incorporated
might have no hw_configs for HDA dai links. So make an exception
for those.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@plbossart

Copy link
Copy Markdown
Member

CI seems to take its own sweet time so will merge. it compiles fine for me.

@plbossart
plbossart merged commit 17394b5 into thesofproject:topic/sof-dev Jan 15, 2019
@ranj063
ranj063 deleted the fix/hw_config branch March 22, 2019 17:07
plbossart pushed a commit that referenced this pull request Mar 7, 2024
If the ICMPv6 error is built from a non-linear skb we get the following
splat,

  BUG: KASAN: slab-out-of-bounds in do_csum+0x220/0x240
  Read of size 4 at addr ffff88811d402c80 by task netperf/820
  CPU: 0 PID: 820 Comm: netperf Not tainted 6.8.0-rc1+ #543
  ...
   kasan_report+0xd8/0x110
   do_csum+0x220/0x240
   csum_partial+0xc/0x20
   skb_tunnel_check_pmtu+0xeb9/0x3280
   vxlan_xmit_one+0x14c2/0x4080
   vxlan_xmit+0xf61/0x5c00
   dev_hard_start_xmit+0xfb/0x510
   __dev_queue_xmit+0x7cd/0x32a0
   br_dev_queue_push_xmit+0x39d/0x6a0

Use skb_checksum instead of csum_partial who cannot deal with non-linear
SKBs.

Fixes: 4cb47a8 ("tunnels: PMTU discovery support for directly bridged IP packets")
Signed-off-by: Antoine Tenart <atenart@kernel.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants