Skip to content

Commit

Permalink
patch: update dpdk patches
Browse files Browse the repository at this point in the history
  • Loading branch information
ywc689 committed Nov 13, 2019
1 parent e0c0ed0 commit b3e4eb4
Show file tree
Hide file tree
Showing 11 changed files with 507 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b5843bda351920c27be5e8211ef6fa5d548fa03e Mon Sep 17 00:00:00 2001
From 52f4389c80b4b41386c53daf16d860305252f325 Mon Sep 17 00:00:00 2001
From: Lei Chen <raychen@qiyi.com>
Date: Tue, 23 Jan 2018 12:39:56 +0800
Subject: [PATCH] kni: use netlink event for multicast (driver part).
Subject: [PATCH 1/4] kni: use netlink event for multicast (driver part).

kni driver send netlink event every time hw-multicast list updated by
kernel, the user kni app should capture the event and update multicast
Expand All @@ -27,7 +27,7 @@ index db9f489..fab94d1 100644

#include <exec-env/rte_kni_common.h>
#include <kni_fifo.h>
@@ -579,9 +581,75 @@ kni_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
@@ -579,9 +581,75 @@
return 0;
}

Expand Down Expand Up @@ -104,5 +104,5 @@ index db9f489..fab94d1 100644

static int
--
2.7.4
1.8.3.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c2dfa35bbd68b869f9069ca9b7474dd93e2097ef Mon Sep 17 00:00:00 2001
From a949f95267849630a750f1e72ee468d58b806589 Mon Sep 17 00:00:00 2001
From: Lei Chen <raychen@qiyi.com>
Date: Tue, 6 Mar 2018 16:04:36 +0800
Subject: [PATCH 2/2] net: support variable IP header len for checksum API.
Subject: [PATCH 2/4] net: support variable IP header len for checksum API.

