[PATCH] net/i40e: enable max frame size at port level

2021-12-07 Thread dapengx . yu
From: Dapeng Yu Currently max frame size is set at queue level, which makes the values of the following counters wrong when a jumbo frame is received. The expected value: rx_good_bytes: 0 rx_errors: 1 rx_oversize_errors: 1 The actual value: rx_good_bytes: 1626 rx_errors: 0 rx_oversize_errors: 0

[PATCH v2] net/ice: track the DCF state of PF

2021-11-24 Thread dapengx . yu
From: Dapeng Yu When VF is reset, PF will change DCF state from ON to other state, if flow creation, destroy, or redirect command is sent to DCF at this time, it will fail. This patch tracks DCF state and returns try-again error to caller when DCF state is not ON. Cc: sta...@dpdk.org Signed-of

[PATCH] net/ice: track the DCF state of PF

2021-11-22 Thread dapengx . yu
From: Dapeng Yu When VF is reset, PF will change DCF state from ON to other state, if flow creation, destroy, or redirect command is sent to DCF at this time, it will fail. This patch tracks DCF state and returns try-again error to caller when DCF state is not ON. Cc: sta...@dpdk.org Signed-of

[dpdk-dev] [PATCH] doc: update release notes for DCF reset API

2021-11-10 Thread dapengx . yu
From: Dapeng Yu The ice DCF device reset has been supported. Release notes is updated to synchronize with the feature. Signed-off-by: Dapeng Yu --- doc/guides/rel_notes/release_21_11.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/re

[dpdk-dev] [PATCH] net/ice: fix AdminQ handling on DCF passive reset

