From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw120992 [PATCH] [v2, 2/2] lib/net: added push MPLS header API
Date: Sun, 18 Dec 2022 05:27:47 -0500 (EST) [thread overview]
Message-ID: <20221218102747.6128245F@noxus.dpdklab.iol.unh.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 3913 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/120992
_apply patch failure_
Submitter: Tanzeel-inline <tanxeel1.ahmed@gmail.com>
Date: Saturday, December 17 2022 23:31:58
Applied on: CommitID:c581c49cd3fcaff596fbe566e270b442e6326c79
Apply patch set 120992 failed:
Checking patch lib/net/rte_mpls.h...
error: while searching for:
#define RTE_MPLS_HLEN 4 /**< Length of MPLS header. */
/**
* Insert MPLS header into the packet.
*
* If it's first MPLS header to be inserted in the packet,
* - Updates the ether type.
* - Sets the MPLS bottom-of-stack bit to 1.
*
* @param m
* The pointer to the mbuf.
* @param mp
* The pointer to the MPLS header.
* @return
* 0 on success, -1 on error (If no ethernet header exists)
*/
static inline int
rte_mpls_push_over_l2(struct rte_mbuf **m, struct rte_mpls_hdr *mp)
{
struct rte_ether_hdr *oh, *nh;
error: patch failed: lib/net/rte_mpls.h:41
error: while searching for:
if (!RTE_MBUF_DIRECT(*m) || rte_mbuf_refcnt_read(*m) > 1)
return -EINVAL;
/*Can't insert header if ethernet frame doesn't exist*/
if (rte_pktmbuf_data_len(*m) < RTE_ETHER_HDR_LEN)
return -EINVAL;
error: patch failed: lib/net/rte_mpls.h:63
error: while searching for:
mp->tag_msb = rte_cpu_to_be_16(mp->tag_msb);
/* If first MPLS header, update ether type and bottom-of-stack bit */
if (nh->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS))
{
nh->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS);
mp->bs = 1;
}
else
{
mp->bs = 0;
}
/* Copy the MPLS header after ethernet frame */
rte_memcpy(rte_pktmbuf_mtod_offset(*m, char*, sizeof(struct rte_ether_hdr)), mp, RTE_MPLS_HLEN);
(*m)->data_len += RTE_MPLS_HLEN;
return 0;
error: patch failed: lib/net/rte_mpls.h:78
Applying patch lib/net/rte_mpls.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/lib/net/rte_mpls.h b/lib/net/rte_mpls.h (rejected hunks)
@@ -41,21 +41,25 @@ struct rte_mpls_hdr {
#define RTE_MPLS_HLEN 4 /**< Length of MPLS header. */
/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice.
+ *
* Insert MPLS header into the packet.
- *
+ *
* If it's first MPLS header to be inserted in the packet,
* - Updates the ether type.
* - Sets the MPLS bottom-of-stack bit to 1.
- *
+ *
* @param m
* The pointer to the mbuf.
* @param mp
* The pointer to the MPLS header.
* @return
- * 0 on success, -1 on error (If no ethernet header exists)
+ * 0 on success, -1 on error (If no ethernet header exists)
*/
+__rte_experimental
static inline int
-rte_mpls_push_over_l2(struct rte_mbuf **m, struct rte_mpls_hdr *mp)
+rte_mpls_push_over_l2(struct rte_mbuf **m, struct rte_mpls_hdr *mp)
{
struct rte_ether_hdr *oh, *nh;
@@ -63,7 +67,7 @@ struct rte_mpls_hdr {
if (!RTE_MBUF_DIRECT(*m) || rte_mbuf_refcnt_read(*m) > 1)
return -EINVAL;
- /*Can't insert header if ethernet frame doesn't exist*/
+ /* Can't insert header if ethernet frame doesn't exist */
if (rte_pktmbuf_data_len(*m) < RTE_ETHER_HDR_LEN)
return -EINVAL;
@@ -78,18 +82,16 @@ struct rte_mpls_hdr {
mp->tag_msb = rte_cpu_to_be_16(mp->tag_msb);
/* If first MPLS header, update ether type and bottom-of-stack bit */
- if (nh->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS))
- {
+ if (nh->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS)) {
nh->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS);
mp->bs = 1;
- }
- else
- {
+ } else {
mp->bs = 0;
}
/* Copy the MPLS header after ethernet frame */
- rte_memcpy(rte_pktmbuf_mtod_offset(*m, char*, sizeof(struct rte_ether_hdr)), mp, RTE_MPLS_HLEN);
+ memcpy(rte_pktmbuf_mtod_offset(*m, struct rte_mpls_hdr*,
+ sizeof(struct rte_ether_hdr)), mp, RTE_MPLS_HLEN);
(*m)->data_len += RTE_MPLS_HLEN;
return 0;
https://lab.dpdk.org/results/dashboard/patchsets/24760/
UNH-IOL DPDK Community Lab
reply other threads:[~2022-12-18 10:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221218102747.6128245F@noxus.dpdklab.iol.unh.edu \
--to=dpdklab@iol.unh.edu \
--cc=dpdk-test-reports@iol.unh.edu \
--cc=test-report@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).