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 bpf-next] bpf: add bpf_get_xdp_hash helper function

2020-09-02 Thread Tom Herbert
On Mon, Aug 31, 2020 at 2:33 PM Daniel Borkmann wrote: > > On 8/31/20 9:25 PM, Harshitha Ramamurthy wrote: > > This patch adds a helper function called bpf_get_xdp_hash to calculate > > the hash for a packet at the XDP layer. In the helper function, we call > > the kernel flow dissector in non-skb

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

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

2020-08-04 Thread Tom Herbert
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 extracted. Symmetric keys are used in functions to compute the flow hash for packets, and these functions also set "stop at flow label". The upshot is that for IPv

Re: [net-next 1/5] ice: add the virtchnl handler for AdminQ command

2020-07-25 Thread Tom Herbert
On Wed, Jul 22, 2020 at 6:07 PM Jakub Kicinski wrote: > > On Thu, 23 Jul 2020 00:37:29 + Venkataramanan, Anirudh wrote: > > Can you please clarify how you (and the community) define bifurcated > > driver? > > No amount of clarification from me will change the fact that you need > this for DPDK

[RFC PATCH net-next 2/3] sock: Use dev_and_queue structure for TX queue mapping in sock

2020-07-24 Thread Tom Herbert
Replace sk_tx_queue_mapping with sk_tx_dev_and_queue_mapping and change associated function to set, get, and clear mapping. --- drivers/net/hyperv/netvsc_drv.c | 9 +--- include/net/request_sock.h | 2 +- include/net/sock.h | 38 + net/core/d

[RFC PATCH net-next 3/3] sock: Use dev_and_queue structure for RX queue mapping in sock

2020-07-24 Thread Tom Herbert
Replace sk_rx_queue_mapping with sk_rx_dev_and_queue_mapping and change associated function to set, get, and clear mapping. --- .../mellanox/mlx5/core/en_accel/ktls_rx.c | 10 +++-- include/net/busy_poll.h | 2 +- include/net/sock.h| 38 ++

[RFC PATCH net-next 0/3] sock: Fix sock queue mapping to include device

2020-07-24 Thread Tom Herbert
sk_tx_dev_and_queue_{get,set,clear} - Modify callers of above to use new interface - Change sk_rx_queue_{get,set,clear} to sk_rx_dev_and_queue_{get,set,clear} - Modify callers of above to use new interface Tom Herbert (3): sock: Definition and general

[RFC PATCH net-next 1/3] sock: Definition and general functions for dev_and_queue structure

2020-07-24 Thread Tom Herbert
Add struct dev_and_queue which holds and ifindex and queue pair. Add generic functions to set, get, and clear the pair in a structure. --- include/net/sock.h | 56 -- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/include/net/sock.h b/inc

Re: [PATCH net-next v2 00/10] udp_tunnel: add NIC RX port offload infrastructure

2020-07-09 Thread Tom Herbert
The patch set looks good for its purpose, but, sorry, I can't resist another round of complaining about vendors that continue to develop protocol specific offloads instead of moving to protocol agnostic generic offloads. On Wed, Jul 8, 2020 at 6:19 PM Jakub Kicinski wrote: > > Kernel has a facili

Re: [PATCH net-next] icmp: support rfc 4884

2020-06-30 Thread Tom Herbert
On Tue, Jun 30, 2020 at 9:52 AM Willem de Bruijn wrote: > > On Tue, Jun 30, 2020 at 12:41 PM Tom Herbert wrote: > > > > On Tue, Jun 30, 2020 at 9:16 AM Eric Dumazet wrote: > > > > > > > > > > > > On 6/30/20 6:57 AM, Willem de Bruijn wro

Re: [PATCH net-next] icmp: support rfc 4884

2020-06-30 Thread Tom Herbert
On Tue, Jun 30, 2020 at 9:16 AM Eric Dumazet wrote: > > > > On 6/30/20 6:57 AM, Willem de Bruijn wrote: > > On Mon, Jun 29, 2020 at 10:19 PM Willem de Bruijn > > wrote: > >> > >> On Mon, Jun 29, 2020 at 8:37 PM Tom Herbert wrote: > >>&

Re: [PATCH net-next] icmp: support rfc 4884

2020-06-29 Thread Tom Herbert
On Mon, Jun 29, 2020 at 4:07 PM Eric Dumazet wrote: > > > > On 6/29/20 2:30 PM, Willem de Bruijn wrote: > > On Mon, Jun 29, 2020 at 5:15 PM Eric Dumazet wrote: > >> > >> > >> > >> On 6/29/20 9:57 AM, Willem de Bruijn wrote: > >>> From: Willem de Bruijn > >>> > >>> ICMP messages may include an ex

Re: [PATCH net-next] icmp: support rfc 4884

