[PATCH V3 net 2/2] openvswitch: Clear the L4 portion of the key for "later" fragments.

2019-08-27 Thread Greg Rose
From: Justin Pettit Only the first fragment in a datagram contains the L4 headers. When the Open vSwitch module parses a packet, it always sets the IP protocol field in the key, but can only set the L4 fields on the first fragment. The original behavior would not clear the L4 portion of the key,

[PATCH V3 net 1/2] openvswitch: Properly set L4 keys on "later" IP fragments

2019-08-27 Thread Greg Rose
s accessible by handle_fragments() for conntrack packet reassembly. Co-authored by: Justin Pettit Signed-off-by: Greg Rose --- V1 - V2: Broke out key l3l4 extraction V2 - V3: Remove code that cleared SW_FLOW_KEY_INVALID for l3l4 extraction --- net/openvswitch/conntrack.c | 5 ++ net/openvswitch/fl

[PATCH V2 net 2/2] openvswitch: Clear the L4 portion of the key for "later" fragments.

2019-08-26 Thread Greg Rose
From: Justin Pettit Only the first fragment in a datagram contains the L4 headers. When the Open vSwitch module parses a packet, it always sets the IP protocol field in the key, but can only set the L4 fields on the first fragment. The original behavior would not clear the L4 portion of the key,

[PATCH V2 net 1/2] openvswitch: Properly set L4 keys on "later" IP fragments

2019-08-26 Thread Greg Rose
s accessible by handle_fragments() for conntrack packet reassembly. Co-authored by: Justin Pettit Signed-off-by: Greg Rose --- net/openvswitch/conntrack.c | 5 ++ net/openvswitch/flow.c | 161 ++-- net/openvswitch/flow.h | 1 + 3 files changed, 101 in

Re: [PATCH] datapath: Fix an error handling path in 'ovs_nla_init_match_and_action()'

2017-09-12 Thread Greg Rose
On 09/11/2017 12:20 PM, Christophe JAILLET wrote: All other error handling paths in this function go through the 'error' label. This one should do the same. Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.") Signed-off-by: Christophe JAILLET --- I think that the comment above

[PATCH V3 net] openvswitch: Fix for force/commit action failures

2017-07-14 Thread Greg Rose
ection. Fixes: dd41d330b03 ("openvswitch: Add force commit.") CC: Pravin Shelar CC: d...@openvswitch.org Signed-off-by: Joe Stringer Signed-off-by: Greg Rose --- V2: Make sure nf_conntrack_in() is called for force case V3: Fix compiler warning for newer compilers --- net/openvswitch/

Re: [PATCH net] openvswitch: Fix for force/commit action failures

2017-07-14 Thread Greg Rose
On 07/14/2017 11:42 AM, Joe Stringer wrote: On 14 July 2017 at 09:10, Greg Rose wrote: > When there is an established connection in direction A->B, it is > possible to receive a packet on port B which then executes > ct(commit,force) without first performing ct() - ie, a lookup. &g

[PATCH net] openvswitch: Fix for force/commit action failures

2017-07-14 Thread Greg Rose
ection. Fixes: dd41d330b03 ("openvswitch: Add force commit.") CC: Pravin Shelar CC: d...@openvswitch.org Signed-off-by: Joe Stringer Signed-off-by: Greg Rose --- net/openvswitch/conntrack.c | 50 +++-- 1 file changed, 35 insertions(+), 15 de

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
On 07/13/2017 11:03 AM, Joe Stringer wrote: On 13 July 2017 at 11:01, Greg Rose wrote: On 07/13/2017 10:46 AM, Joe Stringer wrote: On 13 July 2017 at 09:25, Greg Rose wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which t

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
On 07/13/2017 10:46 AM, Joe Stringer wrote: On 13 July 2017 at 09:25, Greg Rose wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct(commit,force) without first performing ct() - ie, a lookup. In this case,

