DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: Contents of dev digest...
@ 2022-07-26  4:22 Jun Qiu
  0 siblings, 0 replies; only message in thread
From: Jun Qiu @ 2022-07-26  4:22 UTC (permalink / raw)
  To: dev



-----邮件原件-----
发件人: dev-request@dpdk.org <dev-request@dpdk.org> 
发送时间: 2022年7月26日 11:35
收件人: dev@dpdk.org
主题: dev Digest, Vol 414, Issue 16

Send dev mailing list submissions to
	dev@dpdk.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://mails.dpdk.org/listinfo/dev
or, via email, send a message with subject or body 'help' to
	dev-request@dpdk.org

You can reach the person managing the list at
	dev-owner@dpdk.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of dev digest..."


Today's Topics:

   1. Re: [PATCH] net/bonding: fix xmit l34 hash calculate for tcp
      (humin (Q))
   2. [PATCH v2 00/20] Remove repeated words in comments and
      messages (Stephen Hemminger)
   3. [PATCH v2 01/20] ethdev: reword dev_info_get description.
      (Stephen Hemminger)
   4. [PATCH v2 02/20] remove repeated word 'to' (Stephen Hemminger)
   5. [PATCH v2 03/20] remove repeated word 'is' (Stephen Hemminger)
   6. [PATCH v2 04/20] remove repeated word 'same' (Stephen Hemminger)


----------------------------------------------------------------------

Message: 1
Date: Tue, 26 Jul 2022 10:02:10 +0800
From: "humin (Q)" <humin29@huawei.com>
To: Jun Qiu <jun.qiu@jaguarmicro.com>, <dev@dpdk.org>
Cc: <chas3@att.com>, <radu.nicolau@intel.com>, <stable@dpdk.org>
Subject: Re: [PATCH] net/bonding: fix xmit l34 hash calculate for tcp
Message-ID: <dc0413da-3b76-f262-9b91-7500f9557cd5@huawei.com>
Content-Type: text/plain; charset="UTF-8"; format=flowed

Acked-by: Min Hu (Connor) <humin29@huawei.com>

