lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Mar 2022 11:50:46 +0200
From:   Roi Dayan <roid@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, Maor Dickman <maord@...dia.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 2/3] net/mlx5e: MPLSoUDP decap, use vlan push_eth
 instead of pedit



On 2022-03-15 7:02 AM, Jakub Kicinski wrote:
> On Wed, 9 Mar 2022 15:02:55 +0200 Roi Dayan wrote:
>> +	case FLOW_ACTION_VLAN_PUSH_ETH:
>> +		if (!flow_flag_test(parse_state->flow, L3_TO_L2_DECAP))
>> +			return -EOPNOTSUPP;
>> +		parse_state->eth_push = true;
>> +		memcpy(attr->eth.h_dest, act->vlan_push_eth_dst, ETH_ALEN);
>> +		memcpy(attr->eth.h_source, act->vlan_push_eth_src, ETH_ALEN);
>> +		break;
> 
> How does the device know the proto? I kind of expected this code will
> require some form of a match on proto.

Vlan push_eth doesn't handle the protocol, it only push src/dst mac.

 From tc-vlan man page:
        PUSH_ETH := push_eth dst_mac LLADDR src_mac LLADDR

In the case of MPLSoUDP the protocol is set by mpls pop action,
prior to the vlan push_eth action.

Example:
         action order 2: mpls  pop protocol ip pipe
          index 2 ref 1 bind 1
         used_hw_stats delayed

         action order 3: vlan  push_eth dst_mac de:a2:ec:d6:69:c8 
src_mac de:a2:ec:d6:69:c8 pipe
          index 2 ref 1 bind 1
         used_hw_stats delayed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