2020-06-29 Thread Tom Herbert
On Mon, Jun 29, 2020 at 2:15 PM Eric Dumazet wrote: > > > > On 6/29/20 9:57 AM, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > ICMP messages may include an extension structure after the original > > datagram. RFC 4884 standardized this behavior. > > > > It introduces an explicit origi

Re: [net-next 04/15] net/mlx5e: Receive flow steering framework for accelerated TCP flows

2020-06-29 Thread Tom Herbert
On Sun, Jun 28, 2020 at 11:57 PM Saeed Mahameed wrote: > > On Sat, 2020-06-27 at 15:34 -0700, Tom Herbert wrote: > > On Sat, Jun 27, 2020 at 2:19 PM Saeed Mahameed > > wrote: > > > From: Boris Pismenny > > > > > > The framework allows creating f

Re: [PATCH net-next] icmp: support rfc 4884

2020-06-29 Thread Tom Herbert
On Mon, Jun 29, 2020 at 12:23 PM Willem de Bruijn wrote: > > From: Willem de Bruijn > > ICMP messages may include an extension structure after the original > datagram. RFC 4884 standardized this behavior. > > It introduces an explicit original datagram length field in the ICMP > header to delinea

Re: [RFC PATCH 11/11] doc: Documentation for Per Thread Queues

2020-06-29 Thread Tom Herbert
On Sun, Jun 28, 2020 at 11:28 PM Saeed Mahameed wrote: > > On Wed, 2020-06-24 at 10:17 -0700, Tom Herbert wrote: > > Add a section on Per Thread Queues to scaling.rst. > > --- > > Documentation/networking/scaling.rst | 195 > > ++- > >

Re: [net-next 04/15] net/mlx5e: Receive flow steering framework for accelerated TCP flows

2020-06-27 Thread Tom Herbert
On Sat, Jun 27, 2020 at 2:19 PM Saeed Mahameed wrote: > > From: Boris Pismenny > > The framework allows creating flow tables to steer incoming traffic of > TCP sockets to the acceleration TIRs. > This is used in downstream patches for TLS, and will be used in the > future for other offloads. > >

Re: ADQ - comparison to aRFS, clarifications on NAPI ID, binding with busy-polling

2020-06-27 Thread Tom Herbert
On Wed, Jun 24, 2020 at 1:21 PM Samudrala, Sridhar wrote: > > > > On 6/17/2020 6:15 AM, Maxim Mikityanskiy wrote: > > Hi, > > > > I discovered Intel ADQ feature [1] that allows to boost performance by > > picking dedicated queues for application traffic. We did some research, > > and I got some le

Re: [PATCH net-next 1/5] ipv6: eh: Introduce removable TLVs

2020-06-26 Thread Tom Herbert
On Fri, Jun 26, 2020 at 10:14 AM Justin Iurman wrote: > > >> Tom, > >> > >> >> Hi Tom, > >> >> > >> >> >> Add the possibility to remove one or more consecutive TLVs without > >> >> >> messing up the alignment of others. For now, only IOAM requires this > >> >> >> behavior. > >> >> >> > >> >> > Hi

Re: [PATCH net-next 2/5] ipv6: IOAM tunnel decapsulation

2020-06-26 Thread Tom Herbert
On Fri, Jun 26, 2020 at 1:31 AM Justin Iurman wrote: > > Tom, > > >> >> Implement the IOAM egress behavior. > >> >> > >> >> According to RFC 8200: > >> >> "Extension headers (except for the Hop-by-Hop Options header) are not > >> >> processed, inserted, or deleted by any node along a packet's del

Re: [PATCH net-next 1/5] ipv6: eh: Introduce removable TLVs

2020-06-26 Thread Tom Herbert
On Fri, Jun 26, 2020 at 1:22 AM Justin Iurman wrote: > > Tom, > > >> Hi Tom, > >> > >> >> Add the possibility to remove one or more consecutive TLVs without > >> >> messing up the alignment of others. For now, only IOAM requires this > >> >> behavior. > >> >> > >> > Hi Justin, > >> > > >> > Can yo

Re: [PATCH net-next 3/5] ipv6: ioam: Data plane support for Pre-allocated Trace

2020-06-26 Thread Tom Herbert
On Fri, Jun 26, 2020 at 1:13 AM Justin Iurman wrote: > > Tom, > > >> >> Implement support for processing the IOAM Pre-allocated Trace with IPv6, > >> >> see [1] and [2]. Introduce a new IPv6 Hop-by-Hop TLV option > >> >> IPV6_TLV_IOAM_HOPOPTS, see IANA [3]. > >> >> > >> > > >> > The IANA allocatio

Re: [PATCH net-next 2/5] ipv6: IOAM tunnel decapsulation

