[PATCH net-next 1/4] ipv6: Resolve comment that EH processing order is being violated

2019-05-26 Thread Tom Herbert
RFC8200 (which obsoletes RFC2460) on the basis that later headers are only being parsed and not actually processed. Signed-off-by: Tom Herbert --- net/ipv6/exthdrs_core.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6

[PATCH net-next 0/4] ipv6: Update RFC references and implement ICMP errors for limits

2019-05-26 Thread Tom Herbert
(that draft is in working group last call in IETF) Tom Herbert (4): ipv6: Resolve comment that EH processing order is being violated ipv6: Update references from RFC2460 to RFC8200 ipv6: Reference RFC8504 for limits in padding and EH ipv6: Send ICMP errors for exceeding extension header

[PATCH net-next 4/4] ipv6: Send ICMP errors for exceeding extension header limits

2019-05-26 Thread Tom Herbert
dropped in the above cases bump IPSTATS_MIB_INHDRERRORS. Signed-off-by: Tom Herbert --- include/uapi/linux/icmpv6.h | 6 ++ net/ipv6/exthdrs.c | 35 ++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/icmpv6.h b/include

[PATCH net-next 2/4] ipv6: Update references from RFC2460 to RFC8200

2019-05-26 Thread Tom Herbert
IPv6 is now a full Internet standard in RFC8200! Update references in the code to reflect that. Signed-off-by: Tom Herbert --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 2 +- drivers/net/usb/smsc95xx.c | 2 +- net/ipv6/exthdrs.c

[PATCH net-next 3/4] ipv6: Reference RFC8504 for limits in padding and EH

2019-05-26 Thread Tom Herbert
RFC8504 specifies requirements for applying limits to Hop-by-Hop and Destination Options extension headers and options (including padding). Reference this RFC appropriately. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 9 + net/ipv6/exthdrs.c | 3 ++- 2 files changed, 7

[PATCH net-next] ipv6: Send ICMP errors for exceeding extension header limits

2019-05-28 Thread Tom Herbert
dropped in the above cases bump IPSTATS_MIB_INHDRERRORS. Signed-off-by: Tom Herbert --- include/uapi/linux/icmpv6.h | 6 ++ net/ipv6/exthdrs.c | 35 ++- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/icmpv6.h b/include

[PATCH net-next 2/6] seg6: Implement a TLV parsing loop

2019-05-30 Thread Tom Herbert
. Signed-off-by: Tom Herbert --- include/net/seg6.h | 6 ++ net/ipv6/seg6.c| 60 +++--- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/include/net/seg6.h b/include/net/seg6.h index 8b2dc68..563d4a6 100644 --- a/include/net

[PATCH net-next 0/6] seg6: Segment routing fixes

2019-05-30 Thread Tom Herbert
A few bug fixes, code clean up, and minor enhancements to segment routing. Changes include: - Fix SRH TLV definitions - Implement a TLV parsing loop - Eliminate the HMAC flag - Support to rearrange segment routing header for AH ICV calculation Tom Herbert (6): seg6: Fix TLV

[PATCH net-next 4/6] ah6: Create function __zero_out_mutable_opts

2019-05-30 Thread Tom Herbert
Destination Options. The function will be used to support zeroing out mutable SRH TLVs' data with the appropriate arguments for SRH TLVs. Signed-off-by: Tom Herbert --- net/ipv6/ah6.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/net/ipv

[PATCH net-next 5/6] ah6: Be explicit about which routing types are processed.

2019-05-30 Thread Tom Herbert
. Update reference in comment to more current RFC. Signed-off-by: Tom Herbert --- net/ipv6/ah6.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 1e80157..032491c 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6

[PATCH net-next 1/6] seg6: Fix TLV definitions

2019-05-30 Thread Tom Herbert
The definitions of TLVs in uapi/linux/seg6.h are incorrect and incomplete. Fix this. TLV constants are defined for PAD1, PADN, and HMAC (the three defined in draft-ietf-6man-segment-routing-header-19). The other TLV are unused and not correct so they are removed. Signed-off-by: Tom Herbert

[PATCH net-next 3/6] seg6: Remove HMAC flag and implement seg6_find_hmac_tlv

2019-05-30 Thread Tom Herbert
parsing function also eliminates the assumption in seg6_get_tlv_hmac that the HMAC TLV must be the first TLV. Signed-off-by: Tom Herbert --- include/net/seg6.h| 12 +++- include/uapi/linux/seg6.h | 3 --- net/ipv6/exthdrs.c| 2 +- net/ipv6/seg6.c | 12

[PATCH net-next 6/6] seg6: Add support to rearrange SRH for AH ICV calculation

2019-05-30 Thread Tom Herbert
. Signed-off-by: Tom Herbert --- net/ipv6/ah6.c | 24 1 file changed, 24 insertions(+) diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 032491c..0c5ca29 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -27,6 +27,7 @@ #include #include #include +#include

Re: [PATCH net-next 1/6] seg6: Fix TLV definitions

