[yocto] [meta-fsl-ppc 06/16] ethtool: add FSL specific patch
b19537 at freescale.com
b19537 at freescale.com
Wed Sep 12 00:06:20 PDT 2012
From: Zhenhua Luo <b19537 at freescale.com>
Signed-off-by: Zhenhua Luo <b19537 at freescale.com>
---
...ool-3.0-Enable-nfc-rx-flow-hashing-on-SPI.patch | 95 ++++++++++++++++++++
recipes-extended/ethtool/ethtool_3.0.bb | 7 +-
2 files changed, 101 insertions(+), 1 deletion(-)
create mode 100644 recipes-extended/ethtool/ethtool-3.0/ethtool-3.0-Enable-nfc-rx-flow-hashing-on-SPI.patch
diff --git a/recipes-extended/ethtool/ethtool-3.0/ethtool-3.0-Enable-nfc-rx-flow-hashing-on-SPI.patch b/recipes-extended/ethtool/ethtool-3.0/ethtool-3.0-Enable-nfc-rx-flow-hashing-on-SPI.patch
new file mode 100644
index 0000000..216e3b4
--- /dev/null
+++ b/recipes-extended/ethtool/ethtool-3.0/ethtool-3.0-Enable-nfc-rx-flow-hashing-on-SPI.patch
@@ -0,0 +1,95 @@
+From patchwork Thu Aug 30 15:44:09 2012
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [SDK1.3] ethtool-3.0: Enable nfc rx-flow hashing on SPI
+Date: Thu, 30 Aug 2012 21:44:09 -0000
+From: Claudiu Manoil <claudiu.manoil at freescale.com>
+X-Patchwork-Id: 25852
+
+This makes it possible to enable hashing of AH or ESP flows
+(IPSEC) based on their SPI (Security Parameter Index) field.
+
+Applies on top of (ethtool v3.0):
+git.kernel.org/pub/scm/network/ethtool/ethtool.git
+commit-
+"a6fc65b Release version 3.0."
+
+Signed-off-by: Pankaj Chauhan <pankaj.chauhan at freescale.com>
+Signed-off-by: Claudiu Manoil <claudiu.manoil at freescale.com>
+---
+ ethtool-copy.h | 1 +
+ ethtool.8.in | 1 +
+ ethtool.c | 14 +++++++++++---
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/ethtool-copy.h b/ethtool-copy.h
+index c7a18f7..cf20158 100644
+--- a/ethtool-copy.h
++++ b/ethtool-copy.h
+@@ -888,6 +888,7 @@ enum ethtool_sfeatures_retval_bits {
+ #define RXH_IP_DST (1 << 5)
+ #define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
+ #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
++#define RXH_AH_ESP_SPI (1 << 8) /* SPI field, for AH/ESP flows */
+ #define RXH_DISCARD (1 << 31)
+
+ #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
+diff --git a/ethtool.8.in b/ethtool.8.in
+index 7a0bd43..a640317 100644
+--- a/ethtool.8.in
++++ b/ethtool.8.in
+@@ -601,6 +601,7 @@ s Hash on the IP source address of the rx packet.
+ d Hash on the IP destination address of the rx packet.
+ f Hash on bytes 0 and 1 of the Layer 4 header of the rx packet.
+ n Hash on bytes 2 and 3 of the Layer 4 header of the rx packet.
++S Hash on the SPI field (4 bytes), for AH/ESP packets.
+ r T{
+ Discard all packets of this flow type. When this option is set, all
+ other options are ignored.
+diff --git a/ethtool.c b/ethtool.c
+index 943dfb7..bb9d592 100644
+--- a/ethtool.c
++++ b/ethtool.c
+@@ -231,7 +231,7 @@ static struct option {
+ { "-N", "--config-nfc", MODE_SNFC, "Configure Rx network flow "
+ "classification options",
+ " [ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|"
+- "tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... ]\n" },
++ "tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|S|r... ]\n" },
+ { "-x", "--show-rxfh-indir", MODE_GRXFHINDIR, "Show Rx flow hash "
+ "indirection" },
+ { "-X", "--set-rxfh-indir", MODE_SRXFHINDIR, "Set Rx flow hash indirection",
+@@ -728,8 +728,10 @@ static int rxflow_str_to_type(const char *str)
+ flow_type = TCP_V4_FLOW;
+ else if (!strcmp(str, "udp4"))
+ flow_type = UDP_V4_FLOW;
+- else if (!strcmp(str, "ah4") || !strcmp(str, "esp4"))
+- flow_type = AH_ESP_V4_FLOW;
++ else if (!strcmp(str, "ah4"))
++ flow_type = AH_V4_FLOW;
++ else if (!strcmp(str, "esp4"))
++ flow_type = ESP_V4_FLOW;
+ else if (!strcmp(str, "sctp4"))
+ flow_type = SCTP_V4_FLOW;
+ else if (!strcmp(str, "tcp6"))
+@@ -1538,6 +1540,9 @@ static int parse_rxfhashopts(char *optstr, u32 *data)
+ case 'n':
+ *data |= RXH_L4_B_2_3;
+ break;
++ case 'S':
++ *data |= RXH_AH_ESP_SPI;
++ break;
+ case 'r':
+ *data |= RXH_DISCARD;
+ break;
+@@ -1577,6 +1582,9 @@ static char *unparse_rxfhashopts(u64 opts)
+ if (opts & RXH_L4_B_2_3) {
+ strcat(buf, "L4 bytes 2 & 3 [TCP/UDP dst port]\n");
+ }
++ if (opts & RXH_AH_ESP_SPI) {
++ strcat(buf, "SPI field (AH/ESP header)\n");
++ }
+ } else {
+ sprintf(buf, "None");
+ }
diff --git a/recipes-extended/ethtool/ethtool_3.0.bb b/recipes-extended/ethtool/ethtool_3.0.bb
index cc4862d..ca73055 100644
--- a/recipes-extended/ethtool/ethtool_3.0.bb
+++ b/recipes-extended/ethtool/ethtool_3.0.bb
@@ -5,7 +5,12 @@ SECTION = "console/network"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz"
+PR = "r1"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/ethtool-3.0:"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+ file://ethtool-3.0-Enable-nfc-rx-flow-hashing-on-SPI.patch "
SRC_URI[md5sum] = "a339cbdcbe1c1fbe377c36d84231bda6"
SRC_URI[sha256sum] = "9b9caffc0ee3567b607618ca5bc85505230d66cd9d5caa1c333760b3885f0ae4"
--
1.7.9.5
More information about the yocto
mailing list