? 2022/7/26 8:48, Jun Qiu ??:
> In the following two cases, tcp_hdr + sizeof(*tcp_hdr) == pkt_end, and 
> the TCP port is not taken into account in calculating the HASH value 
> of TCP packets. TCP connections with the same source and destination 
> IP addresses will be hashed to the same slave port, which may cause 
> load imbalance.
> 1. TCP Pure ACK packets with no options, The header length is 20 and 
> there is no data.
> 2. A TCP packet contains data, but the first seg of the mbuf contains 
> only the header information (ETH, IP, TCP), and the data is in 
> subsequent segs, which is usually the case in the indirect mbuf used 
> for zero-copy.
>
> Fixes: 726158060d55 ("net/bonding: fix potential out of bounds read")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com>
> ---
>   drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c 
> b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 73e6972035..3bf978e2df 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -768,7 +768,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
>   						((char *)ipv4_hdr +
>   							ip_hdr_offset);
>   					if ((size_t)tcp_hdr + sizeof(*tcp_hdr)
> -							< pkt_end)
> +							<= pkt_end)
>   						l4hash = HASH_L4_PORTS(tcp_hdr);
>   				} else if (ipv4_hdr->next_proto_id ==
>   								IPPROTO_UDP) {


------------------------------

Message: 2
Date: Mon, 25 Jul 2022 20:34:43 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, Bruce Richardson
	<bruce.richardson@intel.com>
Subject: [PATCH v2 00/20] Remove repeated words in comments and
	messages
Message-ID: <20220726033503.65407-1-stephen@networkplumber.org>

This is a cleanup of comments and messages. Done by an ugly pcregrep across sources and skipping lots of false positives

The idea is based of what some maintainers have been doing in netdev.

Series-acked-by: Bruce Richardson <bruce.richardson@intel.com> 

v2
  - reword ethdev comment rather than just fix typo
  - catch more repeated words
  - make messages consistent

Stephen Hemminger (20):
  ethdev: reword dev_info_get description.
  remove repeated word 'to'
  remove repeated word 'is'
  remove repeated word 'same'
  remove repeated word 'on'
  remove repeated word 'in'
  remove repeated word 'this'
  remove repeated word 'then'
  remove repeated word 'only'
  remove repeated word 'worker'
  remove repeated word 'or'
  remove repeated word 'table'
  remove repeated word 'that'
  remove repeated word 'override'
  remove repeated word 'groups'
  remove repeated word 'page'
  remove repeated word 'individual'
  remove repeated word 'expected'
  remove repeated word 'be'
  remove repeated word 'all'

 app/test/test_ipsec.c                       |  2 +-
 app/test/test_resource.c                    |  2 +-
 drivers/common/sfc_efx/base/efx_regs_mcdi.h |  2 +-
 drivers/common/sfc_efx/base/efx_types.h     |  2 +-
 drivers/common/sfc_efx/base/siena_nvram.c   |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  4 +--
 drivers/event/sw/sw_evdev.c                 |  2 +-
 drivers/net/bnx2x/bnx2x.c                   |  2 +-
 drivers/net/bnx2x/ecore_fw_defs.h           |  2 +-
 drivers/net/bnx2x/ecore_sp.h                |  2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.h   |  2 +-
 drivers/net/cxgbe/cxgbe_filter.h            |  2 +-
 drivers/net/cxgbe/sge.c                     |  2 +-
 drivers/net/hns3/hns3_ethdev.c              |  2 +-
 drivers/net/i40e/i40e_fdir.c                |  2 +-
 drivers/net/igc/base/igc_mac.c              |  2 +-
 drivers/net/ixgbe/ixgbe_ipsec.c             |  2 +-
 drivers/net/mlx5/mlx5_flow.c                |  2 +-
 drivers/net/mvneta/mvneta_ethdev.c          |  2 +-
 drivers/net/mvpp2/mrvl_ethdev.c             |  2 +-
 drivers/net/nfp/nfp_ctrl.h                  |  2 +-
 drivers/net/pcap/pcap_ethdev.c              |  2 +-
 drivers/net/qede/qede_filter.c              |  4 +--
 drivers/net/sfc/sfc_ef10_tx.c               |  2 +-
 drivers/net/sfc/sfc_tso.c                   |  2 +-
 examples/vm_power_manager/channel_monitor.h |  2 +-
 examples/vm_power_manager/oob_monitor.h     |  2 +-
 lib/bpf/rte_bpf_ethdev.h                    |  2 +-
 lib/distributor/rte_distributor.c           |  2 +-
 lib/ethdev/rte_ethdev.h                     | 33 ++++-----------------
 lib/mbuf/rte_mbuf_core.h                    |  2 +-
 lib/net/rte_ether.h                         |  2 +-
 lib/pipeline/rte_swx_ctl.c                  |  2 +-
 lib/power/guest_channel.c                   |  2 +-
 lib/ring/rte_ring.c                         |  2 +-
 35 files changed, 41 insertions(+), 64 deletions(-)

--
2.35.1



------------------------------

Message: 3
Date: Mon, 25 Jul 2022 20:34:44 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, Thomas Monjalon
	<thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@xilinx.com>, Andrew
	Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH v2 01/20] ethdev: reword dev_info_get description.
Message-ID: <20220726033503.65407-2-stephen@networkplumber.org>