2019-05-30 Thread Tom Herbert
On Thu, May 30, 2019 at 3:18 PM David Miller wrote: > > From: Tom Herbert > Date: Thu, 30 May 2019 14:50:16 -0700 > > > TLV constants are defined for PAD1, PADN, and HMAC (the three defined in > > draft-ietf-6man-segment-routing-header-19). The other TLV are unused and

Re: [PATCH bpf-next v5 3/6] bpf: Add IPv6 Segment Routing helpers

2019-05-30 Thread Tom Herbert
On Sat, May 12, 2018 at 8:26 AM Mathieu Xhonneux wrote: > > The BPF seg6local hook should be powerful enough to enable users to > implement most of the use-cases one could think of. After some thinking, > we figured out that the following actions should be possible on a SRv6 > packet, requiring 3

Re: [PATCH net-next 6/6] seg6: Add support to rearrange SRH for AH ICV calculation

2019-05-31 Thread Tom Herbert
On Fri, May 31, 2019 at 7:05 AM Ahmed Abdelsalam wrote: > > On Thu, 30 May 2019 14:50:21 -0700 > Tom Herbert wrote: > > > Mutable fields related to segment routing are: destination address, > > segments left, and modifiable TLVs (those whose high order bit is set)

[RFC PATCH 0/6] seg6: Segment routing fixes

2019-05-31 Thread Tom Herbert
for AH ICV calculation Set as RFC to let experts on segment routing implemenation evaluate which of the patches are needed. Tom Herbert (6): seg6: Fix TLV definitions seg6: Implement a TLV parsing loop seg6: Obsolete unused SRH flags ah6: Create function __zero_out_mutable_opts ah6

[RFC PATCH 2/6] seg6: Implement a TLV parsing loop

2019-05-31 Thread Tom Herbert
. Signed-off-by: Tom Herbert --- include/net/seg6.h | 6 ++ net/ipv6/seg6.c| 60 +++--- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/include/net/seg6.h b/include/net/seg6.h index 8b2dc68..563d4a6 100644 --- a/include/net

[RFC PATCH 5/6] ah6: Be explicit about which routing types are processed.

2019-05-31 Thread Tom Herbert
. Update reference in comment to more current RFC. Signed-off-by: Tom Herbert --- net/ipv6/ah6.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 1e80157..032491c 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6

[RFC PATCH 3/6] seg6: Obsolete unused SRH flags

2019-05-31 Thread Tom Herbert
TLV must be the first TLV. Signed-off-by: Tom Herbert --- include/net/seg6.h| 12 +++- include/uapi/linux/seg6.h | 49 --- net/ipv6/exthdrs.c| 2 +- net/ipv6/seg6.c | 12 ++-- net/ipv6/seg6_hmac.c | 8

[RFC PATCH 1/6] seg6: Fix TLV definitions

2019-05-31 Thread Tom Herbert
The definitions of TLVs in uapi/linux/seg6.h are incorrect and incomplete. Fix this. TLV constants are defined for PAD1, PADN, and HMAC (the three defined in draft-ietf-6man-segment-routing-header-19). The other TLV are unused and and are marked as obsoleted. Signed-off-by: Tom Herbert

[RFC PATCH 6/6] seg6: Add support to rearrange SRH for AH ICV calculation

2019-05-31 Thread Tom Herbert
. Signed-off-by: Tom Herbert --- net/ipv6/ah6.c | 24 1 file changed, 24 insertions(+) diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 032491c..0c5ca29 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -27,6 +27,7 @@ #include #include #include +#include

[RFC PATCH 4/6] ah6: Create function __zero_out_mutable_opts

2019-05-31 Thread Tom Herbert
Destination Options. The function will be used to support zeroing out mutable SRH TLVs' data with the appropriate arguments for SRH TLVs. Signed-off-by: Tom Herbert --- net/ipv6/ah6.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/net/ipv

Re: [RFC PATCH 6/6] seg6: Add support to rearrange SRH for AH ICV calculation

2019-05-31 Thread Tom Herbert
On Fri, May 31, 2019 at 10:07 AM Ahmed Abdelsalam wrote: > > On Fri, 31 May 2019 09:48:40 -0700 > Tom Herbert wrote: > > > Mutable fields related to segment routing are: destination address, > > segments left, and modifiable TLVs (those whose high order bit is set)

Re: [RFC PATCH 6/6] seg6: Add support to rearrange SRH for AH ICV calculation

2019-06-02 Thread Tom Herbert
On Sun, Jun 2, 2019 at 2:54 AM Ahmed Abdelsalam wrote: > > On Fri, 31 May 2019 10:34:03 -0700 > Tom Herbert wrote: > > > On Fri, May 31, 2019 at 10:07 AM Ahmed Abdelsalam > > wrote: > > > > > > On Fri, 31 May 2019 09:48:40 -0700 > > > Tom Herb

[PATCH v2 net-next] ipv6: Send ICMP errors for exceeding extension header limits