IPv4 checksum APIs use fixe IP header length, it will failed if there is
any IP option. Now calculating header length by "ihl" field, so that we
Expand All @@ -13,10 +13,10 @@ Signed-off-by: Lei Chen <raychen@qiyi.com>
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 4491b86..cfbc3bd 100644
index 73ec398..e03f707 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -314,7 +314,7 @@ static inline uint16_t
@@ -314,7 +314,7 @@ struct ipv4_hdr {
rte_ipv4_cksum(const struct ipv4_hdr *ipv4_hdr)
{
uint16_t cksum;
Expand All @@ -25,7 +25,7 @@ index 4491b86..cfbc3bd 100644
return (cksum == 0xffff) ? cksum : ~cksum;
}

@@ -356,7 +356,7 @@ rte_ipv4_phdr_cksum(const struct ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
@@ -356,7 +356,7 @@ struct ipv4_hdr {
} else {
psd_hdr.len = rte_cpu_to_be_16(
(uint16_t)(rte_be_to_cpu_16(ipv4_hdr->total_length)
Expand All @@ -34,7 +34,7 @@ index 4491b86..cfbc3bd 100644
}
return rte_raw_cksum(&psd_hdr, sizeof(psd_hdr));
}
@@ -381,7 +381,7 @@ rte_ipv4_udptcp_cksum(const struct ipv4_hdr *ipv4_hdr, const void *l4_hdr)
@@ -381,7 +381,7 @@ struct ipv4_hdr {
uint32_t l4_len;

l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) -
Expand All @@ -44,5 +44,5 @@ index 4491b86..cfbc3bd 100644
cksum = rte_raw_cksum(l4_hdr, l4_len);
cksum += rte_ipv4_phdr_cksum(ipv4_hdr, 0);
--
2.7.4
1.8.3.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 34d3d8ebc02906739d9ee6c152091eaf628a292e Mon Sep 17 00:00:00 2001
From 3f2c917cc758f3205ea38447dc7a82215c448cc0 Mon Sep 17 00:00:00 2001
From: Daniel Benli Ye <yebenli@bytedance.com>
Date: Tue, 18 Dec 2018 09:01:52 -0500
Subject: [PATCH] enable pdump and change dpdk-pdump tool for DPVS
Subject: [PATCH 3/4] enable pdump and change dpdk-pdump tool for DPVS

A fix in app/pdump/main.c is x-ported from later release.
rte.app.pdump.mk is copied from rte.app.mk and do several changes
Expand Down Expand Up @@ -30,7 +30,7 @@ diff --git a/app/pdump/main.c b/app/pdump/main.c
index 66272f5..d974583 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -583,11 +583,10 @@ configure_vdev(uint16_t port_id)
@@ -583,11 +583,10 @@ struct parse_val {
{
struct ether_addr addr;
const uint16_t rxRings = 0, txRings = 1;
Expand Down Expand Up @@ -411,5 +411,5 @@ index 0000000..e425472
+.PHONY: FORCE
+FORCE:
--
2.1.4
1.8.3.1

25 changes: 0 additions & 25 deletions patch/dpdk-stable-17.11.2/0003-rh75-ndo_change_mtu.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 95e115dd2bfe5f7a7e54af0f73577af0a68fdba0 Mon Sep 17 00:00:00 2001
From: wencyu <yuwenchao@qiyi.com>
Date: Wed, 13 Nov 2019 10:17:35 +0800
Subject: [PATCH 4/4] patch dpdk-17.11.2 to support rh75 (provided by Jason Joo
<hblzxsj@163.com>)

---
lib/librte_eal/linuxapp/kni/compat.h | 6 ++++++
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++
2 files changed, 12 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 3f8c0bc..be707bc 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -101,6 +101,12 @@
#undef NET_NAME_UNKNOWN
#endif

+#if (defined(RHEL_RELEASE_CODE) && \
+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
+#define ndo_change_mtu ndo_change_mtu_rh74
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
#endif
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 443a3f2..46cad90 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3932,6 +3932,12 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb,
#define vlan_tx_tag_present skb_vlan_tag_present
#endif

+#if (defined(RHEL_RELEASE_CODE) && \
+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
+#define ndo_change_mtu ndo_change_mtu_rh74
+#endif
+
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)) || \
(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12, 3, 0)))
#define HAVE_VF_VLAN_PROTO
--
1.8.3.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From dd72a3e2a760131f156f61a37df8826514f1ed4c Mon Sep 17 00:00:00 2001
From b5dc636f0ccdccb3d4e94f3453b6e95a631bb10a Mon Sep 17 00:00:00 2001
From: ywc689 <ywc689@163.com>
Date: Fri, 28 Jun 2019 17:52:13 +0800
Subject: [PATCH 2/2] kni: use netlink event for multicast (driver part)
Subject: [PATCH 1/3] kni: use netlink event for multicast (driver part)

kni driver send netlink event every time hw-multicast list updated by
kernel, the user kni app should capture the event and update multicast
Expand All @@ -11,13 +11,13 @@ original way is using rte_kni_request to pass hw-multicast to user kni
module. that method works but finally memory corruption found, which is
to kni device.
---
.../lib/librte_eal/linuxapp/kni/kni_net.c | 68 ++++++++++++++++++++++
lib/librte_eal/linuxapp/kni/kni_net.c | 68 +++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

diff --git a/dpdk-stable-17.11.6/lib/librte_eal/linuxapp/kni/kni_net.c b/dpdk-stable-17.11.6/lib/librte_eal/linuxapp/kni/kni_net.c
diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c
index db9f489..fab94d1 100644
--- a/dpdk-stable-17.11.6/lib/librte_eal/linuxapp/kni/kni_net.c
+++ b/dpdk-stable-17.11.6/lib/librte_eal/linuxapp/kni/kni_net.c
--- a/lib/librte_eal/linuxapp/kni/kni_net.c
+++ b/lib/librte_eal/linuxapp/kni/kni_net.c
@@ -35,6 +35,8 @@
#include <linux/skbuff.h>
#include <linux/kthread.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
From 648ff9e42e58a4fe6587dce05b534fb746ae438f Mon Sep 17 00:00:00 2001
From 4be86649fd61173409040093eecffdbc30570988 Mon Sep 17 00:00:00 2001
From: ywc689 <ywc689@163.com>
Date: Fri, 28 Jun 2019 17:48:12 +0800
Subject: [PATCH 1/2] net: support variable IP header len for checksum API.
Subject: [PATCH 2/3] net: support variable IP header len for checksum API.

IPv4 checksum APIs use fixe IP header length, it will failed if there is
any IP option. Now calculating header length by "ihl" field, so that we
can support options.
---
dpdk-stable-17.11.6/lib/librte_net/rte_ip.h | 13 +++++++------
lib/librte_net/rte_ip.h | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dpdk-stable-17.11.6/lib/librte_net/rte_ip.h b/dpdk-stable-17.11.6/lib/librte_net/rte_ip.h
diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 8d4907f..0d504f6 100644
--- a/dpdk-stable-17.11.6/lib/librte_net/rte_ip.h
+++ b/dpdk-stable-17.11.6/lib/librte_net/rte_ip.h
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -314,7 +314,7 @@ struct ipv4_hdr {
rte_ipv4_cksum(const struct ipv4_hdr *ipv4_hdr)
{
Expand Down
Loading

0 comments on commit b3e4eb4

Please sign in to comment.