diff mbox series

[ovs-dev,v2] dpif-netdev: Fix pmd thread comments to include SMC.

Message ID 20210909153047.51089-1-cian.ferriter@intel.com
State Accepted
Delegated to: Ilya Maximets
Headers show
Series [ovs-dev,v2] dpif-netdev: Fix pmd thread comments to include SMC. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Ferriter, Cian Sept. 9, 2021, 3:30 p.m. UTC
These comments are relevant to SMC too.

Fixes: 60d8ccae135f ("dpif-netdev: Add SMC cache after EMC cache")
Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/dpif-netdev-private-dfc.h    | 3 ++-
 lib/dpif-netdev-private-thread.h | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

Comments

Kevin Traynor Sept. 17, 2021, 4:15 p.m. UTC | #1
On 09/09/2021 16:30, Cian Ferriter wrote:
> These comments are relevant to SMC too.
> 
> Fixes: 60d8ccae135f ("dpif-netdev: Add SMC cache after EMC cache")
> Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
> Acked-by: Kevin Traynor <ktraynor@redhat.com>
> ---

Just to confirm, lgtm.

Ilya, this is a minor non-functional change. If you do wish to backport,
then perhaps just for 2.16 as for earlier OVS versions the files were
not split and patch does not apply. It doesn't seem worth manually rebasing.

>  lib/dpif-netdev-private-dfc.h    | 3 ++-
>  lib/dpif-netdev-private-thread.h | 8 ++++----
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/dpif-netdev-private-dfc.h b/lib/dpif-netdev-private-dfc.h
> index 92092ebec..3dfc91f0f 100644
> --- a/lib/dpif-netdev-private-dfc.h
> +++ b/lib/dpif-netdev-private-dfc.h
> @@ -59,7 +59,8 @@ extern "C" {
>   * Thread-safety
>   * =============
>   *
> - * Each pmd_thread has its own private exact match cache.
> + * Each pmd_thread has its own private exact match cache and signature match
> + * cache.
>   * If dp_netdev_input is not called from a pmd thread, a mutex is used.
>   */
>  
> diff --git a/lib/dpif-netdev-private-thread.h b/lib/dpif-netdev-private-thread.h
> index a782d9678..ac4885538 100644
> --- a/lib/dpif-netdev-private-thread.h
> +++ b/lib/dpif-netdev-private-thread.h
> @@ -78,10 +78,10 @@ struct dp_netdev_pmd_thread {
>      struct ovs_refcount ref_cnt;    /* Every reference must be refcount'ed. */
>      struct cmap_node node;          /* In 'dp->poll_threads'. */
>  
> -    /* Per thread exact-match cache.  Note, the instance for cpu core
> -     * NON_PMD_CORE_ID can be accessed by multiple threads, and thusly
> -     * need to be protected by 'non_pmd_mutex'.  Every other instance
> -     * will only be accessed by its own pmd thread. */
> +    /* Per thread exact match cache and signature match cache.  Note, the
> +     * instance for cpu core NON_PMD_CORE_ID can be accessed by multiple
> +     * threads, and thusly need to be protected by 'non_pmd_mutex'.  Every
> +     * other instance will only be accessed by its own pmd thread. */
>      OVS_ALIGNED_VAR(CACHE_LINE_SIZE) struct dfc_cache flow_cache;
>  
>      /* Flow-Table and classifiers
>
Ilya Maximets Oct. 12, 2021, 7:25 p.m. UTC | #2
On 9/17/21 18:15, Kevin Traynor wrote:
> On 09/09/2021 16:30, Cian Ferriter wrote:
>> These comments are relevant to SMC too.
>>
>> Fixes: 60d8ccae135f ("dpif-netdev: Add SMC cache after EMC cache")
>> Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
>> Acked-by: Kevin Traynor <ktraynor@redhat.com>
>> ---
> 
> Just to confirm, lgtm.
> 
> Ilya, this is a minor non-functional change. If you do wish to backport,
> then perhaps just for 2.16 as for earlier OVS versions the files were
> not split and patch does not apply. It doesn't seem worth manually rebasing.

Thanks!  Applied and backported to 2.16.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/dpif-netdev-private-dfc.h b/lib/dpif-netdev-private-dfc.h
index 92092ebec..3dfc91f0f 100644
--- a/lib/dpif-netdev-private-dfc.h
+++ b/lib/dpif-netdev-private-dfc.h
@@ -59,7 +59,8 @@  extern "C" {
  * Thread-safety
  * =============
  *
- * Each pmd_thread has its own private exact match cache.
+ * Each pmd_thread has its own private exact match cache and signature match
+ * cache.
  * If dp_netdev_input is not called from a pmd thread, a mutex is used.
  */
 
diff --git a/lib/dpif-netdev-private-thread.h b/lib/dpif-netdev-private-thread.h
index a782d9678..ac4885538 100644
--- a/lib/dpif-netdev-private-thread.h
+++ b/lib/dpif-netdev-private-thread.h
@@ -78,10 +78,10 @@  struct dp_netdev_pmd_thread {
     struct ovs_refcount ref_cnt;    /* Every reference must be refcount'ed. */
     struct cmap_node node;          /* In 'dp->poll_threads'. */
 
-    /* Per thread exact-match cache.  Note, the instance for cpu core
-     * NON_PMD_CORE_ID can be accessed by multiple threads, and thusly
-     * need to be protected by 'non_pmd_mutex'.  Every other instance
-     * will only be accessed by its own pmd thread. */
+    /* Per thread exact match cache and signature match cache.  Note, the
+     * instance for cpu core NON_PMD_CORE_ID can be accessed by multiple
+     * threads, and thusly need to be protected by 'non_pmd_mutex'.  Every
+     * other instance will only be accessed by its own pmd thread. */
     OVS_ALIGNED_VAR(CACHE_LINE_SIZE) struct dfc_cache flow_cache;
 
     /* Flow-Table and classifiers