2019-06-03 Thread Tom Herbert
of the packet. * ICMPV6_HDR_FIELD - Sent if a data byte in PADN is non-zero Signed-off-by: Tom Herbert --- include/uapi/linux/icmpv6.h | 6 ++ net/ipv6/exthdrs.c | 50 + 2 files changed, 48 insertions(+), 8 deletions(-) diff

Re: [PATCH v2 net-next] ipv6: Send ICMP errors for exceeding extension header limits

2019-06-05 Thread Tom Herbert
On Wed, Jun 5, 2019 at 5:11 PM David Miller wrote: > > From: Tom Herbert > Date: Mon, 3 Jun 2019 08:47:47 -0700 > > > Define constants and add support to send ICMPv6 Parameter Problem > > errors as specified in draft-ietf-6man-icmp-limits-02. > > Tom, I've ki

[RFC v2 PATCH 0/5] seg6: Segment routing fixes

2019-06-07 Thread Tom Herbert
routing TLVs - Add sysctls for segment routing TLV parsing limits - Segment routing receive functions call ip6_parse_tlv Tom Herbert (5): seg6: Fix TLV definitions seg6: Obsolete unused SRH flags ipv6: Paramterize TLV parsing seg6: Add sysctl limits for segment routing header seg6

[RFC v2 PATCH 2/5] seg6: Obsolete unused SRH flags

2019-06-07 Thread Tom Herbert
as opposed to relying on the now obsolete flag. Signed-off-by: Tom Herbert --- include/uapi/linux/seg6.h | 43 --- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/seg6.h b/include/uapi/linux/seg6.h index 3a7d324..0d19a9c

[RFC v2 PATCH 1/5] seg6: Fix TLV definitions

2019-06-07 Thread Tom Herbert
The definitions of TLVs in uapi/linux/seg6.h are out of date and incomplete. Fix this. TLV constants are defined for PAD1, PADN, and HMAC (the three defined in draft-ietf-6man-segment-routing-header-19). The other TLV are unused and and are marked as obsoleted. Signed-off-by: Tom Herbert

[RFC v2 PATCH 3/5] ipv6: Paramterize TLV parsing

2019-06-07 Thread Tom Herbert
Add parameters to ip6_parse_tlv that will allow leveraging the function for parsing segment routing TLVs. The new parameters are offset of TLVs, length of the TLV block, and a function that is called in the case of an unrecognized option. Signed-off-by: Tom Herbert --- net/ipv6/exthdrs.c | 35

[RFC v2 PATCH 5/5] seg6: Leverage ip6_parse_tlv

2019-06-07 Thread Tom Herbert
: Tom Herbert --- include/net/seg6.h | 5 + include/net/seg6_hmac.h | 2 +- net/ipv6/exthdrs.c | 51 ++--- net/ipv6/seg6_hmac.c| 16 +++- net/ipv6/seg6_local.c | 21 ++-- 5 files changed, 72 insertions

[RFC v2 PATCH 4/5] seg6: Add sysctl limits for segment routing header

2019-06-07 Thread Tom Herbert
These are analoguous to the sysctls that were defined for IPv6 Destination and Hop-by-Hop Options. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 31 ++- include/net/netns/ipv6.h | 2 ++ net/ipv6/af_inet6.c| 2 ++ net/ipv6/sysctl_net_ipv6.c

Re: [RFC v2 PATCH 1/5] seg6: Fix TLV definitions

2019-06-08 Thread Tom Herbert
On Sat, Jun 8, 2019 at 2:50 AM David Lebrun wrote: > > On 07/06/2019 19:55, Tom Herbert wrote: > > -#define SR6_TLV_PADDING 4 > > From a uapi perspective, should we rather keep the definition and mark > it as obsoleted as for the rest of the TLV types ? >

Re: [RFC v2 PATCH 0/5] seg6: Segment routing fixes