2021-11-08 Thread dapengx . yu
From: Dapeng Yu DCF tries to handle AdminQ when DCF is reset by PF, however the invalid data may be returned, and error log may be output in this situation. This patch stops handling AdminQ when a passive reset is detected to avoid this situation. Fixes: 7564d5509611 ("net/ice: add DCF hardware

[dpdk-dev] [PATCH v4 2/2] net/ice: fix flow redirect failure

2021-11-04 Thread dapengx . yu
From: Dapeng Yu It's possible that a switch rule can't be redirect successfully due to kernel driver is busy to handle an ongoing VF reset, so the redirect action need to be deferred into next redirect request which is promised by kernel driver after VF reset done. This patch uses the saved flow

[dpdk-dev] [PATCH v4 1/2] net/ice: save rule on switch filter creation

2021-11-04 Thread dapengx . yu
From: Dapeng Yu The VSI number, lookup elements and rule information for creating switch filter are abandoned when switch filter is created in original implementation. This patch saved the abandoned data in RTE flow, it is for future use on replay when handling exception at flow redirect. Cc: s

[dpdk-dev] [PATCH v3 1/2] net/ice: save rule on switch filter creation

2021-11-04 Thread dapengx . yu
From: Dapeng Yu The VSI number, lookup elements and rule information for creating switch filter are abandoned when switch filter is created in original implementation. This patch saved the abandoned data in RTE flow, it is for future use on replay when handling exception at flow redirect. Cc: s

[dpdk-dev] [PATCH v3 2/2] net/ice: fix flow redirect failure

2021-11-04 Thread dapengx . yu
From: Dapeng Yu It's possible that a switch rule can't be redirect successfully due to kernel driver is busy to handle an ongoing VF reset, so the redirect action need to be deferred into next redirect request which is promised by kernel driver after VF reset done. This patch uses the saved flow

[dpdk-dev] [PATCH v2 2/2] net/ice: fix flow redirect failure

2021-11-03 Thread dapengx . yu
From: Dapeng Yu It's possible that a switch rule can't be redirect successfully due to kernel driver is busy to handle an ongoing VF reset, so the redirect action need to be deferred into next redirect request which is promised by kernel driver after VF reset done. This patch uses the saved flow

[dpdk-dev] [PATCH v2 1/2] net/ice: save rule on switch filter creation

2021-11-03 Thread dapengx . yu
From: Dapeng Yu The VSI number, lookup elements and rule information for creating switch filter are abandoned when switch filter is created in original implementation. This patch saved the abandoned data in RTE flow, it is for future use on replay when handling exception at flow redirect. Cc: s

[dpdk-dev] [PATCH 2/2] net/ice: fix flow redirect failure

2021-11-01 Thread dapengx . yu
From: Dapeng Yu When the switch flow rules are redirected, if rule is removed but not added successfully, the rule addition in the next time will not succeed because the rule's meta cannot be found. This patch uses the saved flow rule's meta when the flow rule is added again to make the addition

[dpdk-dev] [PATCH 1/2] net/ice: save meta on switch filter creation

2021-11-01 Thread dapengx . yu
From: Dapeng Yu The meta is abandoned when switch filter is created in original implementation. This patch saved the meta in RTE flow for future use. Fixes: 47d460d63233 ("net/ice: rework switch filter") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/ice/ice_switch_filter.c | 6

[dpdk-dev] [PATCH] net/ice: remove VSI update on DCF reset by PF

2021-10-28 Thread dapengx . yu
From: Dapeng Yu After DCF is reset by PF, the VSI update service is unable to be completed since the DCF resource is invalid. This patch removes the call to service that updates VSI since it is useless and output too many error messages. Fixes: c7e1a1a3bfeb ("net/ice: refactor DCF VLAN handling

[dpdk-dev] [PATCH] net/iavf: fix shared local data in multi-process

2021-10-27 Thread dapengx . yu
From: Dapeng Yu The shared pointer is initialized to a static local array defined in the primary process and it shall not be accessed in the secondary process. This patch copies the local data to shared data, to avoid data access violation. Fixes: 040b44551f77 ("net/iavf: unify Rx packet type t

[dpdk-dev] [PATCH v5] net/ice: simplify the use of DCF device reset

2021-10-26 Thread dapengx . yu
From: Dapeng Yu After DCF is reset by PF, the DCF device un-initialization cannot function normally since the kernel may not clean up resource. This patch detects the reset flag, which is set by PF on DCF reset, if the flag is true, reset hw to trigger an additional DCF enable/disable cycle whic

[dpdk-dev] [PATCH] net/ice: change RTE log level to DEBUG

2021-10-26 Thread dapengx . yu
From: Dapeng Yu When VF is reset in high frequency, the AdminQ command may fail, but the failure can be recovered actually. So the error messages for getting VF resource, getting VSI map, and re-directing flows should be suppressed, in order to avoid causing concern for DCF users. Fixes: 7564d55

[dpdk-dev] [PATCH v4] net/ice: simplify the use of DCF device reset

2021-10-26 Thread dapengx . yu
From: Dapeng Yu After DCF is reset by PF, the DCF device un-initialization cannot function normally since the resource is already invalidated. So reset DCF twice is necessary, the first simplified reset re-initializes the AdminQ of DCF, only then second reset can clean the filters successfully.

[dpdk-dev] [PATCH v3] net/ice: simplify the use of DCF device reset

2021-10-26 Thread dapengx . yu
From: Dapeng Yu After DCF is reset by PF, the DCF device un-initialization cannot function normally since the resource is already invalidated. So reset DCF twice is necessary, the first simplified reset re-initializes the AdminQ of DCF, only then second reset can clean the filters successfully.

[dpdk-dev] [PATCH v5] net/ice: fix function pointer in multi-process

2021-10-25 Thread dapengx . yu
From: Dapeng Yu This patch uses the index value to call the function, instead of the function pointer assignment to save the selection of Receive Flex Descriptor profile ID. Otherwise the secondary process will run with wrong function address from primary process. Fixes: 7a340b0b4e03 ("net/ice:

[dpdk-dev] [PATCH] net/ice: fix flow redirect failure

2021-10-25 Thread dapengx . yu
From: Dapeng Yu When the switch flow rules are redirected, if rule is removed but not added successfully, the rule will lost meta data, and cannot be added. This patch saves the flow rule's meta, so when the flow rule is added again, the meta can be used to make addition succeed. Fixes: 397b4b3

[dpdk-dev] [PATCH v2] net/ice: simplify the use of DCF device reset

2021-10-25 Thread dapengx . yu
From: Dapeng Yu After DCF is reset by PF, the DCF device un-initialization cannot function normally since the resource is already invalidated. So reset DCF twice is necessary, the first reset re-initializes the DCF, only then second reset can clean the filters successfully. This patch detects th

[dpdk-dev] [PATCH] net/ice: simplify the use of DCF device reset

2021-10-24 Thread dapengx . yu
From: Dapeng Yu After DCF is reset by PF, the DCF device un-initialization cannot function normally since the resource is already invalidated. So reset DCF twice is necessary, the first reset re-initializes the DCF, only then second reset can clean the filters successfully. This patch detects th

[dpdk-dev] [PATCH v4] net/ice: fix function pointer in multi-process

2021-10-24 Thread dapengx . yu
From: Dapeng Yu This patch uses the index value to call the function, instead of the function pointer assignment to save the selection of Receive Flex Descriptor profile ID. Otherwise the secondary process will run with wrong function address from primary process. Fixes: 7a340b0b4e03 ("net/ice:

[dpdk-dev] [PATCH v3] net/ice: fix function pointer in multi-process

2021-10-24 Thread dapengx . yu
From: Dapeng Yu This patch uses the index value to call the function, instead of the function pointer assignment to save the selection of Receive Flex Descriptor profile ID. Otherwise the secondary process will run with wrong function address from primary process. Fixes: 7a340b0b4e03 ("net/ice:

[dpdk-dev] [PATCH v2] net/ice: fix function pointer in multi-process

2021-10-22 Thread dapengx . yu
From: Dapeng Yu The sharing of function pointer may cause crash of secondary process. This patch removes the shared function pointer: "rxd_to_pkt_fields" in the instance of "struct ice_rx_queue" which is shared between primary and secondary process, and uses an index of function pointer array to

[dpdk-dev] [PATCH] net/ice: fix function pointer in multi-process

2021-10-20 Thread dapengx . yu
From: Dapeng Yu The sharing of function pointer may cause crash of secondary process. This patch fixes it. Fixes: 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/ice/ice_rxtx.c | 35 +++ driver

[dpdk-dev] [PATCH] net/ice: fix sideband queue initialization

2021-10-19 Thread dapengx . yu
From: Dapeng Yu Sideband queue need to be initialized when device is initialized. Otherwise the calling to function "ice_init_ctrlq" may fail. This patch fixes it. Fixes: 97f4f78bbd9f ("net/ice/base: add functions for device clock control") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- dr

[dpdk-dev] [PATCH v2] net/softnic: fix memory leak of meter policy

2021-10-13 Thread dapengx . yu
From: Dapeng Yu After the meter policies are created, they are not freed on device close. This patch fixes it. Fixes: 5f0d54f372f0 ("ethdev: add pre-defined meter policy API") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- V2: * Rebase on top of main branch --- drivers/net/softnic/rte_eth_

[dpdk-dev] [PATCH] net/ice: fix deadlock on flow redirect

2021-10-11 Thread dapengx . yu
From: Dapeng Yu If flow redirect failed, the spinlock will not be unlocked. This patch fixes it. Fixes: bc9201388d56 ("net/ice: support flow redirect") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/ice/ice_generic_flow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(

[dpdk-dev] [PATCH] net/ice: fix freeing queues on DCF device reset

2021-10-11 Thread dapengx . yu
From: Dapeng Yu In function ice_dcf_stop_queues(), RX queues and TX queues are actually not freed, so their pointers shall not be set to NULL when queues are stopped. This patch adds function call to free queues on DCF device close and reset, which also set the RX and TX queues' pointers to NULL

[dpdk-dev] [PATCH v3] net/iavf: fix multi-process shared data

2021-10-10 Thread dapengx . yu
From: Dapeng Yu When the iavf_adapter instance is not initialized completedly in the primary process, the secondary process accesses its "rte_eth_dev" member, it causes secondary process crash. This patch replaces eth_dev with eth_dev_data in iavf_adapter. Fixes: f978c1c9b3b5 ("net/iavf: add RS

[dpdk-dev] [PATCH v2] net/iavf: fix multi-process shared data

2021-10-08 Thread dapengx . yu
From: Dapeng Yu When the iavf_adapter instance is not initialized completedly in the primary process, the secondary process accesses its "rte_eth_dev" member, it causes secondary process crash. This patch replaces eth_dev with eth_dev_data in iavf_adapter. Fixes: f978c1c9b3b5 ("net/iavf: add RS

[dpdk-dev] [PATCH] net/softnic: fix memory leak of meter policy

2021-09-30 Thread dapengx . yu
From: Dapeng Yu After the meter policies are created, they are not freed on device close. This patch fixes it. Fixes: 5f0d54f372f0 ("ethdev: add pre-defined meter policy API") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/softnic/rte_eth_softnic_meter.c | 12 1 fi

[dpdk-dev] [PATCH] net/iavf: fix multi-process shared data

2021-09-27 Thread dapengx . yu
From: Dapeng Yu When the iavf_adapter instance is not initialized completedly in the primary process, the secondary process accesses its "rte_eth_dev" member, it causes secondary process crash. This patch replaces adapter->eth_dev with rte_eth_devices[port_id] in the data paths where rte_eth_dev

[dpdk-dev] [PATCH v2] net/ice: retry getting VF VSI map after it fails

2021-09-24 Thread dapengx . yu
From: Dapeng Yu The request of getting VF VSI map request may fail when DCF is busy, this patch adds retry mechanism to make it able to succeed. Fixes: b09d34ac8584 ("net/ice: fix flow redirector") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- V2: * Remove goto --- drivers/net/ice/ice_dcf

[dpdk-dev] [PATCH] net/bonding: fix memory leak on closing device

2021-09-14 Thread dapengx . yu
From: Dapeng Yu If the bond device was created by vdev mode, the kvlist was not free after the bond device was closed. This patch fixes it. Fixes: 144dc4739975 ("net/bonding: fix leak on remove") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++-

[dpdk-dev] [PATCH] net/ice: retry getting VF VSI map after it fails

2021-09-13 Thread dapengx . yu
From: Dapeng Yu The request of getting VF VSI map request may fail when DCF is busy, this patch adds retry mechanism to make it able to succeed. Fixes: b09d34ac8584 ("net/ice: fix flow redirector") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/ice/ice_dcf.c | 15 +--

[dpdk-dev] [PATCH v4] net/ice/base: get PF ID of VF's parent

2021-09-12 Thread dapengx . yu
From: Dapeng Yu In original implementation, if DCF is created on PF1, the PF ID is still 0, but not 1. Without the right PF ID, the ACL will not work. This patch makes VF to get its parent's physical function ID. Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF") CC: sta...@dpdk.o

[dpdk-dev] [PATCH v3] net/ice: fix representor port segmentation fault

2021-09-06 Thread dapengx . yu
From: Dapeng Yu If DCF representor port is closed after DCF port is closed, there will be segmentation fault because representor accesses the released resource of DCF port. This patch checks if the resource is present before accessing. Fixes: 5674465a32c8 ("net/ice: add DCF VLAN handling") Cc:

[dpdk-dev] [PATCH] net/ice: fix double free ACL flow entry

2021-09-03 Thread dapengx . yu
From: Dapeng Yu If call ice_flow_rem_entry() directly without checking entry_id, may cause an ACL flow entry to be freed more than once. This patch tries to find entry_id first, then call ice_flow_rem_entry() to avoid the defect. Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF") Cc: st

[dpdk-dev] [PATCH v2] net/ice: fix representor port segmentation fault

2021-09-02 Thread dapengx . yu
From: Dapeng Yu If DCF representor port is closed after DCF port is closed, there will be segmentation fault because representor accesses the released resource of DCF port. This patch makes DCF representor port is always closed before DCF port is closed. Fixes: 5674465a32c8 ("net/ice: add DCF V

[dpdk-dev] [PATCH] net/ice: fix representor port segmentation fault

2021-09-02 Thread dapengx . yu
From: Dapeng Yu If DCF representor port is closed after DCF port is closed, there will be segmentation fault because representor accesses the released resource of DCF port. This patch makes DCF representor port is always closed before DCF port is closed. Fixes: 5674465a32c8 ("net/ice: add DCF V

[dpdk-dev] [PATCH] net/ice: enable CVL DCF device reset API

2021-08-31 Thread dapengx . yu
From: Dapeng Yu DCF PMD needs to support rte_eth_dev_reset, the reason is when a DCF instance is killed, all the flow rules still exists in hardware, when DCF gets to reconnect, it already lost the flow context, and if the application wants to create new rules, it may fail due to firmware reports

[dpdk-dev] [PATCH v3] net/ice/base: get PF ID of VF's parent

2021-08-31 Thread dapengx . yu
From: Dapeng Yu In original implementation, if DCF is created on PF1, the PF ID is still 0, but not 1. Without the right PF ID, the ACL will not work. This patch makes VF to get its parent's physical function ID. Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF") CC: sta...@dpdk.o

[dpdk-dev] [PATCH v2] net/ice/base: get PF ID of VF's parent

2021-08-30 Thread dapengx . yu
From: Dapeng Yu In original implementation, if DCF is created on PF1, the PF ID is still 0, but not 1. Without the right PF ID, the ACL will not work. This patch makes VF to get its parent's physical function ID. Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF") CC: sta...@dpdk.o

[dpdk-dev] [PATCH 2/2] net/ice: get PF ID of VF's parent

2021-08-18 Thread dapengx . yu
From: Dapeng Yu In original implementation, when DCF is initialized, the physical function ID of its parent adapter is not set correctly. Its initial value is always zero, even if DCF is created on 1# physical function and, further, causes ACL to initialize wrongly. Finally, the ACL flow rule can

[dpdk-dev] [PATCH 1/2] net/ice/base: get PF ID of VF's parent

2021-08-18 Thread dapengx . yu
From: Dapeng Yu In original implementation, when one or more VFs are created, and VF0 is used as DCF, there is no way to get the physical function ID of their parent adapter via VF0. The physical function ID is critical for initializing ACL feature, if wrong physical function ID is used, the ACL

[dpdk-dev] [PATCH v2] net/softnic: fix memory leak as profile is freed

2021-07-27 Thread dapengx . yu
From: Dapeng Yu In function softnic_table_action_profile_free(), the memory referenced by pointer "ap" in the instance of "struct softnic_table_action_profile" is not freed. This patch fixes it. Fixes: a737dd4e5863 ("net/softnic: add table action profile") Cc: sta...@dpdk.org Signed-off-by: Da

[dpdk-dev] [PATCH] net/softnic: fix null pointer dereference

2021-07-27 Thread dapengx . yu
From: Dapeng Yu When there is no "firmware" in arguments, the "firmware" pointer is null, and will be dereferenced by rte_strscpy(). This patch moves the code block which copies character string from "firmware" to "p->firmware" into the "if" statements where "firmware" argument exists and it is

[dpdk-dev] [PATCH v4] net/softnic: fix memory leak in parsing arguments

2021-07-14 Thread dapengx . yu
From: Dapeng Yu In function pmd_parse_args(), firmware path is duplicated from device arguments as character string, but is never freed, which cause memory leak. This patch changes the type of firmware member of struct pmd_params to character array, to make memory resource release unnecessary, a

[dpdk-dev] [PATCH v3] net/softnic: fix memory leak in parsing arguments

2021-07-13 Thread dapengx . yu
From: Dapeng Yu In function pmd_parse_args(), firmware path is duplicated from device arguments as character string, but is never freed, which cause memory leak. This patch changes the type of firmware member of struct pmd_params to character array, to make memory resource release unnecessary, a

[dpdk-dev] [PATCH v2] net/softnic: fix memory leak in parsing arguments

2021-07-13 Thread dapengx . yu
From: Dapeng Yu In function pmd_parse_args(), firmware path is duplicated from device arguments as character string, but is never freed, which cause memory leak. This patch changes the type of firmware member of struct pmd_params to character array, to make memory resource release unnecessary, a

[dpdk-dev] [PATCH] net/softnic: fix memory leak as profile is freed

2021-07-13 Thread dapengx . yu
From: Dapeng Yu In function softnic_table_action_profile_free(), the memory referenced by pointer "ap" in the instance of "struct softnic_table_action_profile" is not freed. This patch fixes it. Fixes: a737dd4e5863 ("net/softnic: add table action profile") Cc: sta...@dpdk.org Signed-off-by: Da

[dpdk-dev] [PATCH] net/softnic: fix memory leak in connection init

2021-07-08 Thread dapengx . yu
From: Dapeng Yu In function softnic_conn_init(), a block of memory is allocated as connection buffer, but it is never freed in softnic_conn_free(), which cause memory leak. This patch fixes it. Fixes: 7709a63bf178 ("net/softnic: add connection agent") Cc: sta...@dpdk.org Signed-off-by: Dapeng

[dpdk-dev] [PATCH v2] net/ixgbe: fix using heap pointer after free

2021-07-08 Thread dapengx . yu
From: Dapeng Yu The original code use a heap pointer after it is freed. This patch fix it. Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- V2: * Simplify the patch according to maintainer's comment: only one "pmd_flow" in the list

[dpdk-dev] [PATCH] net/ixgbe: fix using heap pointer after free

2021-07-08 Thread dapengx . yu
From: Dapeng Yu The original code use a heap pointer after it is freed. This patch fix it. Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/ixgbe/ixgbe_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) dif

[dpdk-dev] [PATCH] net/softnic: fix memory leak in parsing arguments

2021-07-08 Thread dapengx . yu
From: Dapeng Yu In function pmd_parse_args(), firmware path is duplicated from device arguments as character string, but is never freed, which cause memory leak. This patch changes the type of firmware member of struct pmd_params to character array, to make memory resource release unnecessary, a

[dpdk-dev] [PATCH v2] net/i40e: fix data path corrupt on secondary process

2021-06-21 Thread dapengx . yu
From: Dapeng Yu The rte_eth_devices array is not in share memory, it should not be referenced by i40e_adapter which is shared by primary and secondary. Any process set i40e_adapter->eth_dev will corrupt another process's context. The patch removed the field "eth_dev" from i40e_adapter. Now, when

[dpdk-dev] [PATCH 2/2] net/ice: fix VXLAN flow director creation error

2021-06-15 Thread dapengx . yu
From: Dapeng Yu In original implementation, error returned when creating VXLAN flow director with SCTP or TCP as layer 4 protocol of inner segment. There are several root causes for the error: 1. ice_fdir_input_set_hdrs() set ICE_FLOW_SEG_HDR_UDP into protocol header flag of inner segment of VXL

[dpdk-dev] [PATCH 1/2] net/ice/base: fix VXLAN flow director creation error

2021-06-15 Thread dapengx . yu
From: Dapeng Yu In original implementation, error returned when creating VXLAN flow director with SCTP or TCP as layer 4 protocol of inner segment. There are several root causes for the error: 1. ice_fdir_udp4_vxlan_pkt[] is not adapted to the TCP and SCTP protocol. Its length cannot hold TCP he

[dpdk-dev] [PATCH] net/i40e: fix data path corrupt on secondary process

2021-06-09 Thread dapengx . yu
From: Dapeng Yu The rte_eth_devices array is not in share memory, it should not be referenced by i40e_adapter which is shared by primary and secondary. Any process set i40e_adapter->eth_dev will corrupt another process' context. The patch removed the field "eth_dev" from i40e_adapter. Now, when

[dpdk-dev] [PATCH] net/i40e: fix wrong data path selection in secondary process

2021-06-09 Thread dapengx . yu
From: Dapeng Yu The flag use_avx2 and use_avx512 are defined as local variables, they will not be aware by the secondary process, then wrong data path is selected. Fix the issue by moving them into struct i40e_adapter. Fixes: 6ada10deac66 ("net/i40e: remove devarg use-latest-supported-vec") Fixe

[dpdk-dev] [PATCH] net/i40e: fix using heap pointer after free

2021-06-03 Thread dapengx . yu
From: Dapeng Yu The original code use a heap pointer after it is freed. Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/i40e/i40e_fdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[dpdk-dev] [PATCH] net/ice: fix default RSS key generation

2021-05-26 Thread dapengx . yu
From: Dapeng Yu In original implementation, device reconfiguration will generate a new default RSS key if there is no one from user, it is unexpected when updating a completely unrelated configuration. This patch makes default RSS key unchanged, during the lifetime of the DPDK application even i

[dpdk-dev] [PATCH] net/ice: fix VXLAN flow rule creation error

2021-05-25 Thread dapengx . yu
From: Dapeng Yu In original implementation, error returned when creating VXLAN flow rule with SCTP or TCP as layer 4 protocol of inner segment. There are several root causes for the error: 1. ice_fdir_input_set_hdrs() set ICE_FLOW_SEG_HDR_UDP into protocol header flag of inner segment of VXLAN F

[dpdk-dev] [PATCH] net/softnic: initialize meter policy list before use

2021-04-29 Thread dapengx . yu
From: Dapeng Yu Initialize meter policy list before use to avoid segment fault Fixes: 0d73ddf25faa ("net/softnic: add meter profile") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/softnic/rte_eth_softnic_meter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net

[dpdk-dev] [PATCH] net/ice: fix VXLAN flow rule creation error

2021-04-28 Thread dapengx . yu
From: Dapeng Yu In original implementation, error returned when creating VXLAN flow rule with SCTP or TCP as layer 3 protocol of inner segment. There are several root causes for the error: 1. ice_fdir_input_set_hdrs() set ICE_FLOW_SEG_HDR_UDP into protocol header flag of inner segment of VXLAN F

[dpdk-dev] [PATCH] app/testpmd: fix queue Rx and Tx offload reconfig cmd

2021-04-01 Thread dapengx . yu
From: Dapeng Yu Configure per queue rx offloading and per queue tx offloading command shouldn't trigger the rte_eth_dev_configure() to reconfigure device. The patch sets the queue reconfiguration flag only, and does not set the device reconfiguration flag. Therefore after port is restarted, rte_

[dpdk-dev] [PATCH v2] examples/packet_ordering: use local port config

2021-03-19 Thread dapengx . yu
From: Dapeng Yu A global ethernet port configuration is assigned to local variable because in this way the local variable may be updated as required. But this local variable is not used as input of rte_eth_dev_configure() in original implementation, and cause that fast mbuf free feature cannot be

[dpdk-dev] [PATCH] examples/packet_ordering: use local port config

2021-03-10 Thread dapengx . yu
From: Dapeng Yu A global ethernet port configuration is assigned to local variable because in this way the local variable may be updated as required. But this local variable is not used as input of rte_eth_dev_configure() in original implementation, and cause that fast mbuf free feature cannot be

[dpdk-dev] [PATCH] doc: update firmware/driver mapping table for i40e

2021-03-08 Thread dapengx . yu
From: Dapeng Yu Update i40e PMD firmware/driver mapping table. Signed-off-by: Dapeng Yu --- doc/guides/nics/i40e.rst | 4 1 file changed, 4 insertions(+) diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index 2ab1e0122..d86212db1 100644 --- a/doc/guides/nics/i40e.rst +++

[dpdk-dev] [PATCH] net/e1000: remove MTU setting limitation

2021-02-19 Thread dapengx . yu
From: Dapeng Yu Currently, if requested MTU is bigger than mbuf size and scattered receive is not enabled, setting MTU to that value fails. This patch allows setting this special MTU when device is stopped, because scattered_rx will be re-configured during next port start and driver may enable s

[dpdk-dev] [PATCH v2] net/igc: remove MTU setting limitation

2021-02-19 Thread dapengx . yu
From: Dapeng Yu Currently, if requested MTU is bigger than mbuf size and scattered receive is not enabled, setting MTU to that value fails. This patch allows setting this special MTU when device is stopped, because scattered_rx will be re-configured during next port start and driver may enable s

[dpdk-dev] [PATCH] net/igc: remove MTU setting limitation

2021-02-19 Thread dapengx . yu
From: Dapeng Yu Currently, if requested MTU is bigger than mbuf size and scattered receive is not enabled, setting MTU to that value fails. This patch allows setting this special MTU when device is stopped, because scattered_rx will be re-configured during next port start and driver may enable s

[dpdk-dev] [PATCH] net/i40e: fix register setting for hash enable

2021-01-26 Thread dapengx . yu
From: Dapeng Yu The original code causes wrong value to be set into PFQF_HENA register because unnecessary calling to get translated pctype value for X722 NIC. The result is RSS cannot work. So remove the unnecessary translation. Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow") Cc: sta...@dp

[dpdk-dev] [PATCH v3] net/ixgbe: disable NFS filtering

2021-01-25 Thread dapengx . yu
From: Dapeng Yu Disable NFS header filtering whether NFS packets coalescing are required or not, in order to make RSS can work on NFS packets. The code without the patch does follow datasheet, but not consistent with the ixgbe kernel driver. It causes NFS packets to be filtered and make them flo

[dpdk-dev] [PATCH v2] app/testpmd: avoid exit without terminal restore

2021-01-24 Thread dapengx . yu
From: Dapeng Yu In interactive mode, if testpmd exit by calling rte_exit without restore terminal attributes, terminal will not echo keyboard input. register a function with atexit() in prompt(), when exit() in rte_exit() is called, the registered function restores terminal attributes. Fixes: 5

[dpdk-dev] [PATCH v2] net/ixgbe: disable NFS filtering

2021-01-24 Thread dapengx . yu
From: Dapeng Yu Disable NFS header filtering whether NFS packets coalescing are required or not. This behavior is aligned with ixgbe kernel driver. Fixes: b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled") Fixes: 8eecb3295aed ("ixgbe: add LRO support") Cc: sta...@dpdk.org

[dpdk-dev] [PATCH] net/ixgbe: disable NFS filtering

2021-01-20 Thread dapengx . yu
From: Dapeng Yu Disable NFS header filtering whether NFS packets coalescing are required or not. This behavior is aligned with ixgbe kernel driver. Fixes: b826efba6de4 ("net/ixgbe: align register setting when RSC is disabled") Cc: sta...@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/ixgb

[dpdk-dev] [PATCH] net/iavf: fix vector id assignment

2021-01-08 Thread dapengx . yu
From: YU DAPENG The number of MSI-X interrupts on Rx shall be the minimal value of the number of available MSI-X interrupts per VF - 1 (the 1 is for miscellaneous interrupt) and the number of configured Rx queues. The current code break the rule because the number of available MSI-X interrupts is

[dpdk-dev] [PATCH] net/iavf: fix vector id assignment

2020-12-29 Thread dapengx . yu
From: YU DAPENG When the interrupt handle instance allows none packet I/O interrupts, the max value of vector_id is set to be less than the number of msix interrupts, but not equal to it. Which may cause same vector_id is sent to PF with opcode VIRTCHNL_OP_CONFIG_IRQ_MAP to setup the cause of int

[dpdk-dev] [PATCH] app/testpmd: avoid exit without resource release

2020-12-23 Thread dapengx . yu
From: YU DAPENG In interactive mode, if testpmd exit by calling rte_exit without cmdline resource release, terminal will not echo keyboard input. So add code to just show error message, but not exit testpmd when unexpected happens on starting packet forwarding in interactive mode. User can type "

[dpdk-dev] [PATCH] net/ice: check Rx queue number on RSS init

2020-12-22 Thread dapengx . yu
From: YU DAPENG When RSS is initialized, rx queues number is used as denominator to set default value into the RSS lookup table. If it is zero, there will be error of being divided by 0. So add value check to avoid the error. Fixes: 50370662b727 ("net/ice: support device and queue ops") Cc: sta.

[dpdk-dev] [PATCH v2] net/ixgbe: fix fdirctrl register setting

2020-12-15 Thread dapengx . yu
From: YU DAPENG The function ixgbe_fdir_set_flexbytes_offset is used when create FDir rule for flexbytes. It set a register: FDIRCTRL.FLEX_OFFSET, which cause that even if the FDir flexbytes rule is destroyed, the rule still direct the packet and transfer it to the wrong place. It is because sett

[dpdk-dev] [PATCH] net/ixgbe: fix fdirctrl register setting

2020-12-10 Thread dapengx . yu
From: YU DAPENG The function ixgbe_fdir_set_flexbytes_offset is used when create FDir rule for flexbytes. It set a register: FDIRCTRL.FLEX_OFFSET, which cause that even if the FDir flexbytes rule is destroyed, the rule still direct the packet and transfer it to the wrong place. It is because Sett