Re: [ovs-dev] [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
On 07/13/2017 10:08 AM, Darrell Ball wrote: On 7/13/17, 9:25 AM, "ovs-dev-boun...@openvswitch.org on behalf of Greg Rose" wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct

[PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
ection. CC: d...@openvswitch.org CC: Pravin Shalar Signed-off-by: Joe Stringer Signed-off-by: Greg Rose --- net/openvswitch/conntrack.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 08679eb..9

Re: [Intel-wired-lan] [PATCH 1/2] i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource

2017-07-07 Thread Greg Rose
On Thu, Jul 6, 2017 at 4:26 PM, Wyborny, Carolyn wrote: >> -Original Message- >> From: Greg Rose [mailto:gvrose8...@gmail.com] >> Sent: Thursday, July 06, 2017 7:25 AM >> To: Wyborny, Carolyn >> Cc: Stefan Assmann ; intel-wired-...@lists.osuosl.org;

Re: [Intel-wired-lan] [PATCH 1/2] i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource

2017-07-06 Thread Greg Rose
On Wed, Jul 5, 2017 at 10:15 PM, Wyborny, Carolyn wrote: > > > -Original Message- > > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On Behalf > > Of Stefan Assmann > > Sent: Thursday, June 29, 2017 6:12 AM > > To: intel-wired-...@lists.osuosl.org > > Cc: netdev@vger.ker

Re: [PATCH] datapath: Avoid using stack larger than 1024.

2017-06-27 Thread Greg Rose
On 06/27/2017 12:03 AM, Tonghao Zhang wrote: When compiling OvS-master on 4.4.0-81 kernel, there is a warning: CC [M] /root/ovs/datapath/linux/datapath.o /root/ovs/datapath/linux/datapath.c: In function ‘ovs_flow_cmd_set’: /root/ovs/datapath/linux/datapath.c:1221:1: warning:

Re: [PATCH net] net: Zero ifla_vf_info in rtnl_fill_vfinfo()

2017-06-07 Thread Greg Rose
*/ It's been a few years since I worked in this code but I do recall this portion. Good idea... Thanks! Reviewed-by: Greg Rose

Re: [PATCH] net: rtnetlink: bail out from rtnl_fdb_dump() on parse error

2017-05-24 Thread Greg Rose
dump(struct sk_buff *skb, struct > netlink_callback *cb) > int err = 0; > int fidx = 0; > > - if (nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, > - IFLA_MAX, ifla_policy, NULL) == 0) { > + err = nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, > + IFLA_MAX, ifla_policy, NULL); > + if (err < 0) { > + return -EINVAL; > + } else if (err == 0) { > if (tb[IFLA_MASTER]) > br_idx = nla_get_u32(tb[IFLA_MASTER]); > } Fix looks right to me. Reviewed-by: Greg Rose

Re: [patch iproute2 v2 1/2] devlink: Change netlink attribute validation

2017-05-03 Thread Greg Rose
if (type == DEVLINK_ATTR_SB_OCC_CUR && > - mnl_attr_validate(attr, MNL_TYPE_U32) < 0) > - return MNL_CB_ERROR; > - if (type == DEVLINK_ATTR_SB_OCC_MAX && > - mnl_attr_validate(attr, MNL_TYPE_U32) < 0) > - return MNL_CB_ERROR; > - if (type == DEVLINK_ATTR_ESWITCH_MODE && > - mnl_attr_validate(attr, MNL_TYPE_U16) < 0) > - return MNL_CB_ERROR; > - if (type == DEVLINK_ATTR_ESWITCH_INLINE_MODE && > - mnl_attr_validate(attr, MNL_TYPE_U8) < 0) > + type = mnl_attr_get_type(attr); > + if (mnl_attr_validate(attr, devlink_policy[type]) < 0) > return MNL_CB_ERROR; > + > tb[type] = attr; > return MNL_CB_OK; > } > -- > 2.7.4 > Much better!!! LGTM. Reviewed-by: Greg Rose

Re: [PATCH net-next] net: vrf: Do not allow looback to be moved to a VRF