2019-06-08 Thread Tom Herbert
On Sat, Jun 8, 2019 at 3:39 AM David Lebrun wrote: > > On 07/06/2019 19:55, Tom Herbert wrote: > > This patch set includes fixes to bring the segment routing > > implementation into conformance with the latest version of the > > draft (draft-ietf-6man-segment-routing-h

Flow label persistence

2020-11-19 Thread Tom Herbert
HI, A potential issue came up on v6ops list in IETF that Linux stack changes the flow label for a connection at every RTO, this is the feature where we change the txhash on a failing connection to try to find a route (the flow label is derived from the txhash). The problem with changing the flow l

Re: [PATCH net-next] flow_dissector: Add IPv6 flow label to symmetric keys

2020-08-17 Thread Tom Herbert
On Wed, Aug 5, 2020 at 1:27 AM Willem de Bruijn wrote: > > On Tue, Aug 4, 2020 at 5:57 PM Tom Herbert wrote: > > > > The definition for symmetric keys does not include the flow label so > > that when symmetric keys is used a non-zero IPv6 flow label is not > > extr

Re: [PATCH 7/8] rhashtable: add rhashtable_walk_prev()

2018-05-05 Thread Tom Herbert
On Sat, May 5, 2018 at 2:43 AM, Herbert Xu wrote: > On Fri, May 04, 2018 at 01:54:14PM +1000, NeilBrown wrote: >> rhashtable_walk_prev() returns the object returned by >> the previous rhashtable_walk_next(), providing it is still in the >> table (or was during this grace period). >> This works eve

Re: [net-next PATCH 0/3] Symmetric queue selection using XPS for Rx queues

2018-05-08 Thread Tom Herbert
On Thu, Apr 19, 2018 at 7:41 PM, Eric Dumazet wrote: > On Thu, Apr 19, 2018 at 6:07 PM Amritha Nambiar > wrote: > >> This patch series implements support for Tx queue selection based on >> Rx queue map. This is done by configuring Rx queue map per Tx-queue >> using sysfs attribute. If the user co

Re: [net-next PATCH 1/3] net: Refactor XPS for CPUs and Rx queues

2018-05-09 Thread Tom Herbert
On Thu, Apr 19, 2018 at 6:04 PM, Amritha Nambiar wrote: > Refactor XPS code to support Tx queue selection based on > CPU map or Rx queue map. > > Signed-off-by: Amritha Nambiar > --- > include/linux/netdevice.h | 82 +- > net/core/dev.c| 206 >

Re: [PATCH net] strparser: Fix sign of err codes

2018-03-26 Thread Tom Herbert
On Mon, Mar 26, 2018 at 12:31 PM, Dave Watson wrote: > strp_parser_err is called with a negative code everywhere, which then > calls abort_parser with a negative code. strp_msg_timeout calls > abort_parser directly with a positive code. Negate ETIMEDOUT > to match signed-ness of other calls. > >

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-15 Thread Tom Herbert
On Tue, Aug 15, 2017 at 3:42 PM, Shaohua Li wrote: > On Tue, Aug 15, 2017 at 07:08:31AM -0700, Tom Herbert wrote: >> On Mon, Aug 14, 2017 at 7:52 PM, Shaohua Li wrote: >> > On Fri, Aug 11, 2017 at 06:00:20PM -0700, Tom Herbert wrote: >> >> On Thu, Aug 10, 2017

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-17 Thread Tom Herbert
On Thu, Aug 17, 2017 at 10:26 AM, Shaohua Li wrote: > On Tue, Aug 15, 2017 at 05:15:46PM -0700, Tom Herbert wrote: >> On Tue, Aug 15, 2017 at 3:42 PM, Shaohua Li wrote: >> > On Tue, Aug 15, 2017 at 07:08:31AM -0700, Tom Herbert wrote: >> >> On Mon, Aug 14, 2017

Re: [PATCH V4 net 0/2] ipv6: fix flowlabel issue for reset packet

2017-08-18 Thread Tom Herbert
> We had been using the auto_flowlabels=1 (i.e. essentially enable flowlabel) > mainly because we want to take the benefit of dst_negative_advice() when > tcp_write_timeout() happens. > > During our test, our system handles quite well with changing flowlabel. > The only exception we have hit is the

Re: [PATCH] strparser: initialize all callbacks

2017-08-25 Thread Tom Herbert
tptr_t)&bpf_insns, > .license = (uintptr_t)"", > }; > > int main(void) > { > int bpf_fd = syscall(__NR_bpf, BPF_PROG_LOAD, > &bpf_attr, sizeof(bpf_attr)); > int inet_fd = socket(AF_INET, S

[PATCH v4 net-next 4/7] ip6tlvs: Registration of TLV handlers and parameters

2019-08-23 Thread Tom Herbert
From: Tom Herbert Create a single TLV parameter table that holds meta information for IPv6 Hop-by-Hop and Destination TLVs. The data structure is composed of a 256 element array of u8's (one entry for each TLV type to allow O(1) lookup). Each entry provides an offset into an array of TLV

[PATCH v4 net-next 1/7] ipeh: Create exthdrs_options.c and ipeh.h

2019-08-23 Thread Tom Herbert
From: Tom Herbert Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. Create include net/ipeh.h to contain common definitions for IP extension headers. Signed-off-by: Tom Herbert

[PATCH v4 net-next 6/7] ip6tlvs: Add netlink interface

2019-08-23 Thread Tom Herbert
From: Tom Herbert Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipeh.h | 16 +++ include/net/ipv6.h

[PATCH v4 net-next 0/7] ipv6: Extension header infrastructure

2019-08-23 Thread Tom Herbert
declared inside parameter list in ipeh.h v4: - Resubmit Tom Herbert (7): ipeh: Create exthdrs_options.c and ipeh.h ipeh: Move generic EH functions to exthdrs_common.c ipeh: Generic TLV parser ip6tlvs: Registration of TLV handlers and parameters ip6tlvs: Add TX parameters ip6tlvs: Add

[PATCH v4 net-next 3/7] ipeh: Generic TLV parser

2019-08-23 Thread Tom Herbert
From: Tom Herbert Create a generic TLV parser. This will be used with various extension headers that carry options including Destination, Hop-by-Hop, Segment Routing TLVs, and other cases of simple stateless parsing. Signed-off-by: Tom Herbert --- include/net/ipeh.h| 25 net

[PATCH v4 net-next 5/7] ip6tlvs: Add TX parameters

2019-08-23 Thread Tom Herbert
From: Tom Herbert Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipeh.h | 18 include/uapi/linux/ipeh.h | 8 +++ net/ipv6

[PATCH v4 net-next 2/7] ipeh: Move generic EH functions to exthdrs_common.c

2019-08-23 Thread Tom Herbert
From: Tom Herbert Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers

[PATCH v4 net-next 7/7] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-08-23 Thread Tom Herbert
From: Tom Herbert Validate Destination and Hop-by-Hop options. This uses the information in the TLV parameters table to validate various aspects of both individual TLVs as well as a list of TLVs in an extension header. There are two levels of validation that can be performed: simple checks and

Re: [PATCH v2] kcm: remove any offset before parsing messages

2019-02-20 Thread Tom Herbert
On Tue, Feb 19, 2019 at 8:12 PM Dominique Martinet wrote: > > Dominique Martinet wrote on Fri, Feb 15, 2019: > > With all that said I guess my patch should work correctly then, I'll try > > to find some time to check the error does come back up the tcp socket in > > my reproducer but I have no rea

Re: [PATCH v2] kcm: remove any offset before parsing messages

2019-02-22 Thread Tom Herbert
On Thu, Feb 21, 2019 at 12:22 AM Dominique Martinet wrote: > > Tom Herbert wrote on Wed, Feb 20, 2019: > > > When the client closes the socket, some messages are obviously still "in > > > flight", and the server will recv a POLLERR notification on the csock at &

Re: [PATCH v2] kcm: remove any offset before parsing messages

2019-02-22 Thread Tom Herbert
On Fri, Feb 22, 2019 at 12:28 PM Dominique Martinet wrote: > > Tom Herbert wrote on Fri, Feb 22, 2019: > > > > So basically it sounds like you're interested in supporting TCP > > > > connections that are half closed. I believe that the error in half > >

[PATCH v7 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
;s question about why use generic netlink instead of rtnetlink. Tested: Set Hop-by-Hop options on TCP/UDP socket and verified to be functional. Tom Herbert (6): exthdrs: Create exthdrs_options.c exthdrs: Move generic EH functions to exthdrs_common.c exthdrs: Registration of TLV handlers and

[PATCH v7 net-next 1/6] exthdrs: Create exthdrs_options.c

2019-04-29 Thread Tom Herbert
Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 15 net/ipv6/Makefile | 2 +- net/ipv6/exthdrs.c

[PATCH v7 net-next 6/6] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-29 Thread Tom Herbert
max_*_opts_cnt. For individual TLVs, length limits and length alignment is checked. Signed-off-by: Tom Herbert --- include/net/ipv6.h| 23 +++ net/ipv6/datagram.c | 51 +-- net/ipv6/exthdrs_common.c | 376 ++ net/ipv6/ipv6_sockglue.c

[PATCH v7 net-next 5/6] ip6tlvs: Add netlink interface

2019-04-29 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 18 +++ include/uapi/linux/in6.h | 31

[PATCH v7 net-next 4/6] exthdrs: Add TX parameters

2019-04-29 Thread Tom Herbert
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 26 - include/uapi/linux/in6.h | 8 +++ net/ipv6/exthdrs.c

[PATCH v7 net-next 2/6] exthdrs: Move generic EH functions to exthdrs_common.c

2019-04-29 Thread Tom Herbert
Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Signed-off-by: Tom

[PATCH v7 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-29 Thread Tom Herbert
ookup and processing is modified to be a lookup in the TLV parameter table. An init table containing parameters for TLVs supported by the kernel is used to initialize the TLV table. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 60 +- include/uapi/linux/in6.h | 10 ++

Re: [PATCH v7 net-next 4/6] exthdrs: Add TX parameters

2019-04-29 Thread Tom Herbert
On Mon, Apr 29, 2019 at 12:35 PM Stephen Hemminger wrote: > > On Mon, 29 Apr 2019 11:46:14 -0700 > Tom Herbert wrote: > > > /* Default (unset) values for TLV parameters */ > > static const struct tlv_proc tlv_default_proc = { > > - .params.rx_class = 0,

[PATCH v8 net-next 4/8] ip6tlvs: Add netlink interface

2019-04-29 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 18 +++ include/uapi/linux/in6.h | 31

[PATCH v8 net-next 5/8] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-29 Thread Tom Herbert
max_*_opts_cnt. For individual TLVs, length limits and length alignment is checked. Signed-off-by: Tom Herbert --- include/net/ipv6.h| 23 +++ net/ipv6/datagram.c | 51 +-- net/ipv6/exthdrs_common.c | 376 ++ net/ipv6/ipv6_sockglue.c

[PATCH v8 net-next 1/8] exthdrs: Move generic EH functions to exthdrs_common.c

2019-04-29 Thread Tom Herbert
Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Signed-off-by: Tom

[PATCH v8 net-next 7/8] ipv6tlvs: Infrastructure for manipulating individual TLVs

2019-04-29 Thread Tom Herbert
Add utility functions in exthdrs_common.c to manipulate individual TVLs in Hop-by-Hop or Destination Options. This includes functions to find, insert, and delete in singleton TLV from on IPv6 options header. This code is based in part on the TLV option handling in calipso.c. Signed-off-by: Tom

[PATCH v8 net-next 8/8] ipv6tlvs: API for manipuateling TLVs on a connect socket

2019-04-29 Thread Tom Herbert
IPV6_RTHDRDSTOPTS_DEL_TLV IPV6_DSTOPTS_DEL_TLV The function txoptions_from_tlv_opt does the heavy lifting to copy an options from userspace, validate the option, and call insert of delete TLV function. Signed-off-by: Tom Herbert --- include/net/ipv6.h| 7 + include/uapi/linux/in6.h | 9

[PATCH v8 net-next 0/8] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
;s question about why use generic netlink instead of rtnetlink. v8: - Don't explicitly set fields to zero when initializing TLV paramter structures. Tested: Set Hop-by-Hop options on TCP/UDP socket and verified to be functional. Tom Herbert (8): exthdrs: Move generic EH functions

[PATCH v8 net-next 3/8] exthdrs: Add TX parameters

2019-04-29 Thread Tom Herbert
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 26 - include/uapi/linux/in6.h | 8 +++ net/ipv6/exthdrs.c

[PATCH v8 net-next 2/8] exthdrs: Registration of TLV handlers and parameters

2019-04-29 Thread Tom Herbert
ookup and processing is modified to be a lookup in the TLV parameter table. An init table containing parameters for TLVs supported by the kernel is used to initialize the TLV table. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 60 +- include/uapi/linux/in6.h | 10 ++

[PATCH v8 net-next 6/8] ipv6tlvs: opt_update function

2019-04-29 Thread Tom Herbert
Add a utility function to replace socket's options with a new set. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 2 ++ net/ipv6/ipv6_sockglue.c | 16 2 files changed, 18 insertions(+) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 8c19c6f..a8

[PATCH v9 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
;s question about why use generic netlink instead of rtnetlink. v8: - Don't explicitly set fields to zero when initializing TLV paramter structures. v9: - Don't send extra patches in v8. Tested: Set Hop-by-Hop options on TCP/UDP socket and verified to be functional.

[PATCH v9 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-04-29 Thread Tom Herbert
;s question about why use generic netlink instead of rtnetlink. v8: - Don't explicitly set fields to zero when initializing TLV paramter structures. v9: - Don't send extra patches in v8. Tested: Set Hop-by-Hop options on TCP/UDP socket and verified to be functional.

[PATCH v9 net-next 1/6] exthdrs: Create exthdrs_options.c

2019-04-29 Thread Tom Herbert
Create exthdrs_options.c to hold code related to specific Hop-by-Hop and Destination extension header options. Move related functions in exthdrs.c to the new file. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 15 net/ipv6/Makefile | 2 +- net/ipv6/exthdrs.c

[PATCH v9 net-next 4/6] exthdrs: Add TX parameters

2019-04-29 Thread Tom Herbert
Define a number of transmit parameters for TLV Parameter table definitions. These will be used for validating TLVs that are set on a socket. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 26 - include/uapi/linux/in6.h | 8 +++ net/ipv6/exthdrs.c

[PATCH v9 net-next 5/6] ip6tlvs: Add netlink interface

2019-04-29 Thread Tom Herbert
Add a netlink interface to manage the TX TLV parameters. Managed parameters include those for validating and sending TLVs being sent such as alignment, TLV ordering, length limits, etc. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 18 +++ include/uapi/linux/in6.h | 31

[PATCH v9 net-next 6/6] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-04-29 Thread Tom Herbert
max_*_opts_cnt. For individual TLVs, length limits and length alignment is checked. Signed-off-by: Tom Herbert --- include/net/ipv6.h| 23 +++ net/ipv6/datagram.c | 51 +-- net/ipv6/exthdrs_common.c | 376 ++ net/ipv6/ipv6_sockglue.c

[PATCH v9 net-next 3/6] exthdrs: Registration of TLV handlers and parameters

2019-04-29 Thread Tom Herbert
ookup and processing is modified to be a lookup in the TLV parameter table. An init table containing parameters for TLVs supported by the kernel is used to initialize the TLV table. Signed-off-by: Tom Herbert --- include/net/ipv6.h | 60 +- include/uapi/linux/in6.h | 10 ++

[PATCH v9 net-next 2/6] exthdrs: Move generic EH functions to exthdrs_common.c

2019-04-29 Thread Tom Herbert
Move generic functions in exthdrs.c to new exthdrs_common.c so that exthdrs.c only contains functions that are specific to IPv6 processing, and exthdrs_common.c contains functions that are generic. These functions include those that will be used with IPv4 extension headers. Signed-off-by: Tom

Re: [PATCH v9 net-next 0/6] exthdrs: Make ext. headers & options useful - Part I

2019-05-05 Thread Tom Herbert
On Sun, May 5, 2019 at 12:45 AM David Miller wrote: > > From: Tom Herbert > Date: Mon, 29 Apr 2019 16:15:11 -0700 > > > Extension headers are the mechanism of extensibility for the IPv6 > > protocol, however to date they have only seen limited deployment. > > Th

Re: [PATCH net-next 0/7] nfp: extend match and action for flower offload

2017-10-06 Thread Tom Herbert
Simon, Maybe a bit off topic, but I had the impression netronome would support BPF so that filters could be programmed for arbitrary protocols and fields. Is that true? If so, what is the relationship between that functionality and these patches? Thanks, Tom On Fri, Oct 6, 2017 at 1:21 AM, Simon

Re: [PATCH net-next 0/7] nfp: extend match and action for flower offload

2017-10-09 Thread Tom Herbert
On Mon, Oct 9, 2017 at 1:05 AM, Simon Horman wrote: > On Fri, Oct 06, 2017 at 08:34:59AM -0700, Tom Herbert wrote: >> Simon, >> >> Maybe a bit off topic, but I had the impression netronome would >> support BPF so that filters could be programmed for arbitrary >> p

Re: [RFC PATCH v2 net-next 00/12] Handle multiple received packets at each stage

2018-06-26 Thread Tom Herbert
On Tue, Jun 26, 2018 at 11:15 AM, Edward Cree wrote: > > This patch series adds the capability for the network stack to receive a > list of packets and process them as a unit, rather than handling each > packet singly in sequence. This is done by factoring out the existing > datapath code at e

Re: [net-next PATCH v4 1/7] net: Refactor XPS for CPUs and Rx queues

2018-06-26 Thread Tom Herbert
; > @@ -2363,6 +2424,12 @@ int netif_set_xps_queue(struct net_device *dev, const > struct cpumask *mask, > kfree(new_dev_maps); > return -ENOMEM; > } > + > +int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask, > + u16 index) > +{ > + return __netif_set_xps_queue(dev, cpumask_bits(mask), index, false); > +} > EXPORT_SYMBOL(netif_set_xps_queue); > > #endif > @@ -3384,7 +3451,7 @@ static inline int get_xps_queue(struct net_device *dev, > struct sk_buff *skb) > int queue_index = -1; > > rcu_read_lock(); > - dev_maps = rcu_dereference(dev->xps_maps); > + dev_maps = rcu_dereference(dev->xps_cpus_map); > if (dev_maps) { > unsigned int tci = skb->sender_cpu - 1; > > @@ -3393,7 +3460,7 @@ static inline int get_xps_queue(struct net_device *dev, > struct sk_buff *skb) > tci += netdev_get_prio_tc_map(dev, skb->priority); > } > > - map = rcu_dereference(dev_maps->cpu_map[tci]); > + map = rcu_dereference(dev_maps->attr_map[tci]); > if (map) { > if (map->len == 1) > queue_index = map->queues[0]; > diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index bb7e80f..b39987c 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -1227,13 +1227,13 @@ static ssize_t xps_cpus_show(struct netdev_queue > *queue, > return -ENOMEM; > > rcu_read_lock(); > - dev_maps = rcu_dereference(dev->xps_maps); > + dev_maps = rcu_dereference(dev->xps_cpus_map); > if (dev_maps) { > for_each_possible_cpu(cpu) { > int i, tci = cpu * num_tc + tc; > struct xps_map *map; > > - map = rcu_dereference(dev_maps->cpu_map[tci]); > + map = rcu_dereference(dev_maps->attr_map[tci]); > if (!map) > continue; > > Acked-by: Tom Herbert

Re: [net-next PATCH v4 2/7] net: Use static_key for XPS maps

2018-06-26 Thread Tom Herbert
> Rx queues map. > Acked-by: Tom Herbert > Signed-off-by: Amritha Nambiar > --- > net/core/dev.c | 26 -- > 1 file changed, 20 insertions(+), 6 deletions(-) > > diff --git a/net/core/dev.c b/net/core/dev.c > index 2552556..df2a78d 100644 &g

Re: [net-next PATCH v4 7/7] Documentation: Add explanation for XPS using Rx-queue(s) map

2018-06-26 Thread Tom Herbert
On Mon, Jun 25, 2018 at 11:04 AM, Amritha Nambiar wrote: > Signed-off-by: Amritha Nambiar Acked-by: Tom Herbert > --- > Documentation/ABI/testing/sysfs-class-net-queues | 11 > Documentation/networking/scaling.txt | 57 > ++ > 2

[PATCH net-next 0/4] ila: Cleanup

2018-06-27 Thread Tom Herbert
ila_nl_dump. - Call alloc_bucket_spinlocks to create bucket locks. - Split out module initialization and netlink definitions into separate files. - Add ILA_CMD_FLUSH netlink command to clear the ILA translation table. Tom Herbert (4): ila: Fix use of rhashtable walk in ila_xlat.c ila: Call library

[PATCH net-next 3/4] ila: Create main ila source file

2018-06-27 Thread Tom Herbert
Create a main ila file that contains the module initialization functions as well as netlink definitions. Previously these were defined in ila_xlat and ila_common. This approach allows better extensibility. Signed-off-by: Tom Herbert --- net/ipv6/ila/Makefile | 2 +- net/ipv6/ila/ila.h

[PATCH net-next 2/4] ila: Call library function alloc_bucket_locks

2018-06-27 Thread Tom Herbert
To allocate the array of bucket locks for the hash table we now call library function alloc_bucket_spinlocks. Signed-off-by: Tom Herbert --- net/ipv6/ila/ila_xlat.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6

[PATCH net-next 4/4] ila: Flush netlink command to clear xlat table

2018-06-27 Thread Tom Herbert
Add ILA_CMD_FLUSH netlink command to clear the ILA translation table. Signed-off-by: Tom Herbert --- include/uapi/linux/ila.h | 1 + net/ipv6/ila/ila.h | 1 + net/ipv6/ila/ila_main.c | 6 + net/ipv6/ila/ila_xlat.c | 62 ++-- 4 files

[PATCH net-next 1/4] ila: Fix use of rhashtable walk in ila_xlat.c

2018-06-27 Thread Tom Herbert
Perform better EAGAIN handling, handle case where ila_dump_info fails and we missed objects in the dump, and add a skip index to skip over ila entires in a list on a rhashtable node that have already been visited (by a previous call to ila_nl_dump). Signed-off-by: Tom Herbert --- net/ipv6/ila

Re: KASAN: use-after-free Read in get_work_pool

2018-03-11 Thread Tom Herbert
On Sun, Mar 11, 2018 at 2:34 PM, Eric Biggers wrote: > On Wed, Feb 14, 2018 at 02:45:05PM +0100, 'Dmitry Vyukov' via syzkaller-bugs > wrote: >> On Wed, Dec 6, 2017 at 1:50 PM, Dmitry Vyukov wrote: >> > On Fri, Oct 27, 2017 at 11:18 PM, Cong Wang >> > wrote: >> >> On Thu, Oct 26, 2017 at 11:00

[PATCH net] kcm: lock lower socket in kcm_attach

2018-03-12 Thread Tom Herbert
Need to lock lower socket in order to provide mutual exclusion with kcm_unattach. Fixes: ab7ac4eb9832e32a09f4e804 ("kcm: Kernel Connection Multiplexor module") Signed-off-by: Tom Herbert --- net/kcm/kcmsock.c | 33 +++-- 1 file changed, 23 insertions(+), 10

Re: [PATCH net] kcm: lock lower socket in kcm_attach

2018-03-12 Thread Tom Herbert
On Mon, Mar 12, 2018 at 2:09 PM, Eric Biggers wrote: > On Mon, Mar 12, 2018 at 02:04:12PM -0700, Tom Herbert wrote: >> Need to lock lower socket in order to provide mutual exclusion >> with kcm_unattach. >> >> Fixes: ab7ac4eb9832e32a09f4e804 ("kcm: Kernel Connectio

[PATCH v2 net] kcm: lock lower socket in kcm_attach

2018-03-13 Thread Tom Herbert
ned-off-by: Tom Herbert --- net/kcm/kcmsock.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index f297d53a11aa..34355fd19f27 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -1381,24 +1381,32 @@

Re: Creating FOU tunnels to the same destination IP but different port

2018-04-13 Thread Tom Herbert
On Fri, Apr 13, 2018 at 9:57 AM, Kostas Peletidis wrote: > Hello, > > I am having trouble with a particular case of setting up a fou tunnel > and I would really appreciate your help. > > I have a remote multihomed host behind a NAT box and I want to create > a fou tunnel for each of its IP address

Re: [PATCH net-next 05/14] gtp: Remove special mtu handling

2017-09-19 Thread Tom Herbert
On Tue, Sep 19, 2017 at 4:42 AM, Harald Welte wrote: > Hi Tom, > > On Mon, Sep 18, 2017 at 05:38:55PM -0700, Tom Herbert wrote: >> Removes MTU handling in gtp_build_skb_ip4. This is non standard relative >> to how other tunneling protocols handle MTU. The model espoused

Re: [PATCH net-next 00/14] gtp: Additional feature support

2017-09-19 Thread Tom Herbert
On Tue, Sep 19, 2017 at 4:19 PM, Harald Welte wrote: > Hi Tom, > > On Tue, Sep 19, 2017 at 08:59:28AM -0700, Tom Herbert wrote: >> On Tue, Sep 19, 2017 at 5:43 AM, Harald Welte >> wrote: >> > On Mon, Sep 18, 2017 at 05:38:50PM -0700, Tom Herbert wrote: >>

  1   2   3   4   5   6   7   8   9   10   >