The original comment was redundant and had duplicate word 'of'.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/ethdev/rte_ethdev.h | 33 +++++----------------------------
 1 file changed, 5 insertions(+), 28 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index de9e970d4d11..48e0814f2535 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -3356,34 +3356,11 @@ int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
 /**
  * Retrieve the contextual information of an Ethernet device.
  *
- * As part of this function, a number of of fields in dev_info will be
- * initialized as follows:
- *
- * rx_desc_lim = lim
- * tx_desc_lim = lim
- *
- * Where lim is defined within the rte_eth_dev_info_get as
- *
- *  const struct rte_eth_desc_lim lim = {
- *      .nb_max = UINT16_MAX,
- *      .nb_min = 0,
- *      .nb_align = 1,
- *	.nb_seg_max = UINT16_MAX,
- *	.nb_mtu_seg_max = UINT16_MAX,
- *  };
- *
- * device = dev->device
- * min_mtu = RTE_ETHER_MIN_LEN - RTE_ETHER_HDR_LEN - RTE_ETHER_CRC_LEN
- * max_mtu = UINT16_MAX
- *
- * The following fields will be populated if support for dev_infos_get()
- * exists for the device and the rte_eth_dev 'dev' has been populated
- * successfully with a call to it:
- *
- * driver_name = dev->device->driver->name
- * nb_rx_queues = dev->data->nb_rx_queues
- * nb_tx_queues = dev->data->nb_tx_queues
- * dev_flags = &dev->data->dev_flags
+ * The device information about driver, descriptors limits,
+ * capabilities, flags,  and queues is returned.
+ *
+ * The fields are populated with generic values that then are
+ * overriden by the device driver specific values.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
-- 
2.35.1



------------------------------

Message: 4
Date: Mon, 25 Jul 2022 20:34:45 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, Andrew Rybchenko
	<andrew.rybchenko@oktetlabs.ru>, Cristian Dumitrescu
	<cristian.dumitrescu@intel.com>, David Hunt <david.hunt@intel.com>
Subject: [PATCH v2 02/20] remove repeated word 'to'
Message-ID: <20220726033503.65407-3-stephen@networkplumber.org>

Found by doing duplicate word scan.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_resource.c                  | 2 +-
 drivers/common/sfc_efx/base/siena_nvram.c | 2 +-
 lib/pipeline/rte_swx_ctl.c                | 2 +-
 lib/power/guest_channel.c                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test/test_resource.c b/app/test/test_resource.c
index 8f41e3babdc5..05c27db203cc 100644
--- a/app/test/test_resource.c
+++ b/app/test/test_resource.c
@@ -45,7 +45,7 @@ static int test_resource_c(void)
 			r->name);
 
 	TEST_ASSERT_SUCCESS(resource_fwrite_file(r, "test_resource.c"),
-			"Failed to to write file %s", r->name);
+			"Failed to write file %s", r->name);
 
 	f = fopen("test_resource.c", "r");
 	TEST_ASSERT_NOT_NULL(f,
diff --git a/drivers/common/sfc_efx/base/siena_nvram.c b/drivers/common/sfc_efx/base/siena_nvram.c
index 05ca4bd83dc9..ebcd3487b631 100644
--- a/drivers/common/sfc_efx/base/siena_nvram.c
+++ b/drivers/common/sfc_efx/base/siena_nvram.c
@@ -532,7 +532,7 @@ siena_nvram_partn_get_version(
 			: MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1;
 		/*
 		 * Ingore missing partitions on port 2, assuming they're due
-		 * to to running on a single port part.
+		 * to running on a single port part.
 		 */
 		if ((1 << dcfg_partn) &  ~enp->en_u.siena.enu_partn_mask) {
 			if (entry->port == 2)
diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c
index 710e89a46a26..9b7bf5e0fb01 100644
--- a/lib/pipeline/rte_swx_ctl.c
+++ b/lib/pipeline/rte_swx_ctl.c
@@ -1582,7 +1582,7 @@ rte_swx_ctl_pipeline_table_entry_delete(struct rte_swx_ctl_pipeline *ctl,
 	CHECK(!table_entry_check(ctl, table_id, entry, 1, 0), EINVAL);
 
 	/* The entry is found in the table->entries list:
-	 * - Move the existing entry from the table->entries list to to the
+	 * - Move the existing entry from the table->entries list to the
 	 *   table->pending_delete list.
 	 */
 	existing_entry = table_entries_find(table, entry);
diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c
index 969a9e5aaa06..7b2ae0b6506f 100644
--- a/lib/power/guest_channel.c
+++ b/lib/power/guest_channel.c
@@ -74,7 +74,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 			fd_path, lcore_id);
 	fd = open(fd_path, O_RDWR);
 	if (fd < 0) {
-		RTE_LOG(ERR, GUEST_CHANNEL, "Unable to to connect to '%s' with error "
+		RTE_LOG(ERR, GUEST_CHANNEL, "Unable to connect to '%s' with error "
 				"%s\n", fd_path, strerror(errno));
 		return -1;
 	}
-- 
2.35.1



------------------------------

Message: 5
Date: Mon, 25 Jul 2022 20:34:46 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, Andrew Rybchenko
	<andrew.rybchenko@oktetlabs.ru>, Olivier Matz <olivier.matz@6wind.com>
Subject: [PATCH v2 03/20] remove repeated word 'is'
Message-ID: <20220726033503.65407-4-stephen@networkplumber.org>

Found by doing duplicate word scan.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/common/sfc_efx/base/efx_regs_mcdi.h | 2 +-
 lib/net/rte_ether.h                         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_regs_mcdi.h b/drivers/common/sfc_efx/base/efx_regs_mcdi.h
index 2daf825a366e..f3ec456864f6 100644
--- a/drivers/common/sfc_efx/base/efx_regs_mcdi.h
+++ b/drivers/common/sfc_efx/base/efx_regs_mcdi.h
@@ -7992,7 +7992,7 @@
 #define	MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_LEN 4
 /*            Enum values, see field(s): */
 /*               MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
-/* interpretation is is sensor-specific. */
+/* interpretation is sensor-specific. */
 #define	MC_CMD_SENSOR_SET_LIMS_IN_LOW0_OFST 4
 #define	MC_CMD_SENSOR_SET_LIMS_IN_LOW0_LEN 4
 /* interpretation is is sensor-specific. */
diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
index bf8a55ba06ca..b35c72c7b0e0 100644
--- a/lib/net/rte_ether.h
+++ b/lib/net/rte_ether.h
@@ -350,7 +350,7 @@ static inline int rte_vlan_strip(struct rte_mbuf *m)
  *   The packet mbuf.
  * @return
  *   - 0: On success
- *   -EPERM: mbuf is is shared overwriting would be unsafe
+ *   -EPERM: mbuf is shared overwriting would be unsafe
  *   -ENOSPC: not enough headroom in mbuf
  */
 static inline int rte_vlan_insert(struct rte_mbuf **m)
-- 
2.35.1



------------------------------

Message: 6
Date: Mon, 25 Jul 2022 20:34:47 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, Liron Himi
	<lironh@marvell.com>, Zyta Szpak <zr@semihalf.com>
Subject: [PATCH v2 04/20] remove repeated word 'same'
Message-ID: <20220726033503.65407-5-stephen@networkplumber.org>

The word 'same' is duplicated in comment.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvneta/mvneta_ethdev.c | 2 +-
 drivers/net/mvpp2/mrvl_ethdev.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index eef016aa0b65..fc13b2547f31 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -350,7 +350,7 @@ mvneta_dev_start(struct rte_eth_dev *dev)
 	mvneta_stats_reset(dev);
 
 	/*
-	 * In case there are some some stale uc/mc mac addresses flush them
+	 * In case there are some stale uc/mc mac addresses flush them
 	 * here. It cannot be done during mvneta_dev_close() as port information
 	 * is already gone at that point (due to neta_ppio_deinit() in
 	 * mvneta_dev_stop()).
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 735efb6cfc06..19a4e3b8c329 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -858,7 +858,7 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 	}
 
 	/*
-	 * In case there are some some stale uc/mc mac addresses flush them
+	 * In case there are some stale uc/mc mac addresses flush them
 	 * here. It cannot be done during mrvl_dev_close() as port information
 	 * is already gone at that point (due to pp2_ppio_deinit() in
 	 * mrvl_dev_stop()).
-- 
2.35.1



End of dev Digest, Vol 414, Issue 16
************************************

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-26  4:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26  4:22 Contents of dev digest Jun Qiu

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).