2020-06-25 Thread Tom Herbert
On Thu, Jun 25, 2020 at 10:56 AM Justin Iurman wrote: > > >> Implement the IOAM egress behavior. > >> > >> According to RFC 8200: > >> "Extension headers (except for the Hop-by-Hop Options header) are not > >> processed, inserted, or deleted by any node along a packet's delivery > >> path, until

Re: [PATCH net-next 1/5] ipv6: eh: Introduce removable TLVs

2020-06-25 Thread Tom Herbert
On Thu, Jun 25, 2020 at 10:47 AM Justin Iurman wrote: > > Hi Tom, > > >> Add the possibility to remove one or more consecutive TLVs without > >> messing up the alignment of others. For now, only IOAM requires this > >> behavior. > >> > > Hi Justin, > > > > Can you explain the motivation for this?

Re: [PATCH net-next 3/5] ipv6: ioam: Data plane support for Pre-allocated Trace

2020-06-25 Thread Tom Herbert
On Thu, Jun 25, 2020 at 11:23 AM Justin Iurman wrote: > > >> Implement support for processing the IOAM Pre-allocated Trace with IPv6, > >> see [1] and [2]. Introduce a new IPv6 Hop-by-Hop TLV option > >> IPV6_TLV_IOAM_HOPOPTS, see IANA [3]. > >> > > > > The IANA allocation is TEMPORARY, with an ex

Re: [PATCH net-next 3/5] ipv6: ioam: Data plane support for Pre-allocated Trace

2020-06-25 Thread Tom Herbert
On Wed, Jun 24, 2020 at 12:33 PM Justin Iurman wrote: > > Implement support for processing the IOAM Pre-allocated Trace with IPv6, > see [1] and [2]. Introduce a new IPv6 Hop-by-Hop TLV option > IPV6_TLV_IOAM_HOPOPTS, see IANA [3]. > The IANA allocation is TEMPORARY, with an expiration date is 4/

Re: [PATCH net-next 5/5] ipv6: ioam: Documentation for new IOAM sysctls

