NVME firmware quirk (rhbz 1455780)
Fix for IPv6 tunnels reported on bodhi)
This commit is contained in:
parent
f26079d12a
commit
8b912ff0a2
|
@ -0,0 +1,33 @@
|
|||
From 596bbd8d3752b0a922b7a5a059f47607a36ecc2e Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Lutomirski <luto@kernel.org>
|
||||
Date: Wed, 24 May 2017 15:06:31 -0700
|
||||
Subject: [PATCH] nvme: Quirk APST on Intel 600P/P3100 devices
|
||||
|
||||
They have known firmware bugs. A fix is apparently in the works --
|
||||
once fixed firmware is available, someone from Intel (Hi, Keith!)
|
||||
can adjust the quirk accordingly.
|
||||
|
||||
Cc: stable@vger.kernel.org # v4.11
|
||||
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Cc: Mario Limonciello <mario_limonciello@dell.com>
|
||||
Signed-off-by: Andy Lutomirski <luto@kernel.org>
|
||||
---
|
||||
drivers/nvme/host/pci.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
|
||||
index d8a1707..993d16c 100644
|
||||
--- a/drivers/nvme/host/pci.c
|
||||
+++ b/drivers/nvme/host/pci.c
|
||||
@@ -2171,6 +2171,8 @@ static const struct pci_device_id nvme_id_table[] = {
|
||||
{ PCI_VDEVICE(INTEL, 0x0a54),
|
||||
.driver_data = NVME_QUIRK_STRIPE_SIZE |
|
||||
NVME_QUIRK_DISCARD_ZEROES, },
|
||||
+ { PCI_VDEVICE(INTEL, 0xf1a5), /* Intel 600P/P3100 */
|
||||
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS },
|
||||
{ PCI_VDEVICE(INTEL, 0x5845), /* Qemu emulated controller */
|
||||
.driver_data = NVME_QUIRK_IDENTIFY_CNS, },
|
||||
{ PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */
|
||||
--
|
||||
2.7.5
|
||||
|
10
kernel.spec
10
kernel.spec
|
@ -636,6 +636,12 @@ Patch674: 0001-ipv6-dccp-do-not-inherit-ipv6_mc_list-from-parent.patch
|
|||
#Fix broadwell issues
|
||||
Patch675: drm-i915-Do-not-drop-pagetables-when-empty.patch
|
||||
|
||||
# rhbz 1455780
|
||||
Patch676: 2-2-nvme-Quirk-APST-on-Intel-600P-P3100-devices.patch
|
||||
|
||||
# Networking fix reported on bodhi
|
||||
Patch678: net-v2-ip6_tunnel-ip6_gre-fix-setting-of-DSCP-on-encapsulated-packets.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
|
@ -2200,6 +2206,10 @@ fi
|
|||
#
|
||||
#
|
||||
%changelog
|
||||
* Tue May 30 2017 Laura Abbott <labbott@fedoraproject.org>
|
||||
- NVME firmware quirk (rhbz 1455780)
|
||||
- Fix for IPv6 tunnels reported on bodhi)
|
||||
|
||||
* Tue May 30 2017 Justin M. Forbes <jforbes@fedoraproject.org>
|
||||
- Fix for some broadwell issues
|
||||
|
||||
|
|
|
@ -0,0 +1,156 @@
|
|||
From 479c281e52ae159f09bb7467c1ef47e3d77ef23a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Dawson <petedaws@gmail.com>
|
||||
Date: Fri, 26 May 2017 06:35:18 +1000
|
||||
Subject: [PATCH] ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated
|
||||
packets
|
||||
|
||||
This fix addresses two problems in the way the DSCP field is formulated
|
||||
on the encapsulating header of IPv6 tunnels.
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195661
|
||||
|
||||
1) The IPv6 tunneling code was manipulating the DSCP field of the
|
||||
encapsulating packet using the 32b flowlabel. Since the flowlabel is
|
||||
only the lower 20b it was incorrect to assume that the upper 12b
|
||||
containing the DSCP and ECN fields would remain intact when formulating
|
||||
the encapsulating header. This fix handles the 'inherit' and
|
||||
'fixed-value' DSCP cases explicitly using the extant dsfield u8 variable.
|
||||
|
||||
2) The use of INET_ECN_encapsulate(0, dsfield) in ip6_tnl_xmit was
|
||||
incorrect and resulted in the DSCP value always being set to 0.
|
||||
|
||||
Commit 90427ef5d2a4 ("ipv6: fix flow labels when the traffic class
|
||||
is non-0") caused the regression by masking out the flowlabel
|
||||
which exposed the incorrect handling of the DSCP portion of the
|
||||
flowlabel in ip6_tunnel and ip6_gre.
|
||||
|
||||
Fixes: 90427ef5d2a4 ("ipv6: fix flow labels when the traffic class is non-0")
|
||||
Signed-off-by: Peter Dawson <peter.a.dawson@boeing.com>
|
||||
---
|
||||
net/ipv6/ip6_gre.c | 13 +++++++------
|
||||
net/ipv6/ip6_tunnel.c | 21 +++++++++++++--------
|
||||
2 files changed, 20 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
|
||||
index 6fcb7cb..4d60164 100644
|
||||
--- a/net/ipv6/ip6_gre.c
|
||||
+++ b/net/ipv6/ip6_gre.c
|
||||
@@ -537,11 +537,10 @@ static inline int ip6gre_xmit_ipv4(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
memcpy(&fl6, &t->fl.u.ip6, sizeof(fl6));
|
||||
|
||||
- dsfield = ipv4_get_dsfield(iph);
|
||||
-
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
|
||||
- fl6.flowlabel |= htonl((__u32)iph->tos << IPV6_TCLASS_SHIFT)
|
||||
- & IPV6_TCLASS_MASK;
|
||||
+ dsfield = ipv4_get_dsfield(iph);
|
||||
+ else
|
||||
+ dsfield = ip6_tclass(t->parms.flowinfo);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
|
||||
fl6.flowi6_mark = skb->mark;
|
||||
|
||||
@@ -596,9 +595,11 @@ static inline int ip6gre_xmit_ipv6(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
memcpy(&fl6, &t->fl.u.ip6, sizeof(fl6));
|
||||
|
||||
- dsfield = ipv6_get_dsfield(ipv6h);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
|
||||
- fl6.flowlabel |= (*(__be32 *) ipv6h & IPV6_TCLASS_MASK);
|
||||
+ dsfield = ipv6_get_dsfield(ipv6h);
|
||||
+ else
|
||||
+ dsfield = ip6_tclass(t->parms.flowinfo);
|
||||
+
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL)
|
||||
fl6.flowlabel |= ip6_flowlabel(ipv6h);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
|
||||
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
|
||||
index a9692ec..15ff339 100644
|
||||
--- a/net/ipv6/ip6_tunnel.c
|
||||
+++ b/net/ipv6/ip6_tunnel.c
|
||||
@@ -1196,7 +1196,7 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
|
||||
skb_push(skb, sizeof(struct ipv6hdr));
|
||||
skb_reset_network_header(skb);
|
||||
ipv6h = ipv6_hdr(skb);
|
||||
- ip6_flow_hdr(ipv6h, INET_ECN_encapsulate(0, dsfield),
|
||||
+ ip6_flow_hdr(ipv6h, dsfield,
|
||||
ip6_make_flowlabel(net, skb, fl6->flowlabel, true, fl6));
|
||||
ipv6h->hop_limit = hop_limit;
|
||||
ipv6h->nexthdr = proto;
|
||||
@@ -1231,8 +1231,6 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (tproto != IPPROTO_IPIP && tproto != 0)
|
||||
return -1;
|
||||
|
||||
- dsfield = ipv4_get_dsfield(iph);
|
||||
-
|
||||
if (t->parms.collect_md) {
|
||||
struct ip_tunnel_info *tun_info;
|
||||
const struct ip_tunnel_key *key;
|
||||
@@ -1246,6 +1244,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
fl6.flowi6_proto = IPPROTO_IPIP;
|
||||
fl6.daddr = key->u.ipv6.dst;
|
||||
fl6.flowlabel = key->label;
|
||||
+ dsfield = ip6_tclass(key->label);
|
||||
} else {
|
||||
if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
|
||||
encap_limit = t->parms.encap_limit;
|
||||
@@ -1254,8 +1253,9 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
fl6.flowi6_proto = IPPROTO_IPIP;
|
||||
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
|
||||
- fl6.flowlabel |= htonl((__u32)iph->tos << IPV6_TCLASS_SHIFT)
|
||||
- & IPV6_TCLASS_MASK;
|
||||
+ dsfield = ipv4_get_dsfield(iph);
|
||||
+ else
|
||||
+ dsfield = ip6_tclass(t->parms.flowinfo);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
|
||||
fl6.flowi6_mark = skb->mark;
|
||||
}
|
||||
@@ -1265,6 +1265,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
|
||||
return -1;
|
||||
|
||||
+ dsfield = INET_ECN_encapsulate(dsfield, ipv4_get_dsfield(iph));
|
||||
+
|
||||
skb_set_inner_ipproto(skb, IPPROTO_IPIP);
|
||||
|
||||
err = ip6_tnl_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu,
|
||||
@@ -1298,8 +1300,6 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
ip6_tnl_addr_conflict(t, ipv6h))
|
||||
return -1;
|
||||
|
||||
- dsfield = ipv6_get_dsfield(ipv6h);
|
||||
-
|
||||
if (t->parms.collect_md) {
|
||||
struct ip_tunnel_info *tun_info;
|
||||
const struct ip_tunnel_key *key;
|
||||
@@ -1313,6 +1313,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
fl6.flowi6_proto = IPPROTO_IPV6;
|
||||
fl6.daddr = key->u.ipv6.dst;
|
||||
fl6.flowlabel = key->label;
|
||||
+ dsfield = ip6_tclass(key->label);
|
||||
} else {
|
||||
offset = ip6_tnl_parse_tlv_enc_lim(skb, skb_network_header(skb));
|
||||
/* ip6_tnl_parse_tlv_enc_lim() might have reallocated skb->head */
|
||||
@@ -1335,7 +1336,9 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
fl6.flowi6_proto = IPPROTO_IPV6;
|
||||
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
|
||||
- fl6.flowlabel |= (*(__be32 *)ipv6h & IPV6_TCLASS_MASK);
|
||||
+ dsfield = ipv6_get_dsfield(ipv6h);
|
||||
+ else
|
||||
+ dsfield = ip6_tclass(t->parms.flowinfo);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL)
|
||||
fl6.flowlabel |= ip6_flowlabel(ipv6h);
|
||||
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
|
||||
@@ -1347,6 +1350,8 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6))
|
||||
return -1;
|
||||
|
||||
+ dsfield = INET_ECN_encapsulate(dsfield, ipv6_get_dsfield(ipv6h));
|
||||
+
|
||||
skb_set_inner_ipproto(skb, IPPROTO_IPV6);
|
||||
|
||||
err = ip6_tnl_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu,
|
||||
--
|
||||
2.7.5
|
||||
|
Loading…
Reference in New Issue