1. 29 11月, 2020 6 次提交
    • A
      net: ipa: update gsi registers for IPA v4.5 · b0b6f0dd
      Alex Elder 提交于
      Very few GSI register definitions change for IPA v4.5, however
      as a group their position in memory shifts a constant amount
      (handled by the next commit).
      
      Add definitions and update comments to the set of GSI registers to
      support changes that come with IPA v4.5.
      
      Update the logic in gsi_channel_program() to accommodate the new
      (expanded) PREFETCH_MODE field in the CH_C_QOS register.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      b0b6f0dd
    • A
      net: ipa: add support to code for IPA v4.5 · 8bfc4e21
      Alex Elder 提交于
      Update the IPA code to make use of the updated IPA v4.5 register
      definitions.  Generally what this patch does is, if IPA v4.5
      hardware is in use:
        - Ensure new registers or fields in IPA v4.5 are updated where
          required
        - Ensure registers or fields not supported in IPA v4.5 are not
          examined when read, or are set to 0 when written
      It does this while preserving the existing functionality for IPA
      versions lower than v4.5.
      
      The values to program for QSB_MAX_READS and QSB_MAX_WRITES and the
      source and destination resource counts are updated to be correct for
      all versions through v4.5 as well.
      
      Note that IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX
      already reflect that 5 is an acceptable number of resources (which
      IPA v4.5 implements).
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8bfc4e21
    • A
      net: ipa: add new most-significant bits to registers · 1af15c2a
      Alex Elder 提交于
      IPA v4.5 adds a few fields to the endpoint header and extended
      header configuration registers that represent new high-order bits
      for certain offsets and sizes.  Add code to incorporate these upper
      bits into the registers for IPA v4.5.
      
      This includes creating ipa_header_size_encoded(), which handles
      encoding the metadata offset field for use in the ENDP_INIT_HDR
      register in a way appropriate for the hardware version.  This and
      ipa_metadata_offset_encoded() ensure the mask argument passed to
      u32_encode_bits() is constant.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      1af15c2a
    • A
      net: ipa: update IPA registers for IPA v4.5 · 5b6cd69e
      Alex Elder 提交于
      Update "ipa_reg.h" so that register definitions support IPA hardware
      version 4.5, in addition to versions 3.5.1 through v4.2.  Most of
      the register definitions are the same, but in some cases fields are
      added, changed, or eliminated.
      
      Updates for a few IPA v4.5 registers are more complex, and adding
      those definition will be deferred to separate patches.  This patch
      only updates the register offset and field definitions, and adds
      informational comments.
      
      The only code change avoids accessing the backward compatibility
      register for IPA version 4.5 in ipa_hardware_config().  Other IPA
      v4.5-specific code changes will come later.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      5b6cd69e
    • A
      net: ipa: reverse logic on escape buffer use · 9f848198
      Alex Elder 提交于
      Starting with IPA v4.2 there is a GSI channel option to use an
      "escape buffer" instead of prefetch buffers.  This should be used
      for all channels *except* the AP command TX channel.  The logic
      that implements this has it backwards; fix this bug.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      9f848198
    • M
      net/sched: act_ct: enable stats for HW offloaded entries · 3567e233
      Marcelo Ricardo Leitner 提交于
      By setting NF_FLOWTABLE_COUNTER. Otherwise, the updates added by
      commit ef803b3c ("netfilter: flowtable: add counter support in HW
      offload") are not effective when using act_ct.
      
      While at it, now that we have the flag set, protect the call to
      nf_ct_acct_update() by commit beb97d3a ("net/sched: act_ct: update
      nf_conn_acct for act_ct SW offload in flowtable") with the check on
      NF_FLOWTABLE_COUNTER, as also done on other places.
      
      Note that this shouldn't impact performance as these stats are only
      enabled when net.netfilter.nf_conntrack_acct is enabled.
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Acked-by: Nwenxu <wenxu@ucloud.cn>
      Acked-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Link: https://lore.kernel.org/r/481a65741261fd81b0a0813e698af163477467ec.1606415787.git.marcelo.leitner@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      3567e233
  2. 28 11月, 2020 34 次提交