2020-06-24 Thread Tom Herbert
On Wed, Jun 24, 2020 at 12:33 PM Justin Iurman wrote: > > Add documentation for new IOAM sysctls: > - ioam6_id: a namespace sysctl > - ioam6_enabled and ioam6_id: two per-interface sysctls > Are you planning add a more detailed description of the feature and how to use it (would be nice I think

Re: [PATCH net-next 3/5] ipv6: ioam: Data plane support for Pre-allocated Trace

2020-06-24 Thread Tom Herbert
On Wed, Jun 24, 2020 at 12:33 PM Justin Iurman wrote: > > Implement support for processing the IOAM Pre-allocated Trace with IPv6, > see [1] and [2]. Introduce a new IPv6 Hop-by-Hop TLV option > IPV6_TLV_IOAM_HOPOPTS, see IANA [3]. > > A per-interface sysctl ioam6_enabled is provided to accept/dro

Re: [PATCH net-next 2/5] ipv6: IOAM tunnel decapsulation

2020-06-24 Thread Tom Herbert
On Wed, Jun 24, 2020 at 12:33 PM Justin Iurman wrote: > > Implement the IOAM egress behavior. > > According to RFC 8200: > "Extension headers (except for the Hop-by-Hop Options header) are not > processed, inserted, or deleted by any node along a packet's delivery > path, until the packet reache

Re: [PATCH net-next 1/5] ipv6: eh: Introduce removable TLVs

2020-06-24 Thread Tom Herbert
On Wed, Jun 24, 2020 at 12:33 PM Justin Iurman wrote: > > Add the possibility to remove one or more consecutive TLVs without > messing up the alignment of others. For now, only IOAM requires this > behavior. > Hi Justin, Can you explain the motivation for this? Per RFC8200, extension headers in f

[RFC PATCH 10/11] ptq: Hook up receive side of Per Queue Threads

2020-06-24 Thread Tom Herbert
Add code to set the queue in an rflow as opposed to just setting the CPU in an rps_dev_flow entry. set_rps_qid is the analogue for set_rps_cpu but for setting queues. In get_rps_cpu, a check is performed that identifier in the sock_flow_table refers to a queue; when it does call set_rps_qid after c

[RFC PATCH 09/11] ptq: Hook up transmit side of Per Queue Threads

2020-06-24 Thread Tom Herbert
Support to select device queue for transmit based on the per thread transmit queue. Patch includes: - Add a global queue (gqid) mapping to sock - Function to convert gqid in a sock to a device queue (dqid) by calling sk_tx_gqid_to_dqid_get - Function sock_record_t

[RFC PATCH 11/11] doc: Documentation for Per Thread Queues

2020-06-24 Thread Tom Herbert
Add a section on Per Thread Queues to scaling.rst. --- Documentation/networking/scaling.rst | 195 ++- 1 file changed, 194 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/scaling.rst b/Documentation/networking/scaling.rst index 8f0347b9fb3d..42f1dc639ab

[RFC PATCH 07/11] net: Introduce global queues

2020-06-24 Thread Tom Herbert
Global queues, or gqids, are an abstract representation of NIC device queues. They are global in the sense that the each gqid can be map to a queue in each device, i.e. if there are multiple devices in the system, a gqid can map to a different queue, a dqid, in each device in a one to many mapping.

[RFC PATCH 08/11] ptq: Per Thread Queues

2020-06-24 Thread Tom Herbert
added above here, so that diff --git a/include/net/ptq.h b/include/net/ptq.h new file mode 100644 index ..a8ce39a85136 --- /dev/null +++ b/include/net/ptq.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Per thread queues + * + * Copyright (c) 2020 Tom Herbe

[RFC PATCH 05/11] net: Infrastructure for per queue aRFS

2020-06-24 Thread Tom Herbert
Infrastructure changes to allow aRFS to be based on Per Thread Queues instead of just CPU. The basic change is to create a field in rps_dev_flow to hold either a CPU or a queue index (not just a CPU that is). Changes include: - Replace u16 cpu field in rps_dev_flow structure with

[RFC PATCH 06/11] net: Function to check against maximum number for RPS queues

2020-06-24 Thread Tom Herbert
Add rps_check_max_queues function which checks is the input number is greater than rps_max_num_queues. If it is then set max_num_queues to the value and recreating the sock_flow_table to update the queue masks used in table entries. --- include/linux/netdevice.h | 10 net/core/sysctl_net

[RFC PATCH 02/11] net: Create netqueue.h and define NO_QUEUE

2020-06-24 Thread Tom Herbert
/netqueue.h b/include/linux/netqueue.h new file mode 100644 index ..5a4d39821ada --- /dev/null +++ b/include/linux/netqueue.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Network queue identifier definitions + * + * Copyright (c) 2020 Tom Herbert

[RFC PATCH 04/11] net-sysfs: Create rps_create_sock_flow_table

2020-06-24 Thread Tom Herbert
Move code for writing a sock_flow_table to its own function so that it can be called for other use cases. --- net/core/sysctl_net_core.c | 102 + 1 file changed, 57 insertions(+), 45 deletions(-) diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_cor

[RFC PATCH 03/11] arfs: Create set_arfs_queue

2020-06-24 Thread Tom Herbert
Abstract out the code for steering a flow to an aRFS queue (via ndo_rx_flow_steer) into its own function. This allows the function to be called in other use cases. --- net/core/dev.c | 67 +- 1 file changed, 39 insertions(+), 28 deletions(-) diff --

[RFC PATCH 01/11] cgroup: Export cgroup_{procs,threads}_start and cgroup_procs_next

2020-06-24 Thread Tom Herbert
Export the functions and put prototypes in linux/cgroup.h. This allows creating cgroup entries that provide per task information. --- include/linux/cgroup.h | 3 +++ kernel/cgroup/cgroup.c | 9 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/linux/cgroup.h b/includ

[RFC PATCH 00/11] ptq: Per Thread Queues

2020-06-24 Thread Tom Herbert
w ndo_function. - The sleeping-busy-poll with completion queue model described in the documentation could be integrated. This would most entail creating a reverse mapping from queue to threads, and then allowing the thread processing a device completion q

Re: [PATCH net-next 1/2] UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc.

2019-10-18 Thread Tom Herbert
On Wed, Oct 9, 2019 at 8:42 AM Jiri Benc wrote: > > On Wed, 9 Oct 2019 10:58:51 -0400, Willem de Bruijn wrote: > > Yes, this needs a call to gro_cells_receive like geneve_udp_encap_recv > > and vxlan_rcv, instead of returning a negative value back to > > udp_queue_rcv_one_skb. Though that's not a

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

2019-10-03 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 v5 net-next 5/7] ip6tlvs: Add TX parameters

2019-10-03 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 v5 net-next 7/7] ip6tlvs: Validation of TX Destination and Hop-by-Hop options

2019-10-03 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

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

2019-10-03 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 v5 net-next 3/7] ipeh: Generic TLV parser

2019-10-03 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 v5 net-next 2/7] ipeh: Move generic EH functions to exthdrs_common.c

2019-10-03 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 v5 net-next 0/7] ipv6: Extension header infrastructure

2019-10-03 Thread Tom Herbert
declared inside parameter list in ipeh.h v4: - Resubmit v5: - Fix reverse christmas tree issue 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

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

2019-10-03 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 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

[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 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 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 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

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

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 ? >

[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

[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 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 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 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

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

[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: [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

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)

[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

[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 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 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

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)

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 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

[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

[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 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 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 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 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 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] 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/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 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 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

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

[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

[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

  1   2   3   4   5   6   7   8   9   10   >