2017-04-26 Thread Greg Rose
if (port_dev == dev_net(dev)->loopback_dev) > + return -EOPNOTSUPP; > + > port_dev->priv_flags |= IFF_L3MDEV_SLAVE; > ret = netdev_master_upper_dev_link(port_dev, dev, NULL, NULL); > if (ret < 0) I think that's a great idea. Reviewed-by: Greg Rose

Re: [PATCH net] netvsc: fix calculation of available send sections

2017-04-24 Thread Greg Rose
ff-by: Stephen Hemminger Looks good to me. Reviewed by Greg Rose > --- > drivers/net/hyperv/hyperv_net.h | 1 - > drivers/net/hyperv/netvsc.c | 9 - > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/h

Re: [PATCH] p54: Prevent from dereferencing null pointer when releasing SKB

2017-04-20 Thread Greg Rose
On Thu, 2017-04-20 at 16:23 -0700, Myungho Jung wrote: > On Thu, Apr 20, 2017 at 04:03:43PM -0700, Greg Rose wrote: > > On Thu, 2017-04-20 at 11:25 -0700, Myungho Jung wrote: > > > Added NULL check to make __dev_kfree_skb_irq consistent with kfree > > > family of f

Re: [PATCH] p54: Prevent from dereferencing null pointer when releasing SKB

2017-04-20 Thread Greg Rose
On Thu, 2017-04-20 at 11:25 -0700, Myungho Jung wrote: > Added NULL check to make __dev_kfree_skb_irq consistent with kfree > family of functions. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289 > > Signed-off-by: Myungho Jung Hi, I think the patch is fine but I'm confused by the

Re: [PATCH net-next 2/2] openvswitch: Add eventmask support to CT action.

2017-04-20 Thread Greg Rose
good to me but I'll let Joe ack it since I'm not that familiar with the code yet. Nevertheless... Reviewed-by: Greg Rose > --- > include/uapi/linux/openvswitch.h | 12 > net/openvswitch/conntrack.c | 27 +++ > 2 files changed,

Re: [PATCH net-next 1/2] openvswitch: Typo fix.

2017-04-20 Thread Greg Rose
luded in the IPCTNL_MSG_CT_NEW event only if the > - * IPCT_LABEL bit it set in the event cache. > + * IPCT_LABEL bit is set in the event cache. >*/ > nf_conntrack_event_cache(IPCT_LABEL, ct); > Acked-by: Greg Rose

Re: vlan tagging problem

2017-04-11 Thread Greg Rose
the header for outgoing packets? > > thx > /carl The Ethernet HW probably inserts the VLAN tag for you as an 'offload'. Run 'ethtool -k ' and check the offloads. You can change the offload settings with 'ethtool -K..'. - Greg Rose

[PATCH] net/ethernet: Use ether_addr_copy rather than memcpy

2016-08-31 Thread Greg Rose
I'm not sure why this hasn't been done before because it seems obvious, so maybe there is some reason that memcpy is used instead of ether_addr_copy in this code. But let's try this anyway. Change memcpy to ether_addr_copy. Signed-off-by: Greg Rose --- net/ethe

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-06-01 Thread Greg Rose
On Wed, Jun 1, 2016 at 3:07 PM, Phil Sutter wrote: > On Wed, Jun 01, 2016 at 03:00:08PM -0700, Greg Rose wrote: >> On Wed, Jun 1, 2016 at 1:03 PM, Phil Sutter wrote: >> > Not sure whether I misinterpret commit 7b8179c780a1a, but it looks >> > overly com

Re: [iproute PATCH 1/2] ipaddress: Simplify vf_info parsing

2016-06-01 Thread Greg Rose
ute2 utilities are supposed to work on older kernels but if it is you may want to check this against a 2.6.32 kernel. - Greg Rose > > Signed-off-by: Phil Sutter > --- > ip/ipaddress.c | 44 ++-- > 1 file changed, 10 insertions(+), 34 del